7
$\begingroup$

The help file for Image3D shows two examples,

enter image description here

But when I try to execute this code on my system ("10.3.1 for Linux x86 (64-bit) (December 8, 2015)") I get the following

enter image description here

Is this a problem with my graphics card? Is there a setting to change?

Even the "Neat Example" on the help page looks awful

enter image description here

$\endgroup$
  • $\begingroup$ Looks like an anti-aliasing issue, though I'm not sure how to turn it off or on in Image3D, which does not (obviously, anyway) accept the Antialiasing option. $\endgroup$ – bill s Feb 8 '16 at 15:14
  • $\begingroup$ 1. I get the same image on Linux (in VirtualBox) 2. This is not what it should look like and it's not what it looks like on OS X. 3. My guess is that it falls back to some approximation due to lack of driver/hardware support. $\endgroup$ – Szabolcs Feb 8 '16 at 15:14
  • $\begingroup$ @bill-s I've noticed before that when I move the slider under Preferences -> Appearance -> Graphics it has no effect at all $\endgroup$ – Jason B. Feb 8 '16 at 15:16
  • $\begingroup$ I don't think this is antialiasing-related. Even within a single voxel, we should see a smooth gradient. The shading should reflect the thickness of the opaque material we are looking through. Like this. On Linux each voxel looks as if it were empty inside and only its faces ("walls") were semi-transparent. Each voxel should look as if it were a solid semi-transparent volume. $\endgroup$ – Szabolcs Feb 8 '16 at 15:19
  • 2
    $\begingroup$ I think Mathematica fails to detect graphics capabilities on Linux for some reason, lack of 3D antialiasing being another symptom. For me the solution that worked consistently (both for invoking mathematica from the command line and for starting it from a launcher) was to replace the gltest binary. I wonder if it'll fix your Image3D issues too (I haven't tried it out, but I see you also don't have anti-aliasing in your screenshots). $\endgroup$ – Rahul Feb 8 '16 at 17:15
6
$\begingroup$

It looks like you can do this using the Method option in Image3D.

Image3D[RandomReal[1, {5, 10, 10}], Method -> "InterpolateValues"]

makes the image crisp (as in the OP's version) while

Image3D[RandomReal[1, {5, 10, 10}], Method -> {"InterpolateValues" -> True}]

gives the anti-aliased (smoother) version.

Now I'm really confused... here it gives an error but turns the smoothing on/off anyway:

enter image description here

$\endgroup$
  • $\begingroup$ I can't really get that to change anything on my system, i.imgur.com/jRoekld.png - note just using Method -> "InterpolateValues" returns an error $\endgroup$ – Jason B. Feb 8 '16 at 15:26
  • $\begingroup$ Interesting abuse of "InterpolateValues" in the first instance. Well actually it has nothing to do with "InterpolateValues" and only Method; try Image3D[RandomReal[1, {5, 10, 10}], Method -> "foo"] for example. +1 nevertheless. $\endgroup$ – Mr.Wizard Feb 11 '16 at 12:05
  • $\begingroup$ I think if you use the Method option with Raster3D you don't get an error. r = RandomReal[1, {5, 10, 10, 4}]; Row@{Image3D@r, Graphics3D@Raster3D@r, Graphics3D@Raster3D[r, Method -> {"InterpolateValues" -> True}] }. The first is default Raster3D style, the second interpolated Image3D style. $\endgroup$ – masterxilo Jun 26 '16 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.