Class VOILatticeManagerInterface

    • Field Detail

      • doAnnotations

        private boolean doAnnotations
      • doAutomaticLabels

        private boolean doAutomaticLabels
      • mouseSelection3D

        private boolean mouseSelection3D
      • VoxelSize

        public static float VoxelSize
      • defaultVoxelSize

        private javax.swing.JTextField defaultVoxelSize
      • updateVoxelSize

        private javax.swing.JDialog updateVoxelSize
      • movingPickedPoint

        private boolean movingPickedPoint
      • isShiftSelected

        private boolean isShiftSelected
    • Constructor Detail

      • VOILatticeManagerInterface

        public VOILatticeManagerInterface​(VOIManagerInterfaceListener kParent,
                                          ModelImage kImageA,
                                          ModelImage kImageB,
                                          int iNViews,
                                          boolean bGPU,
                                          javax.swing.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 Detail

      • actionPerformed

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

        public java.lang.String getAnnotationPrefix()
      • setAnnotationPrefix

        public void setAnnotationPrefix​(java.lang.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​(java.lang.String directory,
                                java.lang.String fileName)
      • saveLattice

        public void saveLattice​(java.lang.String directory,
                                java.lang.String fileName)
      • openNeuriteCurves

        public void openNeuriteCurves​(java.lang.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​(java.lang.String dir,
                                             ModelImage image)
      • openAnnotations

        public void openAnnotations​(java.lang.String directory,
                                    java.lang.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 java.util.Vector<VOIWormAnnotation> getPickedAnnotation()
      • moveSelectedPoint

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

        public void updateSelectedPoint​(java.awt.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​(java.lang.String dir)
      • updateManager

        public void updateManager​(int index,
                                  int orientation)
      • 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​(java.util.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 java.util.Vector<java.lang.String> getSplineCurves()
      • setCurveVisible

        public void setCurveVisible​(java.lang.String name,
                                    boolean visible)
      • setCurveName

        public void setCurveName​(java.lang.String oldName,
                                 java.lang.String newName)
      • setCurveSelected

        public void setCurveSelected​(java.lang.String name,
                                     boolean selected)
      • isCurveSelected

        public boolean isCurveSelected​(java.lang.String name)
      • deleteSelectedCurve

        public void deleteSelectedCurve()
      • getLatticePickedPoint

        public WildMagic.LibFoundation.Mathematics.Vector3f getLatticePickedPoint()
      • 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)
      • 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)
      • setVoxelSize

        private void setVoxelSize()
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class VOIManagerInterface
      • keyPressed

        public void keyPressed​(java.awt.event.KeyEvent e)
      • keyReleased

        public void keyReleased​(java.awt.event.KeyEvent e)
      • findNearestAnnotation

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