public interface MangoContext
Modifier and Type | Field and Description |
---|---|
static int |
TOOL_MODE_ADD_POINT |
static int |
TOOL_MODE_ADD_REGION |
static int |
TOOL_MODE_DRAW_ELLIPSE |
static int |
TOOL_MODE_DRAW_RECT |
static int |
TOOL_MODE_NAV |
static int |
TOOL_MODE_PAINT_ELLIPSE_EDIT |
static int |
TOOL_MODE_PAINT_ELLIPSE_ERASE |
static int |
TOOL_MODE_PAINT_ELLIPSE_PAINT |
static int |
TOOL_MODE_PAINT_RECT_EDIT |
static int |
TOOL_MODE_PAINT_RECT_ERASE |
static int |
TOOL_MODE_PAINT_RECT_PAINT |
static int |
TOOL_MODE_TRACE_LINE |
static int |
TOOL_MODE_TRACE_REGION |
static int |
TOOL_MODE_WAND_COPY |
static int |
TOOL_MODE_WAND_DILATE_ERODE |
static int |
TOOL_MODE_WAND_PRESERVE |
static int |
TOOL_MODE_WAND_REMOVE |
Modifier and Type | Method and Description |
---|---|
void |
capture()
Programmatically clicks the Toolbox camera button.
|
JButton |
createColorPickerButton(VolumeManager manager,
MangoColorSelectedListener listener,
boolean showUsedOnly)
Creates a ROI color picker widget.
|
void |
exit()
Exit the application and clear all resources.
|
List<Analysis> |
getAllAnalyses()
Returns a list of all analyses.
|
List<AnalysisPoint> |
getAllAnalysisPoints()
Returns a list of all analysis points.
|
List<VolumeManager> |
getAllVolumeManagers()
Returns a list of all the currently loaded VolumeManagers.
|
List<VolumeManager> |
getAllVolumeManagersFrom(VolumeManager manager)
Returns a list of all currently loaded VolumeManagers, starting with the specified manager.
|
String |
getBuildNumber()
Returns the Mango build number.
|
Atlas |
getCurrentAtlas()
Returns the current Atlas.
|
VolumeManager |
getCurrentVolumeManager()
Returns the currently selected VolumeManager.
|
int |
getCurrentVolumeManagerIndex()
Returns the index of the currently selected VolumeManager.
|
File |
getLibDir()
Returns the lib directory.
|
List<VolumeManager> |
getOtherVolumeManagers(VolumeManager manager)
Returns a list of all the currently loaded VolumeManagers, except the specified.
|
int |
getTool()
Returns the current ROI tool (see tool code constants).
|
String |
getVersion()
Returns the Mango version.
|
boolean |
isMultisliceMode()
Returns true if multislice mode is set, false otherwise
|
boolean |
isRadiologicalMode()
Returns true for radiological display, false for neurological display
|
boolean |
isWorldMode()
Returns true if world mode is set, false otherwise
|
ImageVolume |
makeNewVolume()
Creates a new ImageVolume.
|
VolumeManager |
makeNewVolumeManager(ImageDimensions imageDims,
VoxelDimensions voxelDims,
ImageType imageType,
ByteBuffer[] buffers,
boolean readOnly,
String name)
Create a new VolumeManager with an empty image.
|
VolumeManager |
makeNewVolumeManager(String openLocation)
Creates a new VolumeManager by loading an ImageVolume from the specified location.
|
VolumeManager |
makeNewVolumeManagerURL(String url)
Creates a new VolumeManager by loading an ImageVolume from the specified URL.
|
ProgressMeter |
makeProgressMeter()
Creates a ProgressMeter.
|
void |
runScript(String scriptName)
Runs the specified script.
|
void |
setAtlas(String name)
Sets the current Atlas.
|
void |
setCurrentVolumeManager(VolumeManager manager)
Sets the specified VolumeManager to be currently selected.
|
void |
setCurrentVolumeManagerIndex(int index)
Sets the VolumeManager at the specified index to be currently selected.
|
void |
setMultisliceMode(boolean multislice)
Sets ROI "multislice" mode.
|
void |
setRadiologicalMode(boolean radiologicalMode)
Sets radiological display mode.
|
void |
setTool(int code)
Sets the current ROI tool (see tool code constants).
|
void |
setToolRange(boolean useRange,
double min,
double max,
boolean onlyWhenShiftKeyPressed)
Sets the ROI tool intensity range.
|
void |
setToolRelativeRange(double range)
Sets the ROI tool relative range (only applies to "magic wand" Add tool).
|
void |
setWorldMode(boolean world)
Sets "world space" mode.
|
void |
updateViewers()
Redraws all the VolumeManagers.
|
static final int TOOL_MODE_ADD_POINT
static final int TOOL_MODE_ADD_REGION
static final int TOOL_MODE_DRAW_ELLIPSE
static final int TOOL_MODE_DRAW_RECT
static final int TOOL_MODE_NAV
static final int TOOL_MODE_PAINT_ELLIPSE_EDIT
static final int TOOL_MODE_PAINT_ELLIPSE_ERASE
static final int TOOL_MODE_PAINT_ELLIPSE_PAINT
static final int TOOL_MODE_PAINT_RECT_EDIT
static final int TOOL_MODE_PAINT_RECT_ERASE
static final int TOOL_MODE_PAINT_RECT_PAINT
static final int TOOL_MODE_TRACE_LINE
static final int TOOL_MODE_TRACE_REGION
static final int TOOL_MODE_WAND_COPY
static final int TOOL_MODE_WAND_DILATE_ERODE
static final int TOOL_MODE_WAND_PRESERVE
static final int TOOL_MODE_WAND_REMOVE
List<Analysis> getAllAnalyses()
List<AnalysisPoint> getAllAnalysisPoints()
void capture()
JButton createColorPickerButton(VolumeManager manager, MangoColorSelectedListener listener, boolean showUsedOnly)
manager
- the VolumeManagerlistener
- the listenershowUsedOnly
- true to enable only used ROI colors, false otherwiseList<VolumeManager> getAllVolumeManagers()
List<VolumeManager> getAllVolumeManagersFrom(VolumeManager manager)
manager
- the starting VolumeManagerString getBuildNumber()
VolumeManager getCurrentVolumeManager()
int getCurrentVolumeManagerIndex()
File getLibDir()
List<VolumeManager> getOtherVolumeManagers(VolumeManager manager)
manager
- the VolumeManager to ignoreString getVersion()
ImageVolume makeNewVolume()
VolumeManager makeNewVolumeManager(String openLocation) throws InvalidHeaderException, IOException
openLocation
- the location of a ImageVolume to loadInvalidHeaderException
IOException
VolumeManager makeNewVolumeManagerURL(String url) throws InvalidHeaderException, IOException
url
- the location of the ImageVolume to loadInvalidHeaderException
IOException
VolumeManager makeNewVolumeManager(ImageDimensions imageDims, VoxelDimensions voxelDims, ImageType imageType, ByteBuffer[] buffers, boolean readOnly, String name)
imageDims
- the image dimensionsvoxelDims
- the voxel dimensionsimageType
- the image typebuffers
- the buffer array (one per series point)readOnly
- true if the image is read-only, false otherwisename
- a name for the imageProgressMeter makeProgressMeter()
void runScript(String scriptName)
scriptName
- the name of the script to runvoid setAtlas(String name)
name
- the name of the atlas to make currentAtlas getCurrentAtlas()
void setCurrentVolumeManager(VolumeManager manager)
manager
- the VolumeManager to set as currentvoid setCurrentVolumeManagerIndex(int index)
index
- the index of the VolumeManager to set as currentvoid setMultisliceMode(boolean multislice)
multislice
- true for multislice mode, false otherwiseboolean isMultisliceMode()
boolean isWorldMode()
int getTool()
void setTool(int code)
code
- the ROI tool codevoid setToolRange(boolean useRange, double min, double max, boolean onlyWhenShiftKeyPressed)
useRange
- true to use range, false to not use rangemin
- the tool range minimummax
- the tool range maximumonlyWhenShiftKeyPressed
- only enable the range when the Shift key is depressedvoid setToolRelativeRange(double range)
range
- the range, above and below, the selected voxel valuevoid setWorldMode(boolean world)
world
- true for "world space", false otherwisevoid updateViewers()
void exit()
boolean isRadiologicalMode()
void setRadiologicalMode(boolean radiologicalMode)
radiologicalMode
- true for radiological display, false for neurological display