I want to make the output of Image3D
much smaller. For example
test = Image3D[
Table[Sin[x + y + z], {x, 1, 100}, {y, 1, 100}, {z, 1, 100}]]
It outputs
We can look at how much memory this image takes
ByteCount[test]/1024/1024.
it takes 7.62976 MB
If I want to generate many such kind of image3D in a notebook for studying. The notebook will become very large.
I notice in the "interactive example" section of "ref/Image3DSlices", there is a delicate image of a human head (NMR??). Which only takes up 0.9 MB.
So I was wondering how to make the output of Image3D
smaller?
Update
I also want to know what is the usage of ImageResolution
in Image3D
? I tried it, but I didn't see any difference after using it.
small = ImportString[ExportString[test, "JPEG"], "JPEG"]
returns the plot in the figure but at aByteCount
of422720
. $\endgroup$Image3DSlices
. So, whether this is a good solution depends on the use to which the compressed image is to be put. $\endgroup$