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
-
Nested Class Summary
Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.WildMagic.VOI.VOIManagerInterface
VOIManagerInterface.OkColorListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JTextFieldprivate booleanprivate booleanprivate booleanprivate LatticeModelprivate booleanprivate booleanprivate JDialogstatic floatFields inherited from class gov.nih.mipav.view.renderer.WildMagic.VOI.VOIManagerInterface
colorChooser, currentColor, imageStatList, listenerList, m_kCurrentVOIGroup, m_kImageA, m_kImageB, m_kParent, m_kRedoList, m_kUndoList, m_kVOIDialog, m_kVOIManagers, popup, popupPt, renderer, saveGroup, voiMenu, voiMenuBuilder -
Constructor Summary
ConstructorsConstructorDescriptionVOILatticeManagerInterface(VOIManagerInterfaceListener kParent, ModelImage kImageA, ModelImage kImageB, int iNViews, boolean bGPU, ButtonGroup kVOIGroup) Creates a VOIManagerInterface object. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) voidadd3DMarker(VOI textVOI, boolean automaticLabel, boolean multiSelect) voidadd3DMarker(VOI textVOI, boolean automaticLabel, boolean multiSelect, boolean isShift) voidaddAnnotation(VOI textVOI) Add an annotation to the latticeModel.voidaddAnnotation(VOI textVOI, boolean multiSelect) Add an annotation to the latticeModel.voidaddAnnotationListener(AnnotationListener listener) Adds an annotation listener to the latticeModel.voidaddAnnotations(VOIVector annotations) voidaddCurveListener(CurveListener listener) voidaddLatticeListener(LatticeListener listener) private voidaddLeftRightMarker(VOI textVOI, boolean isShift) voidaddSplineControlPts(Vector<VOIWormAnnotation> controlPts) voidAdd a new VOIBase.voidvoidcolorAnnotations(boolean setColor) voidvoidvoidbooleanReturns the automatic labels flag.voideditAnnotations(boolean automaticLabels) Enable editing annotations in either 3D or 2D windows with the mouse.voideditClip()voidstatic VOIBasefindNearestAnnotation(VOI annotations, WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt) voidWildMagic.LibGraphics.SceneGraph.TriMeshgenerateTriMesh(int stepsize) Returns list of annotations from lattice model.intintWildMagic.LibFoundation.Mathematics.Vector3fbooleanprotected voidinitVOIManagers(int iNViews) booleanbooleanisCurveSelected(String name) booleanbooleanbooleanbooleanisShift()voidvoidbooleanmodify3DMarker(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt) private booleanmodifyAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f pt) private booleanmodifyLattice(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt) voidvoidmoveSelectedPoint(WildMagic.LibFoundation.Mathematics.Vector3f direction) voidopenAnnotations(String directory, String fileName) voidopenLattice(String directory, String fileName) voidopenNeuriteCurves(String dir) protected voidredoVOIs()voidretwistAnnotations(VOIVector lattice) retwistLattice(VOIVector lattice) voidsaveLattice(String directory, String fileName) voidbooleanselect3DMarker(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt, boolean rightMouse, boolean multiSelect, boolean isShift) private booleanselectAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt, boolean rightMouse, boolean multiSelect) private booleanselectLattice(WildMagic.LibFoundation.Mathematics.Vector3f startPt, WildMagic.LibFoundation.Mathematics.Vector3f endPt, WildMagic.LibFoundation.Mathematics.Vector3f pt, boolean isShift) voidvoidsetAnnotations(VOI annotations) voidsetAnnotations(VOIVector annotations) voidsetCurveName(String oldName, String newName) voidsetCurveSelected(String name, boolean selected) voidsetCurveVisible(String name, boolean visible) voidsetImage(ModelImage imageA, ModelImage imageB) Set the new imageA and imageB for creating VOIs.voidsetLattice(VOIVector lattice) voidsetLatticeClip(boolean clip, int position) voidsetPaddingFactor(int padding) voidsetPreviewMode(boolean preview, VOIVector lattice, VOI annotations) voidsetSharedDirectory(String dir) private voidvoidshowLattice(boolean display) voidshowLatticeLabels(boolean display) voidshowModel(boolean display) protected voidundoVOIs()untwistAnnotations(String dir, ModelImage image) untwistTest(VolumeImage[] stack) Untwists the worm image quickly for the preview mode - without saving any images or statisticsvoidupdateAnnotation(VOIText annotation) voidupdateCrossSection(boolean useSpline, boolean ellipse, float percent) voidupdateLattice(boolean isLeft, VOIWormAnnotation text, VOIWormAnnotation newText) voidupdateManager(int index, int orientation) voidupdateSelectedPoint(Color color) Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.VOI.VOIManagerInterface
addedCurve, addedVOI, addVOIManager, addVOIUpdateListener, algorithmPerformed, clearUndoRedo, colorChanged, deleteSelectedVOI, deleteVOI, deleteVOIs, disposeLocal, doVOI, extractNumber, fireVOISelectionChange, fireVOISelectionChange, getActiveImage, getBufferFloat, getBufferInt, getBufferShort, getByte, getComponentImage, getPointerButton, getToolBar, getVOI_ID, getVOIManager, getVOIManagerNum, getVOIState, graph25VOI_CalcInten, isNewVoiNeeded, loadAllImageJVOIsFrom, loadAllVOIsFrom, make3DVOI, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, moveVOI, moveVOI, newVOI, newVOI, pasteVOI, propVOI, propVOIAll, quickLUT, removedCurve, removedVOI, removeVOIManager, removeVOIUpdateListener, resetLivewire, saveVOIs, selectAllVOIs, selectedVOI, setActive, setButtonColor, setCenter, setCenter, setCursor, setDefaultCursor, setEnabled, setOpacity, setPointerButton, setPresetHue, setRenderer, setSelectedVOI, setVOI_IDs, setVOIState, setVOITools, showColorDialog, showCurvatureInfo, showIntensityInfo, showStatisticsCalculator, showVOIProperties, updateDisplay, updateGraph, vectorSelected
-
Field Details
-
doAnnotations
private boolean doAnnotations -
doAutomaticLabels
private boolean doAutomaticLabels -
mouseSelection3D
private boolean mouseSelection3D -
VoxelSize
public static float VoxelSize -
latticeModel
-
defaultVoxelSize
-
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 VOIManagerInterfaceListenerkImageA- imageAkImageB- imageBiNViews- 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
- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classVOIManagerInterface
-
getAnnotationPrefix
-
setAnnotationPrefix
-
getCurrentIndex
public int getCurrentIndex() -
colorAnnotations
public void colorAnnotations(boolean setColor) -
removeListeners
public void removeListeners() -
addAnnotationListener
Adds an annotation listener to the latticeModel.- Parameters:
listener-
-
addCurveListener
-
addLatticeListener
-
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
-
saveLattice
-
openNeuriteCurves
-
saveNeuriteCurves
public void saveNeuriteCurves() -
setLattice
-
untwistTest
Untwists the worm image quickly for the preview mode - without saving any images or statistics- Returns:
- untwisted image.
-
untwistAnnotations
-
openAnnotations
-
addAnnotations
-
setAnnotations
-
setAnnotations
-
add3DMarker
-
isShift
public boolean isShift() -
add3DMarker
-
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
-
moveSelectedPoint
public void moveSelectedPoint(WildMagic.LibFoundation.Mathematics.Vector3f direction) -
updateSelectedPoint
-
setImage
Set the new imageA and imageB for creating VOIs.- Parameters:
imageA-imageB-
-
updateManager
public void updateManager(int index, int orientation) -
initVOIManagers
protected void initVOIManagers(int iNViews) - Overrides:
initVOIManagersin classVOIManagerInterface
-
redoVOIs
protected void redoVOIs()- Overrides:
redoVOIsin classVOIManagerInterface
-
undoVOIs
protected void undoVOIs()- Overrides:
undoVOIsin classVOIManagerInterface
-
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
-
addAnnotation
Add an annotation to the latticeModel.- Parameters:
textVOI- new annotation.
-
addAnnotation
Add an annotation to the latticeModel.- Parameters:
textVOI- new annotation.
-
getAnnotations
Returns list of annotations from lattice model.- Returns:
- latticeModel annotations.
-
getAnnotationsStraight
-
getSplineCurves
-
setCurveVisible
-
setCurveName
-
setCurveSelected
-
isCurveSelected
-
deleteSelectedCurve
public void deleteSelectedCurve() -
getLatticePickedPoint
public WildMagic.LibFoundation.Mathematics.Vector3f getLatticePickedPoint() -
getLattice
-
getLatticeCurveLength
public int getLatticeCurveLength() -
getLatticeStraight
-
isPreview
public boolean isPreview() -
setPreviewMode
-
retwistAnnotations
-
retwistLattice
-
addLeftRightMarker
-
addVOI
Description copied from class:VOIManagerInterfaceAdd a new VOIBase. This function should only be called from VOIManager when a new VOIBase is created with the mouse.- Overrides:
addVOIin classVOIManagerInterface- Parameters:
kNew- the new VOIBase to add.bQuickLUT- true if this is a QuickLUT VOI.bUpdate- when true call updateDisplay() after the VOIBase is addedisFinished- 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
-
updateLattice
-
setVoxelSize
private void setVoxelSize() -
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classVOIManagerInterface
-
keyPressed
-
keyReleased
-
findNearestAnnotation
-