VivoQuant
|
Object to interact with the 3D ROI Operator when it is active. More...
Public Slots | |
void | addLayer (string name, bool hidden=false, int alphaSlice=127) |
Adds a new layer to the end of the current layer list. More... | |
void | editLayer (int id, string name, bool hidden=false, int alphaSlice=127) |
Edits various layer properties such as name, alpha. More... | |
void | deleteLayer (int id=-1, int target=-1, int targetMovePolicy=ROIObject::respectImmutable) |
Removes a layer from the list of layers and reassigns all its ROIs. More... | |
void | deleteLayerToROI (int id, int targetROI, int targetLayer, int targetMovePolicy=ROIObject::respectImmutable) |
Removes a layer from the list of layers and reassigns all its ROIs. More... | |
void | deleteLayers (Array< int > indices, int target=-1, int targetMovePolicy=ROIObject::respectImmutable) |
Delete multiple layers. More... | |
void | clearLayer (int id=-1) |
Reassigns all ROIs of a layer. More... | |
void | clearLayers (Array< int > indices) |
Clears multiple layers. More... | |
void | addROI (string name, string colorName, bool immutable=false, bool hidden=false, int alphaSlice=127, int alphaSurface=255) |
Adds a new ROI to the end of the current ROI list on the current active layer. More... | |
void | addROI (int layerID, string name, string colorName, bool immutable=false, bool hidden=false, int alphaSlice=127, int alphaSurface=255) |
Adds a new ROI to the end of the current ROI list on the specified layer. More... | |
void | editROI (int id, string name, string colorName, bool immutable=false, bool hidden=false, int alphaSlice=127, int alphaSurface=255, string layer="") |
Edits various ROI properties such as name, color on the current active layer. More... | |
void | editROI (int layerID, int id, string name, string colorName, bool immutable=false, bool hidden=false, int alphaSlice=127, int alphaSurface=255, string layer="") |
Edits various ROI properties such as name, color on the specified layer. More... | |
void | deleteROI (int id=-1, int targetROI=-1, int targetLayer=-1, int movePolicy=ROIObject::respectImmutable) |
Removes an ROI from the ROI list and reassigns all its voxels. More... | |
void | clearROI (int id=-1, int targetROI=-1, int targetLayer=-1, int movePolicy=ROIObject::respectImmutable) |
Reassigns all voxels of an ROI. More... | |
void | clearAll () |
Reassigns the voxels of every ROI to the background. | |
void | clearAllROIs () |
Deletes all ROIs and removes them from the ROI List. | |
void | exportTable (string filename="", bool openFile=true) |
Exports a table of selected metrics for ROIs; e.g. Volume, Sum. More... | |
void | showTable (bool quick=false) |
Displays a table of selected metrics for ROIs that have been created; e.g. Volume, Sum. More... | |
void | showHistogram () |
Displays histogram GUI that depicts signal intensity of a given selected ROI. | |
void | saveROI (string filename, string compression="RLE") |
Save an ROI to Disk. More... | |
void | saveLayer (string filename, int layerID=-1, string compression="RLE") |
Save an ROI Layer to Disk. More... | |
bool | saveROIsAsRTSTRUCT (string filename, bool quiet=false) |
Saves all ROIs in an RTSTRUCT DICOM. The DICOM will be defined with respect to the currently loaded reference image. More... | |
void | setSortContourImportByVolume (bool sortByVolume) |
Sets whether ROIs imported from an RTSTRUCT file are sorted by volume. More... | |
void | deleteROIs (Array< int > indices, int targetROI=-1, int targetLayer=-1, int movePolicy=ROIObject::respectImmutable) |
Delete multiple ROIs. More... | |
void | clearROIs (Array< int > indices, int targetROI=-1, int targetLayer=-1, int movePolicy=ROIObject::respectImmutable) |
Clears multiple ROIs. More... | |
void | exportROIs (Array< int > exportROIs) |
Exports an ROI (or group of ROIs) as a Volume in the Data Manager. More... | |
void | toggleHidden (Array< int > indices) |
Toggles the hidden attribute of ROI(s) More... | |
void | toggleImmutable (Array< int > indices) |
Toggles the immutable attribute of ROI(s) More... | |
void | cutROI (bool bg, bool quiet=false, Array< Index > list=Array< Index >()) |
Removes regions of the volumes. More... | |
void | submitROI (bool quiet=false, bool allMetric=false) |
Submit the ROIs to the associated data on the iPACS. More... | |
void | submitROIAsRTSTRUCTNotQuiet () |
Submit the ROIs as RTSTRUCT to the associated data on the iPACS. If it is possible to use the coordinate space of the original image before resampling and quiet is false, the user will be asked their preference. More... | |
void | submitLayer (bool quiet=false, bool allMetric=false, int layerID=-1) |
Submit the ROIs of the specified layer to the associated data on the iPACS. More... | |
void | loadROIFromIPACS (bool quiet=false) |
Download the ROIs from associated data on the iPACS. More... | |
void | loadLayerFromIPACS (bool quiet=false, int layerID=-1) |
Download the ROIs into the specified layer from the associated data on the iPACS. More... | |
void | loadRTStructureAsROI (string filename) |
Use DicomReader to load an ROI in the RT Structure Set format specified by the Dicom standard and used by the Siemens IRW. More... | |
void | loadVOIAsROI (string filename) |
Support for PMOD region of interest files. More... | |
void | kMeansManualSeedCluster (string kmeans) |
a helper function to set the seed mean value for manual k-means segmentation More... | |
void | exportToVolume () |
Export an ROI to the DataManager as an image. | |
void | copyLayerToClipboard () |
void | pasteROIFromClipboard (bool quite=false) |
Public Member Functions | |
void | loadROI (string filename) |
Loads a .rmha file from disk into the 3D ROI Operator. More... | |
void | loadLayer (string filename, int layerID=-1) |
Loads a .rmha file from disk into the 3D ROI Operator. More... | |
string | getROICenterOfMass (unsigned char id) |
Returns the geometric center of mass of an ROI. More... | |
double | getROIVolume (unsigned char id) |
Returns the volume of a ROI. More... | |
double | get2DROIVolumeEstimation (unsigned char id, unsigned char planeId, unsigned int px1, unsigned int py1, unsigned int px2, unsigned int py2, unsigned int sections=20) |
Returns the Modified Simpson's approach for volume estimation of a 2D ROI on a given plane. More... | |
Array< int > | getROIContourPoints (unsigned char id, unsigned char planeId) |
Returns the outline points of an ROI on the current slice of a given plane. More... | |
Array< string > | getSplinePath (int id, bool interpolated=false) |
Returns the current spline points when using the spline tool. More... | |
void | setSplinePath (int id, Array< string > list, bool closed=false) |
Sets spline points in the spline tool. More... | |
bool | canSaveRTSTRUCTAsOriginal () |
Returns whether or not the image's original voxel sizes can be used when saving RTSTRUCTs. More... | |
int | numROIs () |
Returns the number of ROIs in the current layer. More... | |
int | numTotalROIs () |
Returns the number of ROIs currently in the operator (all layers) More... | |
int | numLayers () |
Returns the number of layers currently in the operator. More... | |
Array< string > | getROIDetails (int i) |
Returns various details regarding the display of an ROI. More... | |
Array< string > | getLayerDetails (int i) |
Returns various details regarding the display of a layer. More... | |
void | setInputROI (int roiIdx) |
Sets the input ROI for the Segmentation Tools. More... | |
void | setInputROI (int layerId, int roiIdx) |
Sets the input ROI for the Segmentation Tools. More... | |
void | setCurrentROI (int i) |
Sets the currently selected ROI in the 3D ROI Operator. More... | |
void | setCurrentLayer (int i) |
Sets the currently selected layer in the 3D ROI Operator. More... | |
void | submitROIAsRTSTRUCT (bool quiet=false, bool allMetric=false) |
Submit the ROIs as RTSTRUCT to the associated data on the iPACS. More... | |
Protected Member Functions | |
void | setROIViewMode (string mode) |
Set ROI painting mode. More... | |
void | drawSphere (int x, int y, int z, float radius, int roi_id, bool updateDisplay=true) |
Draws a ROI sphere at a given point. More... | |
void | drawCircle (int plane, int x, int y, int z, float radius, int roi_id, bool updateDisplay=true) |
Draws a ROI circle at a given point. More... | |
void | drawCube (int x, int y, int z, float radius, int roi_id, bool updateDisplay=true) |
Draws a ROI cube at a given point. More... | |
void | drawRect (int plane, int x, int y, int z, float radius, int roi_id, bool updateDisplay=true) |
Draws a ROI square at a given point. More... | |
void | drawCylinder (int plane, int x, int y, int z, float radius, float height, int roi_id, bool updateDisplay=true) |
Draws a ROI square at a given point. More... | |
void | resizeROI (int layerID=-1) |
Object to interact with the 3D ROI Operator when it is active.
This object can be used to interact with Regions Of Interest (ROIs) when the 3D ROI Tool Operator is loaded.
ROIs are index starting with the background at 0 See also ScriptMaster::currentOp() to obtain this object and MainWin::setViewMode() to enter the 3D ROI Operator
|
slot |
Adds a new layer to the end of the current layer list.
name | Name of the layer |
hidden | Hide the layer or not |
alphaSlice | Alpha of the layer in the slice view (0-255) |
|
slot |
Adds a new ROI to the end of the current ROI list on the specified layer.
layerID | the layer to which the ROI should be added to |
name | Name of the ROI |
colorName | Color of the ROI. |
immutable | Make the ROI Immutable or not |
hidden | Hide the ROI or not |
alphaSlice | Alpha of the ROI in the slice view (0-255) |
alphaSurface | Alpha of the ROI in the VTK viewer (0-255) |
|
slot |
Adds a new ROI to the end of the current ROI list on the current active layer.
name | Name of the ROI |
colorName | Color of the ROI. |
immutable | Make the ROI Immutable or not |
hidden | Hide the ROI or not |
alphaSlice | Alpha of the ROI in the slice view (0-255) |
alphaSurface | Alpha of the ROI in the VTK viewer (0-255) |
bool canSaveRTSTRUCTAsOriginal | ( | ) |
Returns whether or not the image's original voxel sizes can be used when saving RTSTRUCTs.
|
slot |
Reassigns all ROIs of a layer.
id | Index of layer to clear |
|
slot |
Clears multiple layers.
indices | Array of indicies to clear |
|
slot |
Reassigns all voxels of an ROI.
id | Index of ROI to clear |
targetROI | Index of ROI to recieve id's voxels |
targetLayer | Index of layer to recieve id's voxels |
|
slot |
Clears multiple ROIs.
indices | Array of indicies to clear |
targetROI | Destination ROI for voxels in indicies |
targetLayer | Destination layer for voxels in indicies |
|
slot |
Copy active layer to Clipboard. this function can be used to copy ROI between layers or VQ instances.
|
slot |
Removes regions of the volumes.
bg | If true, removes all voxels in active volumes in the background ROI. If false, removes voxels in the current ROI |
quiet | If true, does not give a warning |
|
slot |
Removes a layer from the list of layers and reassigns all its ROIs.
id | Index of layer to delete |
target | Index of layer to recieve id's from deleted ROIs |
targetMovePolicy | is 0=replace, 1=no overwrite (keep target), 2=respect immutable status of target (default), 3=make new ROIs from overlap |
|
slot |
Delete multiple layers.
indices | Array of indicies to delete |
target | Destination layer for voxels in indicies |
targetMovePolicy | is 0=replace, 1=no overwrite (keep target), 2=respect immutable status of target (default), 3=make new ROIs from overlap |
|
slot |
Removes a layer from the list of layers and reassigns all its ROIs.
id | Index of layer to delete |
targetROI | Index of ROI to recieve id's from deleted ROIs |
targetLayer | Index of layer to recieve id's |
targetMovePolicy | is 0=replace, 1=no overwrite (keep target), 2=respect immutable status of target (default), 3=make new ROIs from overlap |
|
slot |
Removes an ROI from the ROI list and reassigns all its voxels.
id | Index of an ROI in the current layer to delete |
targetROI | Index of an ROI to recieve id's voxels |
targetLayer | Index of the layer of the target ROI |
|
slot |
Delete multiple ROIs.
indices | Array of indicies to delete |
targetROI | Destination ROI for voxels in indicies |
targetLayer | Destination layer for voxels in indicies |
|
protected |
Draws a ROI circle at a given point.
plane | Plane in which to draw the circle (0=sagittal,1=coronal,2=transverse) |
x | Coordinate in the X (sagittal) plane of center of circle |
y | Coordinate in the Y (coronal) plane of center of circle |
z | Coordinate in the Z (transverse) plane of center of circle |
radius | Radius of the circle, in voxels |
roi_id | Index of ROI to update |
updateDisplay | If true, will immediately update the display to show the drawn ROI |
|
protected |
Draws a ROI cube at a given point.
x | Coordinate in the X (sagittal) plane of center of cube |
y | Coordinate in the Y (coronal) plane of center of cube |
z | Coordinate in the Z (transverse) plane of center of cube |
radius | Radius of the cube, in voxels. Cube has sides of length 2*radius |
roi_id | Index of ROI to update |
updateDisplay | If true, will immediately update the display to show the drawn ROI |
|
protected |
Draws a ROI square at a given point.
plane | Plane in which to draw the circle (0=sagittal,1=coronal,2=transverse) |
x | Coordinate in the X (sagittal) plane of center of cylinder |
y | Coordinate in the Y (coronal) plane of center of cylinder |
z | Coordinate in the Z (transverse) plane of center of cylinder |
radius | Radius of the cylinder, in voxels |
height | Height of the cylinder. Height is extended to height/2 on either sides of the center point perpendicular to plane |
roi_id | Index of ROI to update |
updateDisplay | If true, will immediately update the display to show the drawn ROI |
|
protected |
Draws a ROI square at a given point.
plane | Plane in which to draw the square (0=sagittal,1=coronal,2=transverse) |
x | Coordinate in the X (sagittal) plane of center of square |
y | Coordinate in the Y (coronal) plane of center of square |
z | Coordinate in the Z (transverse) plane of center of square |
radius | Radius of the square, in voxels (square has sides of length 2*radius) |
roi_id | Index of ROI to update |
updateDisplay | If true, will immediately update the display to show the drawn ROI |
|
protected |
Draws a ROI sphere at a given point.
x | Coordinate in the X (sagittal) plane of center of sphere |
y | Coordinate in the Y (coronal) plane of center of sphere |
z | Coordinate in the Z (transverse) plane of center of sphere |
radius | Radius of the sphere, in voxels |
roi_id | Index of ROI to update |
updateDisplay | If true, will immediately update the display to show the drawn ROI |
|
slot |
Edits various layer properties such as name, alpha.
id | Index of layer to edit |
name | Name of the layer |
hidden | Hide the layer or not |
alphaSlice | Alpha of the ROI in the slice view (0-255) |
|
slot |
Edits various ROI properties such as name, color on the current active layer.
id | Index of ROI to edit |
name | Name of the ROI |
colorName | Color of the ROI. |
immutable | Make the ROI Immutable or not |
hidden | Hide the ROI or not |
alphaSlice | Alpha of the ROI in the slice view (0-255) |
alphaSurface | Alpha of the ROI in the VTK viewer (0-255) |
layer | Name of the layer this ROI is moved to |
|
slot |
Edits various ROI properties such as name, color on the specified layer.
layerID | the layer to which the ROI is on |
id | Index of ROI to edit |
name | Name of the ROI |
colorName | Color of the ROI. |
immutable | Make the ROI Immutable or not |
hidden | Hide the ROI or not |
alphaSlice | Alpha of the ROI in the slice view (0-255) |
alphaSurface | Alpha of the ROI in the VTK viewer (0-255) |
layer | Name of the layer this ROI is moved to |
|
slot |
Exports an ROI (or group of ROIs) as a Volume in the Data Manager.
exportROIs | Array of ROI indicies to export |
|
slot |
Exports a table of selected metrics for ROIs; e.g. Volume, Sum.
filename | Name of output file |
double get2DROIVolumeEstimation | ( | unsigned char | id, |
unsigned char | planeId, | ||
unsigned int | px1, | ||
unsigned int | py1, | ||
unsigned int | px2, | ||
unsigned int | py2, | ||
unsigned int | sections = 20 |
||
) |
Returns the Modified Simpson's approach for volume estimation of a 2D ROI on a given plane.
id | Index of ROI |
planeId | (0 = sagittal, 1 = coronal, 2 = transverse) |
p1 | Long axis start point |
p1 | Long axis end point |
sections | The number of sections along the long axis |
Array<string> getLayerDetails | ( | int | i | ) |
Returns various details regarding the display of a layer.
i | Index of Layer to get details |
string getROICenterOfMass | ( | unsigned char | id | ) |
Returns the geometric center of mass of an ROI.
id | Index of ROI to load |
Array<int> getROIContourPoints | ( | unsigned char | id, |
unsigned char | planeId | ||
) |
Returns the outline points of an ROI on the current slice of a given plane.
id | Index of ROI |
planeId | (0 = sagittal, 1 = coronal, 2 = transverse) |
Array<string> getROIDetails | ( | int | i | ) |
Returns various details regarding the display of an ROI.
i | Index of ROI to get details |
double getROIVolume | ( | unsigned char | id | ) |
Returns the volume of a ROI.
id | Index of ROI |
Array<string> getSplinePath | ( | int | id, |
bool | interpolated = false |
||
) |
Returns the current spline points when using the spline tool.
id | Plane (0 = sagittal , 1 = conronal, 2 = transverse) to grab spline points |
interpolated | If true, returns every point along interpolated (green) line. If false, returns just the clicked points |
|
slot |
a helper function to set the seed mean value for manual k-means segmentation
a | string that contains double values that split by "," |
void loadLayer | ( | string | filename, |
int | layerID = -1 |
||
) |
Loads a .rmha file from disk into the 3D ROI Operator.
filename | Path to filename on disk |
layerID | The layer index to load into (if not provided, the ROIs will be loaded in the active layer) |
|
slot |
Download the ROIs into the specified layer from the associated data on the iPACS.
quiet | If true, the most recent ROIs will be loaded and no dialog will be shown |
layerID | The layer ID to download the ROIs to (if not specified, the active layer will be used) |
void loadROI | ( | string | filename | ) |
Loads a .rmha file from disk into the 3D ROI Operator.
filename | Path to filename on disk |
|
slot |
Download the ROIs from associated data on the iPACS.
quiet | If true, the most recent ROIs will be loaded and no dialog will be shown |
|
slot |
Use DicomReader to load an ROI in the RT Structure Set format specified by the Dicom standard and used by the Siemens IRW.
filename | path to an RTSTRUCT Dicom image. |
|
slot |
Support for PMOD region of interest files.
filename | Name of file |
|
inline |
Returns the number of layers currently in the operator.
|
inline |
Returns the number of ROIs in the current layer.
|
inline |
Returns the number of ROIs currently in the operator (all layers)
|
slot |
Paste ROIs from Clipbard to current active layer. this function can be used to copy ROI between layers or VQ instances.
quiet | If true, overlayed ROIs will be overwritten and no dialog will be shown. |
|
protected |
If the dimensions of the underlying ROI object do not match that of the reference image, resize and clear the ROI object and display a notification dialog
|
slot |
Save an ROI Layer to Disk.
filename | Local path to output (saved) rmha file |
layerID | The layerID of the ROI to be saved |
compression | Type of Compression to use (Use RLE in almost all cases) |
|
slot |
Save an ROI to Disk.
filename | Local path to output (saved) rmha file |
compression | Type of Compression to use (Use RLE in almost all cases) |
|
slot |
Saves all ROIs in an RTSTRUCT DICOM. The DICOM will be defined with respect to the currently loaded reference image.
filename | Local path to output (saved) RTSTRUCT DICOM |
quiet | If true, warning dialogs will not be displayed (but warnings will still be printed to the logs) |
|
inline |
Sets the currently selected layer in the 3D ROI Operator.
i | Index of the layer to set as Current |
|
inline |
Sets the currently selected ROI in the 3D ROI Operator.
i | Index of the ROI to set as Current |
void setInputROI | ( | int | layerId, |
int | roiIdx | ||
) |
Sets the input ROI for the Segmentation Tools.
i | Index of layer to set as Input |
i | Index of ROI to set as Input |
void setInputROI | ( | int | roiIdx | ) |
Sets the input ROI for the Segmentation Tools.
i | Index of ROI from the current active layer to set as Input |
|
protected |
Set ROI painting mode.
mode | Paint mode name, should be "All Layer", "All ROI", "Current Layer", "Outline" |
|
slot |
Sets whether ROIs imported from an RTSTRUCT file are sorted by volume.
sortByVolume | If true, sorts ROIs imported from an RTSTRUCT by volume. If false, preserves the order they appear in the RTSTRUCT file (except for overlaps) |
void setSplinePath | ( | int | id, |
Array< string > | list, | ||
bool | closed = false |
||
) |
Sets spline points in the spline tool.
id | Index of ROI |
list | Array in the form [x1,y1,x2,y2,...] denoting the points of the spline |
closed | if True, will complete the spline interpolation |
|
slot |
Displays a table of selected metrics for ROIs that have been created; e.g. Volume, Sum.
quick | If true will automatically display a table of metrics; default = false |
|
slot |
Submit the ROIs of the specified layer to the associated data on the iPACS.
quiet | If true, no setting dialog is shown and latest saving parameters are used |
allMetric | if true, force to save all the quantification metrics |
layerID | The layer ID to save the ROIs from (if not specified, the active layer will be used) |
|
slot |
Submit the ROIs to the associated data on the iPACS.
quiet | If true, no setting dialog is shown and latest saving parameters are used |
allMetric | If true, force to save all the quantification metrics |
void submitROIAsRTSTRUCT | ( | bool | quiet = false , |
bool | allMetric = false |
||
) |
Submit the ROIs as RTSTRUCT to the associated data on the iPACS.
quiet | If true, no setting dialog is shown and latest saving parameters are used |
allMetric | If true, force to save all the quantification metrics image before any resampling that was done in VQ |
|
slot |
Submit the ROIs as RTSTRUCT to the associated data on the iPACS. If it is possible to use the coordinate space of the original image before resampling and quiet is false, the user will be asked their preference.
allMetric | If true, force to save all the quantification metrics |
|
slot |
Toggles the hidden attribute of ROI(s)
indices | Array of ROI indicies to toggle |
|
slot |
Toggles the immutable attribute of ROI(s)
indices | Array of ROI indicies to toggle |