represents a 3D image with pixel values given by the array data.

Image3D[{image1, image2, ...}]
creates a 3D image from a list of 2D images.

Image3D[obj, "type"]
creates a 3D image of the specified data type.

Details and OptionsDetails and Options

  • Image3D displays in a notebook as a rendered volume.
  • In Image3D[data], by default the first three dimensions correspond to slices, rows, and columns of the 3D image, respectively. Slices are enumerated from top to bottom, rows from back to front, and columns from left to right.
  • An Image3D object with ImageDimensions of is placed in the 3D space so that in a position given in the standard image coordinate system, x runs from to width, y runs from to depth, and z runs from 0 to height. The position corresponds to the bottom-left front corner.
  • Image3D[{image1, image2, ..., imageheight}] will have ImageDimensions of , where ImageDimensions[imagej] is for each of the 2D images, stacked from top to bottom.  »
  • In Image3D[data], each element of data can specify values for any number of channels.
  • By default, elements of data can be one of the following:
  • vgray level from 0 to 1
    {r,g,b}red, green, blue values from 0 to 1
    {c1,c2,c3,...}channel values represented by equally spaced hues
  • Image3D[data] by default allows values in any range, but displays only values between 0 and 1.
  • Image3D[data, "type"] takes values of the following types:
  • "Bit"integer 0 or 1
    "Byte"integer 0 through 255
    "Bit16"integer 0 through 65535
    "Real32"single-precision real (32-bit)
    "Real"double-precision real (64-bit)
  • Image3D[data] is equivalent to Image3D[data, "Real"].
  • Image3D[data, "type"] coerces values in data to the specified type by rounding or clipping.
  • Image3D[image, "type"] can be used to convert between types.
  • Image3D[{i1, i2, ...}] converts all images to the largest type among the input images.
  • Image3D[{i1, i2, ...}, "type"] converts all images to the specified type.
  • Image3D takes the following options:
  • ColorFunctionAutomatichow to translate data values into colors
    ColorSpaceAutomaticwhat color space to assume for the data
    ImageResolutionAutomaticthe resolution to use when exporting
    ImageSizeAutomaticthe default displayed size of the Image3D
    InterleavingTruewhether to assume channels are interleaved
    MagnificationAutomatichow to magnify the displayed Image3D
    MetaInformation{}meta-information associated with the Image3D
  • Image3D also accepts the following Raster3D options:
  • ClipRangeNonecut away a rectangular region from the view
    MethodAutomaticoptions for rendering the color cells
  • Image3D also accepts the following Graphics3D options:
  • AlignmentPointCenterthe default point in the graphic to align with
    AxesFalsewhether to draw axes
    AxesEdgeAutomaticon which edges to put axes
    AxesLabelNoneaxes labels
    AxesOriginAutomaticwhere axes should cross
    AxesStyle{}graphics directives to specify the style for axes
    BackgroundNonebackground color for the Image3D
    BaselinePositionAutomatichow to align with a surrounding text baseline
    BoxedTruewhether to draw the bounding box
    BoxRatiosAutomaticbounding 3D box ratios
    BoxStyle{}style specifications for the box
    RotationAction"Fit"how to render after interactive rotation
    SphericalRegionFalsewhether to make the circumscribing sphere fit in the final display area
    ViewAngleAutomaticangle of the field of view
    ViewCenterAutomaticpoint to display at the center
    ViewMatrixAutomaticexplicit transformation matrix
    ViewPoint{1.3,-2.4,2.}viewing position
    ViewRangeAllrange of viewing distances to include
    ViewVectorAutomaticposition and direction of a simulated camera
    ViewVertical{0,0,1}direction to make vertical
  • With the setting BoxRatios->{sx, sy, sz}, the Image3D is rendered in a box of the given side-length ratios.
  • With ColorFunction->cf, color and opacity of each voxel can be specified. An interactive color function editor is available via the Image3D contextual (right-click) menu.
  • ColorSpace->"space" specifies that values in the data should be interpreted as coordinates in a particular color space. ColorSpace->Automatic treats values as arbitrary channel intensities.
  • Bit images always have ColorSpace set to Automatic.
  • With the setting ColorSpace->"RGB", data given as is taken to include an opacity value a.
  • With the default setting Interleaving->True, Image3D[data, ...] takes data to be a 3D array of lists of channel values.
  • With Interleaving->False, Image3D[data, ...] takes data to be a list of 3D arrays of values for each channel.
  • Explicit settings for ImageSize determine the absolute size at which Image3D should be displayed.
  • With ImageSize->Automatic, the size at which the 3D image should be displayed is determined by the setting for Magnification.
  • A setting Magnification->m specifies that each displayed voxel in Image3D is magnified by a factor of m.
  • With Magnification->Automatic, smaller 3D images are typically displayed at larger magnifications, and large 3D images are reduced to fit within available notebook or other display areas.
  • Image3D[Image3D[...], opts] effectively resets the options for an Image3D.
  • ImageDimensions, ImageChannels, and ImageType find information on the structure of a 3D image.
  • Image3D[Raster3D[...]] converts a Raster3D object to a 3D image.

ExamplesExamplesopen allclose all

Basic Examples (4)Basic Examples (4)

Create a real-value 3D image from numbers in the range 0 to 1:

Click for copyable input

Create a three-channel 3D image:

Click for copyable input

Create a 3D image from a stack of images:

Click for copyable input

Import a list of images as a 3D volume:

Click for copyable input
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »