Class SoImageDataAdapter

    • Field Detail

      • interpretation

        public final SoSFEnum<SoImageDataAdapter.Interpretations> interpretation
        Image Interpretation Default is VALUE. This field defines the way the data values in the image should be interpreted. Some engines require their input image to have a specific interpretation type and give an error if the interpretation type is incorrect. Engines automatically set the appropriate interpretation type in their output image(s). The application is responsible for setting the appropriate interpretation type in images created by the application, for example if a mask image is loaded from disk. .
      • extent

        public final SoSFBox3f extent
        The extent and orientation fields define the position, size and orientation of the image in 3D (typicallly the physical space). The extent field defines an axis aligned box in 3D. It has a 'min' corner, which is the image origin, and a 'max' corner. The orientation field defines a rotation around the image origin.

        If the image is loaded from a file format that specifies a physical extent and/or orientation (for example DICOM), then these fields are initialized with the information specifies in the image file. If no extent is specified, then the extent field is set to (0, 0, 0, sizeX, sizeY, sizeZ). If no rotation is specified, then the orientation field is set to identity. The application can set either or both of these fields as needed.

        The voxel size is the extent divided by the image dimensions (see getSize()).

    • Method Detail

      • getOrigin

        public SbVec3f getOrigin()
        Returns the image origin in 3D. The image origin is the "min" corner of the image extent.
      • getVoxelSize

        public SbVec3f getVoxelSize()
        Returns the size of a voxel in 3D. The voxel size is the extent divided by the image dimensions (see getSize()).
      • getRowDirection

        public SbVec3f getRowDirection()
        Returns the vector in physical coordinate that points from the origin (0,0,0) to the point (1,0,0). The vector is normalized.
      • getExtent

        public SbBox3f getExtent()
        Returns the extent of the image in 3D. Convenience method to get the value of the extent field.
      • setOrigin

        public void setOrigin​(SbVec3f origin)
        Sets the image origin in 3D. Modifies the "min" corner of the image extent. The width and height of the extent are unchanged and therefore the voxel size is unchanged.
      • setVoxelSize

        public void setVoxelSize​(SbVec3f voxelSize)
        Sets the voxel size in 3D. The extent field is automatically updated to be voxel size times the image dimensions (see getSize()).
      • setDirection

        public void setDirection​(SbVec3f rowDirection,
                                 SbVec3f columnsDirection)
        Set the direction cosines of rows and columns. The row direction is a vector that points from the origin to the point (1,0,0). The column direction is a vector that points from the origin to the point (0,1,0).

        In the DICOM standard, this information corresponds to the tag "Image Orientation (Patient) (0020,0037)"

      • getColumnDirection

        public SbVec3f getColumnDirection()
        Returns the vector in physical coordinate that points from the origin (0,0,0) to the point (0,1,0). The vector is normalized.
      • getIndexToPhysicalTransformation

        public SbMatrix getIndexToPhysicalTransformation()
        Returns the transformation that maps a position in the image coordinate system to a position in the physical coordinate system.
      • getSize

        public SbVec4i32 getSize()
        Returns a vector representing the dimensions of the image data. Indices 0, 1 and 2 refer to width, height and depth of image. Index 3 refers to timestep. For a 2D image index 2 is 1.
      • getPlaneDirection

        public SbVec3f getPlaneDirection()
        Returns the vector in physical coordinate that points from the origin (0,0,0) to the point (0,0,1). The vector is normalized.
      • getImageDataType

        public SbImageDataType getImageDataType()
        Returns the data type of the image.