VivoQuant
|
Object to interact with the Distance/Annotation Operator when it is active. More...
#include <DistanceOperator.h>
Public Slots | |
void | clear (bool quiet=false) |
Clear all the annotations. | |
void | saveData (string filename=string()) |
Save the annotations on the disk. | |
void | loadData () |
Load the annotations from the disk. | |
void | saveDataIPACS (bool quiet=false) |
Save annotations to a iPACS (works only if the data was loaded from an iPACS) | |
string | loadDataIPACS (bool quiet=false) |
Load annotations from an iPACS (works only if the data was loaded from an iPACS) | |
void | saveProfilePlot (string filename=string()) |
Save the profile plot to the disk as PDF or PNG. | |
void | saveProfile (string filename=string(), bool quiet=false) |
Save the profile plot to the disk as a CSV file. | |
void | addGraph (string item) |
Add any type of annotation based on a text string. | |
void | addRectangle (string color, string label, int plane=0, QPointF labelPos=QPointF(), TPoint &topLeft=TPoint(), TPoint &bottomRight=TPoint(), bool linkedLabel=true, bool hidden=false) |
Add a new rectangle annotation. | |
Public Member Functions | |
void | loadData (string filename, int slice=-1, bool clearExist=true) |
Load annotations from a file. | |
bool | loadAnnotationsFromData (Index idx, bool quiet=false) |
Load annotations from an iPACS for a given data set (works only if the data was loaded form an iPACS) | |
void | saveAnnotationsToData (Index idx, bool quiet=false) |
Save annotations to a loaded iPACS data set (works only if the data was loaded form an iPACS) | |
int | count () |
Get the number of annotations in the table. | |
Array< int > | getSliceAnnotationIds (unsigned int slice) |
Get the annotations on a particular slice. | |
void | rescaleAnnotation (float sf) |
Rescale all annotations. | |
bool | deleteAnnotation (unsigned int id) |
Delete the specified annotation. | |
bool | setAnnotationVisible (unsigned int id, bool visible) |
Show / hide a specified annotation. | |
bool | setAnnotationLabel (unsigned int id, string label) |
Change the label of the specified annotation. | |
bool | setAnnotationLocation (unsigned int id, float x, float y, float z) |
Change the center point of the specified annotation. | |
bool | setAnnotationDistance (unsigned int id, float distance) |
Change the distance of the specified line. | |
bool | setAnnotationRadius (unsigned int id, float radius) |
Change the radius of the specified circle. | |
bool | setAnnotationWidth (unsigned int id, float width) |
Change the width of the specified rectangle. | |
bool | setAnnotationHeight (unsigned int id, float height) |
Change the height of the specified rectangle. | |
bool | setAnnotationWidthAndHeight (unsigned int id, float width, float height) |
Change the height of the specified rectangle. | |
bool | setAnnotationStart (unsigned int id, float x, float y, float z) |
Change the start point of the specified line or the top corner of the specified rectangle. | |
bool | setAnnotationEnd (unsigned int id, float x, float y, float z) |
Change the end point of the specified line or the bottom corner of the specified rectangle. | |
bool | setAnnotationColor (unsigned int id, string color) |
Change the color of the specified annotation. | |
bool | setAnnotationFontSize (unsigned int id, int size) |
Change the size of the specified annotation. | |
bool | setAnnotationFont (unsigned int id, string font, int size=0) |
Change the font of the specified annotation. | |
bool | setAnnotationPenWidth (unsigned int id, float penWidth) |
Change the pen width of the specified annotation. | |
Object | getAnnotationInfo (unsigned int id) |
Get the information for the specified annotation. | |
float | getAnnotationIntensity (unsigned int id) |
Get the intensity of the specified annotation (circle) | |
void | setProfilePlotDimensions (int width, int height) |
Set the dimensions of the profile plot. | |
Object to interact with the Distance/Annotation Operator when it is active.
This object can be used to draw point, circle and line annotations. The annotations can also be saved on disk or on an iPACS.
Images are loaded in the data manager starting with the reference at 0 See also ScriptMaster::currentOp() to obtain this object and MainWin::setViewMode() to enter the Distance/Annotation Operator.
|
slot |
Add any type of annotation based on a text string.
item | The text string containing the annotation's information |
|
slot |
Add a new rectangle annotation.
color | The color |
label | The label |
plane | The plane on which the annotation is drawn |
labelPos | The position of the label |
location | The rectangle's center |
topLeft | The x-axis length |
bottomRight | The y-axis's length |
linkedLabel | Enable the linked state of the label |
hidden | The annotation's visibility |
|
slot |
Clear all the annotations.
quiet | Set to true to avoid the confirmation message |
|
inline |
Get the number of annotations in the table.
bool deleteAnnotation | ( | unsigned int | id | ) |
Delete the specified annotation.
id | The id of the annotation to delete (0-based from the annotation table) |
Object getAnnotationInfo | ( | unsigned int | id | ) |
Get the information for the specified annotation.
id | The id of the annotation to get the info (0-based from the annotation table) |
float getAnnotationIntensity | ( | unsigned int | id | ) |
Get the intensity of the specified annotation (circle)
id | The id of the annotation to get the intensity (0-based from the annotation table) |
Array< int > getSliceAnnotationIds | ( | unsigned int | slice | ) |
Get the annotations on a particular slice.
bool loadAnnotationsFromData | ( | Index | idx, |
bool | quiet = false |
||
) |
Load annotations from an iPACS for a given data set (works only if the data was loaded form an iPACS)
idx | Index of data (see ScriptMaster::index()) |
quiet | Set to true to avoid confirmation message |
|
slot |
Load the annotations from the disk.
quiet | Set to true to avoid the confirmation message |
void loadData | ( | string | filename, |
int | slice = -1 , |
||
bool | clearExist = true |
||
) |
Load annotations from a file.
filename | The location of the file to load from |
slice | The slice to load the annotations on |
clear | exist annotations |
|
slot |
Load annotations from an iPACS (works only if the data was loaded from an iPACS)
quiet | Set to true to avoid confirmation message |
void rescaleAnnotation | ( | float | sf | ) |
Rescale all annotations.
sf | The scale factor |
void saveAnnotationsToData | ( | Index | idx, |
bool | quiet = false |
||
) |
Save annotations to a loaded iPACS data set (works only if the data was loaded form an iPACS)
idx | Index of data (see ScriptMaster::index()) |
quiet | Set to true to avoid confirmation message |
|
slot |
Save the annotations on the disk.
filename | (optional) The location of the file to save to. If not supplied a file browser will open |
|
slot |
Save annotations to a iPACS (works only if the data was loaded from an iPACS)
quiet | Set to true to avoid confirmation message |
|
slot |
Save the profile plot to the disk as a CSV file.
filename | (optional) The location and filename of the file to save to. If not supplied a file browser will open |
quiet | (optional) Set to true to avoid dialog to be displayed on success. |
|
slot |
Save the profile plot to the disk as PDF or PNG.
filename | (optional) The location and filename of the file to save to. If not supplied a file browser will open |
bool setAnnotationColor | ( | unsigned int | id, |
string | color | ||
) |
Change the color of the specified annotation.
id | The id of the annotation to set the color (0-based from the annotation table) |
color | The new color name (ie: "red", "yellow", etc.) |
bool setAnnotationDistance | ( | unsigned int | id, |
float | distance | ||
) |
Change the distance of the specified line.
id | The id (0-based from the annotation table) of the line annotation to change |
distance | The new distance |
bool setAnnotationEnd | ( | unsigned int | id, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Change the end point of the specified line or the bottom corner of the specified rectangle.
id | The id (0-based from the annotation table) of the line or rectangle annotation to change |
x | The x coordinate of the new end point |
y | The y coordinate of the new end point |
z | The z coordinate of the new end point |
bool setAnnotationFont | ( | unsigned int | id, |
string | font, | ||
int | size = 0 |
||
) |
Change the font of the specified annotation.
id | The id of the annotation to set the font (0-based from the annotation table) |
size | The new size (optional) |
font | The new font |
bool setAnnotationFontSize | ( | unsigned int | id, |
int | size | ||
) |
Change the size of the specified annotation.
id | The id of the annotation to set the size (0-based from the annotation table) |
size | The new size |
bool setAnnotationHeight | ( | unsigned int | id, |
float | height | ||
) |
Change the height of the specified rectangle.
id | The id (0-based from the annotation table) of the rectangle annotation to change |
height | The new height |
bool setAnnotationLabel | ( | unsigned int | id, |
string | label | ||
) |
Change the label of the specified annotation.
id | The id of the annotation to set the label (0-based from the annotation table) |
label | The new label |
bool setAnnotationLocation | ( | unsigned int | id, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Change the center point of the specified annotation.
id | The id of the annotation to change (0-based from the annotation table) |
x | The x coordinate of the new location |
y | The y coordinate of the new location |
z | The z coordinate of the new location |
bool setAnnotationPenWidth | ( | unsigned int | id, |
float | penWidth | ||
) |
Change the pen width of the specified annotation.
id | The id of the annotation to set the font (0-based from the annotation table) |
penWidth | The pen width |
bool setAnnotationRadius | ( | unsigned int | id, |
float | radius | ||
) |
Change the radius of the specified circle.
id | The id (0-based from the annotation table) of the circle annotation to change |
radius | The new radius |
bool setAnnotationStart | ( | unsigned int | id, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Change the start point of the specified line or the top corner of the specified rectangle.
id | The id (0-based from the annotation table) of the line or rectangle annotation to change |
x | The x coordinate of the new start point |
y | The y coordinate of the new start point |
z | The z coordinate of the new start point |
bool setAnnotationVisible | ( | unsigned int | id, |
bool | visible | ||
) |
Show / hide a specified annotation.
id | The id of the annotation to set visible (0-based from the annotation table) |
visible | The visible state |
bool setAnnotationWidth | ( | unsigned int | id, |
float | width | ||
) |
Change the width of the specified rectangle.
id | The id (0-based from the annotation table) of the rectangle annotation to change |
width | The new width |
bool setAnnotationWidthAndHeight | ( | unsigned int | id, |
float | width, | ||
float | height | ||
) |
Change the height of the specified rectangle.
id | The id (0-based from the annotation table) of the rectangle annotation to change |
width | The new width |
height | The new height |
void setProfilePlotDimensions | ( | int | width, |
int | height | ||
) |
Set the dimensions of the profile plot.
width | The width of the profile plot window |
height | The height of the profile plot window |