Class TextureSculptor

  • All Implemented Interfaces:
    java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

    public class TextureSculptor
    extends Sculptor
    Volume Sculpting for the VolumeTexture Rendering. See Sculptor.java
    Author:
    Alexandra Bokinsky, Ph.D. Under contract from Magic Software.
    See Also:
    ViewJFrameVolumeView, RayCastVolumeRenderer, ShearWarpVolumeRenderer
    • Field Detail

      • kImageAref

        private ModelImage kImageAref
        References to the sculpt images.
      • kImageBref

        private ModelImage kImageBref
        DOCUMENT ME!
      • m_kSurface

        private SurfaceRender m_kSurface
        Reference to the SurfaceRender containing the TextureVolume:.
    • Constructor Detail

      • TextureSculptor

        public TextureSculptor​(SurfaceRender kSurface)
        Constructor:
        Parameters:
        kSurface - DOCUMENT ME!
    • Method Detail

      • applySculpt

        public boolean applySculpt()
        applySculpt: called by ViewJFrameVolumeView when the user presses the "Apply Sculpt" button. This function has several steps: 1. Getting the ModelImage volume data and correctly calculating the center of the volume and the spacing of the volume. 2. Calculating the viewing Transformations. 3. Determining which voxels in the volume fall within the sculpt region drawn on the screen, and setting those values to the minimum voxel value.
        Specified by:
        applySculpt in class Sculptor
        Returns:
        DOCUMENT ME!
      • clearSculpt

        public void clearSculpt()
        clearSculpt: called by ViewJFrameVolumeView when the user presses the "Clear Ouline" button, clearing the sculpt outline from the canvas image. The function disables sculpting and reactivates the mouse events for the m_kSurfaceRenderer.
        Overrides:
        clearSculpt in class Sculptor
      • enableSculpt

        public void enableSculpt​(boolean bEnabled)
        enableSculpt: called by the ViewJFrameVolumeView object when the Draw Sculpt button is pressed. This function deactivates the m_kSurfaceRender's mouse response, so the mouse can be used to draw the sculpt outline.
        Overrides:
        enableSculpt in class Sculptor
        Parameters:
        bEnabled - DOCUMENT ME!
      • finalize

        public void finalize()
        DOCUMENT ME!
        Overrides:
        finalize in class Sculptor
      • save

        public boolean save​(FileWriteOptions options,
                            int filterType)
        Creates save dialog so that the image can be saved // This should be moved to imageModel.save();
        Parameters:
        options - File-write options.
        filterType - only used if >= 0
        Returns:
        DOCUMENT ME!
      • undoSculpt

        public void undoSculpt()
        undoSculpt: called by the ViewJFrameVolumeView object when the user presses the "Undo Sculpt" button. It resets the volume data back to the original values, using the data stored in the m_aiImage_backup data members.
        Specified by:
        undoSculpt in class Sculptor
      • update

        public void update()
        Update the underlying volume and rerender. This function is called when the volume has changed.
        Specified by:
        update in class Sculptor