Class VOILatticeManagerInterface

java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.VOI.VOIManagerInterface
gov.nih.mipav.view.renderer.WildMagic.VOI.VOILatticeManagerInterface
All Implemented Interfaces:
VOIListener, VOIVectorListener, VOIHandlerInterface, ActionListener, MouseListener, MouseMotionListener, EventListener, MouseInputListener

public class VOILatticeManagerInterface extends VOIManagerInterface
  • Field Details

    • doAnnotations

      private boolean doAnnotations
    • doAutomaticLabels

      private boolean doAutomaticLabels
    • mouseSelection3D

      private boolean mouseSelection3D
    • VoxelSize

      public static float VoxelSize
    • latticeModel

      private LatticeModel latticeModel
    • defaultVoxelSize

      private JTextField defaultVoxelSize
    • updateVoxelSize

      private JDialog updateVoxelSize
    • movingPickedPoint

      private boolean movingPickedPoint
    • isShiftSelected

      private boolean isShiftSelected
  • Constructor Details

    • VOILatticeManagerInterface

      public VOILatticeManagerInterface(VOIManagerInterfaceListener kParent, ModelImage kImageA, ModelImage kImageB, int iNViews, boolean bGPU, ButtonGroup kVOIGroup)
      Creates a VOIManagerInterface object.
      Parameters:
      kParent - the parent frame, must be a VOIManagerInterfaceListener
      kImageA - imageA
      kImageB - imageB
      iNViews - number of views displayed in the parent.
      bGPU - set to true if this VOIManagerInterface is part of the GPU-based Volume Renderer.
      kVOIGroup - for ViewJFrameImage and ViewJFrameTriImage, so the VOI Toolbar can be part of a larger button group.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class VOIManagerInterface
    • getAnnotationPrefix

      public String getAnnotationPrefix()
    • setAnnotationPrefix

      public void setAnnotationPrefix(String s)
    • getCurrentIndex

      public int getCurrentIndex()
    • colorAnnotations

      public void colorAnnotations(boolean setColor)
    • removeListeners

      public void removeListeners()
    • addAnnotationListener

      public void addAnnotationListener(AnnotationListener listener)
      Adds an annotation listener to the latticeModel.
      Parameters:
      listener -
    • addCurveListener

      public void addCurveListener(CurveListener listener)
    • addLatticeListener

      public void addLatticeListener(LatticeListener listener)
    • editAnnotations

      public void editAnnotations(boolean automaticLabels)
      Enable editing annotations in either 3D or 2D windows with the mouse.
      Parameters:
      automaticLabels - if true the labels are created with numbers only (no leading 'A' for annotation).
    • isEditAnnotations

      public boolean isEditAnnotations()
    • doAutomaticLabels

      public boolean doAutomaticLabels()
      Returns the automatic labels flag.
      Returns:
    • editLattice

      public void editLattice()
    • editClip

      public void editClip()
    • openLattice

      public void openLattice(String directory, String fileName)
    • saveLattice

      public void saveLattice(String directory, String fileName)
    • openNeuriteCurves

      public void openNeuriteCurves(String dir)
    • saveNeuriteCurves

      public void saveNeuriteCurves()
    • setLattice

      public void setLattice(VOIVector lattice)
    • untwistTest

      public ModelImage[] untwistTest(VolumeImage[] stack)
      Untwists the worm image quickly for the preview mode - without saving any images or statistics
      Returns:
      untwisted image.
    • untwistAnnotations

      public ModelImage untwistAnnotations(String dir, ModelImage image)
    • openAnnotations

      public void openAnnotations(String directory, String fileName)
    • addAnnotations

      public void addAnnotations(VOIVector annotations)
    • setAnnotations

      public void setAnnotations(VOIVector annotations)
    • setAnnotations

      public void setAnnotations(VOI annotations)
    • add3DMarker

      public void add3DMarker(VOI textVOI, boolean automaticLabel, boolean multiSelect)
    • isShift

      public boolean isShift()
    • add3DMarker

      public void add3DMarker(VOI textVOI, boolean automaticLabel, boolean multiSelect, boolean isShift)
    • clear3DSelection

      public void clear3DSelection()
    • flipLattice

      public void flipLattice()
    • is3DSelectionEnabled

      public boolean is3DSelectionEnabled()
    • select3DMarker

      public boolean select3DMarker(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt, boolean rightMouse, boolean multiSelect, boolean isShift)
    • modify3DMarker

      public boolean modify3DMarker(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt)
    • deleteSelectedPoint

      public void deleteSelectedPoint()
    • hasSelectedPoint

      public boolean hasSelectedPoint()
    • getPickedAnnotation

      public Vector<VOIWormAnnotation> getPickedAnnotation()
    • moveSelectedPoint

      public void moveSelectedPoint(WildMagic.LibFoundation.Mathematics.Vector3f direction)
    • updateSelectedPoint

      public void updateSelectedPoint(Color color)
    • setImage

      public void setImage(ModelImage imageA, ModelImage imageB)
      Set the new imageA and imageB for creating VOIs.
      Parameters:
      imageA -
      imageB -
    • setSharedDirectory

      public void setSharedDirectory(String dir)
    • updateManager

      public void updateManager(int index, int orientation)
    • initVOIManagers

      protected void initVOIManagers(int iNViews)
      Overrides:
      initVOIManagers in class VOIManagerInterface
    • redoVOIs

      protected void redoVOIs()
      Overrides:
      redoVOIs in class VOIManagerInterface
    • undoVOIs

      protected void undoVOIs()
      Overrides:
      undoVOIs in class VOIManagerInterface
    • deleteAnnotations

      public void deleteAnnotations()
    • showModel

      public void showModel(boolean display)
    • isModelDisplayed

      public boolean isModelDisplayed()
    • updateCrossSection

      public void updateCrossSection(boolean useSpline, boolean ellipse, float percent)
    • showLattice

      public void showLattice(boolean display)
    • showLatticeLabels

      public void showLatticeLabels(boolean display)
    • setLatticeClip

      public void setLatticeClip(boolean clip, int position)
    • generateTriMesh

      public WildMagic.LibGraphics.SceneGraph.TriMesh generateTriMesh(int stepsize)
    • setPaddingFactor

      public void setPaddingFactor(int padding)
    • addSplineControlPts

      public void addSplineControlPts(Vector<VOIWormAnnotation> controlPts)
    • addAnnotation

      public void addAnnotation(VOI textVOI, boolean multiSelect)
      Add an annotation to the latticeModel.
      Parameters:
      textVOI - new annotation.
    • addAnnotation

      public void addAnnotation(VOI textVOI)
      Add an annotation to the latticeModel.
      Parameters:
      textVOI - new annotation.
    • getAnnotations

      public VOI getAnnotations()
      Returns list of annotations from lattice model.
      Returns:
      latticeModel annotations.
    • getAnnotationsStraight

      public VOI getAnnotationsStraight()
    • getSplineCurves

      public Vector<String> getSplineCurves()
    • setCurveVisible

      public void setCurveVisible(String name, boolean visible)
    • setCurveName

      public void setCurveName(String oldName, String newName)
    • setCurveSelected

      public void setCurveSelected(String name, boolean selected)
    • isCurveSelected

      public boolean isCurveSelected(String name)
    • deleteSelectedCurve

      public void deleteSelectedCurve()
    • getLatticePickedPoint

      public WildMagic.LibFoundation.Mathematics.Vector3f getLatticePickedPoint()
    • getLattice

      public VOIVector getLattice()
    • getLatticeCurveLength

      public int getLatticeCurveLength()
    • getLatticeStraight

      public VOIVector getLatticeStraight()
    • isPreview

      public boolean isPreview()
    • setPreviewMode

      public void setPreviewMode(boolean preview, VOIVector lattice, VOI annotations)
    • retwistAnnotations

      public VOI retwistAnnotations(VOIVector lattice)
    • retwistLattice

      public VOIVector retwistLattice(VOIVector lattice)
    • addLeftRightMarker

      private void addLeftRightMarker(VOI textVOI, boolean isShift)
    • addVOI

      public void addVOI(VOIBase kNew, boolean bQuickLUT, boolean bUpdate, boolean isFinished)
      Description copied from class: VOIManagerInterface
      Add a new VOIBase. This function should only be called from VOIManager when a new VOIBase is created with the mouse.
      Overrides:
      addVOI in class VOIManagerInterface
      Parameters:
      kNew - the new VOIBase to add.
      bQuickLUT - true if this is a QuickLUT VOI.
      bUpdate - when true call updateDisplay() after the VOIBase is added
      isFinished - true if this VOIBase is complete, used for open contours.
    • modifyLattice

      private boolean modifyLattice(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt)
    • selectLattice

      private boolean selectLattice(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt, boolean isShift)
    • modifyAnnotations

      private boolean modifyAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f pt)
    • selectAnnotations

      private boolean selectAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt, boolean rightMouse, boolean multiSelect)
    • updateAnnotation

      public void updateAnnotation(VOIText annotation)
    • updateLattice

      public void updateLattice(boolean isLeft, VOIWormAnnotation text, VOIWormAnnotation newText)
    • setVoxelSize

      private void setVoxelSize()
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Specified by:
      mouseReleased in interface MouseListener
      Overrides:
      mouseReleased in class VOIManagerInterface
    • keyPressed

      public void keyPressed(KeyEvent e)
    • keyReleased

      public void keyReleased(KeyEvent e)
    • findNearestAnnotation

      public static VOIBase findNearestAnnotation(VOI annotations, WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt)