VivoQuant
|
Main VivoScript object to access other modules and perform generic actions. More...
Public Member Functions | |
void | setVersion (string version) |
Set a string representing the script version that will be used in audit log messages. More... | |
string | getVersion () |
Get the string representing the script version. More... | |
void | askForCancelReason (bool ask) |
Set whether a prompt asks for a reason if the user cancels the script, which can be written to the audit trail. More... | |
bool | isAskingForCancelReason () |
Whether a prompt will asks for a reason if the user cancels the script, which can be written to the audit trail. | |
void | setDebuggerEnabled (bool toShow) |
Enable debugger. More... | |
void | debug (string text) |
Prints output to debugger and/or logfile. More... | |
Object | mainWin () |
Returns MainWin object. | |
Object | bedRemovalTool () |
Returns advanced bedremoval object. | |
Object | matrixManipulationTool () |
Returns MatrixManipulation object. | |
Object | dataManager () |
Returns Data Manager object. | |
Object | dataList () |
Returns dataList object. | |
Object | sliceViewer () |
Returns sliceViewer object. | |
Object | multiViewer () |
Returns MultiView object. | |
Object | controler () |
Returns SliceView Controller object. | |
Object | mipControler () |
Returns mipControler object. | |
Object | vtkController () |
Returns VTK Controller object. | |
Object | vtkViewer () |
Returns vtkViewer object. | |
Object | eCRF () |
Returns eCRF object. | |
Object | workList () |
Returns Worklist object. | |
Object | visibilityManager () |
Returns Visibility Manager object. | |
Object | BrainAtlasTool (bool visible=true, bool quiet=false) |
Opens the Brain Atlas Tool. More... | |
Object | MASTool (string libraryPath=string("")) |
Opens Multi-Atlas Segmentation Tool, formerly known as Whole Body Atlas) More... | |
bool | waitForECRF (int timeout=0) |
Specifies time to wait for eCRF. More... | |
void | setECRFCallback (string function) |
Add callback function to execute when eCRF is loaded. More... | |
void | clearCallback () |
Clear the currently saved callback function for eCRF refresh. | |
void | eCRFCallback () |
Run current eCRF callback function. | |
void | quit () |
Quits VivoQuant after confirmation (in interactive session) or automatically (in –script session) | |
Index | index (int i) |
Get a script image index object used to reference data in the Data Manager The index should be passed directly to function, ie: var t = op.testFunc(VQ.index(1));. More... | |
Index | index (int i, int j) |
Get a script image index object used to reference data in the Data Manager The index should be passed directly to function, ie: var t = op.testFunc(VQ.index(0,1));. More... | |
Index | flatIndex (int i) |
Get a script flat image index object used to reference data in the Data Manager The index should be passed directly to function, ie: var t = op.testFunc(VQ.flatIndex(1));. More... | |
Object | getIndexContainer (int i) |
Get a script image index container used to reference data in the Data Manager. Use .get() function of the container to access the internal index. More... | |
Object | getIndexContainer (int i, int j) |
Get a script image index container used to reference data in the Data Manager. Use .get() function of the container to access the internal index. More... | |
string | counter (int c, int s) |
Convenience function to return a 0-padded counter. More... | |
void | showMessage (string msg, bool modal=true) |
Displays dialog box with user-defined message. More... | |
bool | askYesNoQuestion (string msg, bool modal=true) |
Displays dialog box with "Yes" or "No" option. More... | |
Object | progressDialog (string label, string cancelButtonText, int minimum, int maximum) |
Returns a progress dialog object, which can be used to show the current state of a longer process. More... | |
Object | getDouble (string title, string label, double value=0, double min=-2147483647, double max=2147483647, int decimals=1) |
Displays input box to request double-precision value. More... | |
Object | getDoubleInteractive (string title, string label, double value=0, double min=-2147483647, double max=2147483647, int decimals=1) |
Displays an input box like ScriptMaster::getDouble() and allows interaction with VivoQuant while the dialog is waiting for input. More... | |
Object | getInt (string title, string label, int value=0, int min=-2147483647, int max=2147483647, int step=1) |
Displays input box to request integer value. More... | |
Object | getIntInteractive (string title, string label, int value=0, int min=-2147483647, int max=2147483647, int step=1) |
Displays an input box like ScriptMaster::getInt() and allows interaction with VivoQuant while the dialog is waiting for input. More... | |
Object | getItem (string title, string label, Array< string > items, int current=0) |
Displays input box to request selection from user-defined list of options. More... | |
Object | getItemInteractive (string title, string label, Array< string > items, int current=0) |
Displays an input box like ScriptMaster::getItem() and allows interaction with VivoQuant while the dialog is waiting for input. More... | |
Object | getText (string title, string label, string text=string(), int mode=0) |
Displays input box to request text input. More... | |
Object | getTextInteractive (string title, string label, string text=string(), int mode=0) |
Displays an input box like ScriptMaster::getText() and allows interaction with VivoQuant while the dialog is waiting for input. More... | |
VariantMap | getValues (string title, VariantMap &map, bool modal=true) |
Displays a dialog box to request input for multiple prompts at once. More... | |
Object | getLocalPath (string caption="Select directory:", string startDir=string(".")) |
Returns path of directory selected by user in file dialog. More... | |
Object | getSavePath (string caption=string("Select output file:"), string startDir=string("."), string filter=string()) |
Returns path to file selected by user in file dialog. More... | |
Array< string > | getLocalFiles (string caption="Select files:", string startDir=string(".")) |
Returns array of paths to files selected by user in file dialog. More... | |
string | getVivoScriptDir () |
Returns VivoScript directory. | |
void | mkdir (string path, string subdir) |
Creates sub-directory at specified path. More... | |
bool | fileExists (string path) |
Checks whether file at specified path exists. More... | |
bool | folderExists (string path) |
Checks whether file at specified path exists. More... | |
bool | openFileExternally (string path) |
Opens a local file in an external application. More... | |
Object | minMaxTool () |
Returns MinMax Tool object. | |
bool | isInteractive () |
Checks whether current VivoQuant session is interactive. | |
void | setInteractive (bool b) |
Sets VivoQuant to interactive (or not) More... | |
void | updateProcessingParameters () |
Update the ITK and VTK thread settings based on the config. | |
bool | isTestMode () |
Checks whether current VivoQuant session is in test mode. | |
void | setTestMode (bool b=true) |
Sets VivoQuant to test mode (or not) More... | |
string | lumiQuantMaster () |
Returns LumiQuant master settings file from VivoQuant directory. | |
Object | dicomBrowser (AbstractDicomRepository *rep) |
Returns VivoQuant's Data Browser object for a given DICOM repository. More... | |
Object | dcmRep (string text) |
Creates and returns a DICOM repository object. More... | |
Object | currentDcmRep () |
Returns the DICOM repository object corresponding to the repository that is currently active in the DICOM Browser. | |
Object | loadRepository (string name) |
Returns DICOM repository object from DICOM repository saved in VivoQuant. More... | |
Object | getListOfRepositories (string type=string()) |
Returns array of repositories stored in VivoQuant. | |
void | abort () |
Aborts current script. | |
Object | queryStudies (AbstractDicomRepository *rep, string patientName, string patientID=string(), string dateRange=string(), string studyDesc=string()) |
Performs query of DICOM repository for studies matching argument criteria. More... | |
Object | querySeries (AbstractDicomRepository *rep, string studyInstanceUID) |
Performs query of DICOM repository for series within a given study, and returns series matching criteria. More... | |
Object | queryImages (AbstractDicomRepository *rep, string studyInstanceUID, string seriesInstanceUID) |
Performs query of DICOM repository for images within a series, and returns images matching criteria. More... | |
Object | query (AbstractDicomRepository *rep, string query, Array< string > arguments=Array< string >(), Object &fields=Object(), bool isPost=false) |
Performs custom query of DICOM repository using the iPACS API. More... | |
string | getDcmString (AbstractDicomRepository *rep, string tag, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID) |
Looks up the value of the specified tag in the DICOM header of an image in the repository. More... | |
Object | downloadImages (AbstractDicomRepository *rep, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID=string()) |
Downloads image to cache. More... | |
Object | downloadImages (string targetDir, AbstractDicomRepository *rep, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID=string()) |
Downloads image to a location on disk. More... | |
Object | downloadImages (string targetDir, bool forceRedownload, AbstractDicomRepository *rep, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID=string()) |
Downloads image to a location on disk. More... | |
Object | queryDataPoints (AbstractDicomRepository *rep, string type, string uid, string form) |
Perform query of DICOM repository for datapoints at project, study, series, or image level, and returns datapoints matching criteria. More... | |
Object | submitDataPoint (AbstractDicomRepository *rep, string uid, Object &data, string type=string()) |
Submits datapoint to DICOM repository. More... | |
Object | logMessage (Index dataIndex, string msg, string noipacsTitle=string("Get iPACS from data"), string type=string()) |
Creates a log message on the given's data iPACS repository. More... | |
Object | logMessage (AbstractDicomRepository *rep, string msg, string type=string()) |
Creates a log message on the given DICOM repository. More... | |
void | auditTrailMessage (string msg, string project="/", string type=string()) |
Creates an audit trail message on the current repository. More... | |
void | auditTrailGenerateNewUID () |
Generates a new session ID for audit trail messages. | |
void | dicomBrowserLoad (AbstractDicomRepository *rep, string studyInstanceUID, string seriesInstanceUID, bool append=false, bool isPlanar=false, bool force4Dto3D=false) |
Downloads image(s) from DICOM repository and loads them into the Data Manager. More... | |
void | dicomBrowserLoad (DicomBrowser *dcmBrowser, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID=string()) |
Downloads image(s) from DICOM repository and loads them into Data Manager. More... | |
Object | queryStudyPlan (AbstractDicomRepository *rep, string plan, string cohort, string group, string animal, string modality, string date, string event="$0") |
Object | getWidget (string name) |
Returns an object containing functions/properties of specified widget. Widgets are UI elements (e.g. buttons, checkboxes, combo boxes, etc.) in VivoQuant. More... | |
Object | currentOp () |
Returns an object containing functions for the currently loaded operator. | |
Object | currentView () |
Returns an object containing functions for the currently loaded view mode. | |
Array< string > | availableItems (string name) |
Returns available items from widget with multiple options. More... | |
Array< string > | availableItemsObj (Object obj) |
Returns available items from widget with multiple options. More... | |
Array< string > | availableOperators () |
Returns list of available operators. | |
void | setOption (string cbname, string opt) |
Set widget to given option; for use with widgets with multiple options (e.g. comboboxes) More... | |
void | setOptionObj (Object obj, string opt) |
Set widget to given option; for use with widgets with multiple options (e.g. comboboxes) More... | |
string | stripCredentials (string url_string) |
Returns URL of DICOM repository with credentials (username and password) removed. More... | |
void | setConfig (string entry, Variant &val, bool force=false) |
Sets option in VivoQuant configuration to given value. More... | |
string | getConfig (string entry, string defaultValue=string()) |
Returns current value of option in VivoQuant configuration. More... | |
string | getHome () |
Returns VivoQuant installation directory. | |
string | getCache () |
Returns VivoQuant cache directory. | |
string | getCurrentDir () |
Returns current path. | |
string | getScriptPath () |
Returns the location of the script being executed. | |
string | getTempFolder () |
Returns Temp folder for current user. | |
bool | deletePath (string path) |
Deletes folder and all its contents at given path. More... | |
bool | deleteFile (string filepath) |
Deletes file at given path. More... | |
bool | copyFile (string filepath, string newpath) |
Copies file from one path to another. More... | |
bool | renameFile (string filepath, string newname) |
Renames file at given path. More... | |
bool | rmDir (string dirpath) |
Removes directory at given path. More... | |
string | preProcess (string protocol, bool showDialog=false) |
Runs Pre-Processing Tool tool with the given protocol. More... | |
Object | PreProcessingTool (bool showDialog=true) |
Opens the Pre-Processing Tool. More... | |
int | storeData (AbstractDicomRepository *rep, Index idx, int format=-1) |
Stores DICOM data to a DICOM repository. More... | |
bool | storeAsRaw (string fn, Index idx) |
Stores data to disk in MHD/RAW (or MHD/ZRAW) file format. More... | |
int | storeAsDICOM (string fn, Index idx, int format=-1, bool compress=false, bool quiet=true) |
Stores data to disk in DICOM file format. More... | |
void | saveDataViaITK4D (string fn) |
Stores all data in Data Manager to disk as a single ITK 4D dataset in MHD/RAW or MHD/ZRAW file format. More... | |
void | saveDataViaITK (string fn, Index idx) |
Stores data to disk in ITK MHD/RAW or MHD/ZRAW file format. More... | |
bool | writeFile (string fn, string text) |
Writes file to disk with given text. More... | |
bool | appendFile (string fn, string text) |
Appends text to file on disk. More... | |
Array< string > | readFile (string fn) |
Reads file into array of strings. More... | |
Object | brukerImporter () |
Returns Bruker Importer object. | |
Object | analyzeImporter () |
Returns Analyze Importer object. | |
Object | imgInfImporter () |
Returns Img/Inf Importer object. | |
Object | gelImporter () |
Returns Gel Importer object. | |
Object | rawImporter () |
Returns Raw Importer object. | |
Object | imgHdrImporter () |
Returns Img/Hdr Importer object. | |
Object | vevoImporter (string filename) |
Returns Vevo object. | |
void | centerCursor () |
Moves cursor to center of image in each viewport (i.e. moves each viewport to center slice) | |
Object | webDisk (string rep) |
Return IPACS WebDisk object for project in given iPACS repository. More... | |
bool | saveScreenshot (string fileName) |
Saves screenshot of VivoQuant. More... | |
string | applicationName () |
Returns name + version of current instance of VivoQuant. | |
Object | zipTool () |
Returns Zip Tool object. | |
double | sin (double f) |
Returns sin of angle. More... | |
double | cos (double f) |
Returns cosine of angle. More... | |
void | evalDialog (string text=string()) |
Opens VivoScript evaluation window with given text. More... | |
void | splitROI2DICOM (Index idx) |
For each ROI in the 3D ROI Tool, creates a masked image of a given image in the Data Manager, where voxels outside the ROI are mapped to the given image's minimum. More... | |
Array< string > | lsDir (string dir, string nameFilter=string(), int filter=QDir::AllEntries|QDir::NoDotAndDotDot, QDir::SortFlags sort=QDir::Name) |
Returns array of files in given directory on local disk. More... | |
int | rand () |
Returns a random integer. More... | |
int | rand (int max) |
Returns random positive integer less than given maximum. More... | |
float | frand () |
Returns a random float. More... | |
void | suspend (string message=string()) |
Suspends script and opens a modeless "Resume" dialog. More... | |
string | getHash (string key, string def=string()) |
Returns current value of key in hash. More... | |
double | getHashNum (string key, double def=0.0f) |
Returns current numerical value of key in hash. More... | |
Array< string > | getHashKeys () |
Returns array of all keys in hash. | |
void | setHash (string key, string val) |
Sets value of key in hash. More... | |
void | clearHash () |
Clears all keys and values stored in hash. | |
bool | storeHash (string fileName) |
Stores all keys and values in hash to local file. More... | |
bool | loadHash (string fileName) |
Loads local file, containing hash keys and values, to VivoQuant's persistent hash. More... | |
string | getEnv (string key, string defaultValue=string()) |
Get the system's environment variables. More... | |
string | startTool (string tool, string baseDir=".", Array< string > args=Array< string >()) |
Start an external tool. More... | |
void | bedRemoval (string bedName=string()) |
Invokes CT bed removal tool. If bedName is provided, this bed will automatically be selected. | |
Object | getROIStats (Index idx, int roiID, int layerID=-1) |
Returns object with ROI quantification table information for given dataset and ROI. More... | |
Object | getROIStats (Index idx) |
Returns array of ROI quantification table information for given dataset and ALL ROIs. More... | |
Object | getNMCTWidget (string name) |
Returns 3D Brain Atlas Tool widgets. More... | |
string | atlasPath () |
Returns path where atlases are stored. | |
void | openNMCT () |
Opens 3D Brain Atlas Tool. More... | |
void | setNMCTQuietModeOn () |
Sets 3D Brain Atlas Tool to run in Quiet Mode. Prevents output from opening automatically upon completion. More... | |
void | setNMCTOutputFormat (string format) |
Sets 3D Brain Atlas Tool output format. More... | |
void | runNMCT () |
Runs 3D Brain Atlas Tool. More... | |
Object | getMPRWidget () |
Returns MPR widget. | |
void | loadRGB (Index idx, Array< string > imgFiles, float voxX, float voxY, float voxZ, int rgbRep=4, bool forcePlanar=true) |
Object | getMModeSegmentationTool () |
Returns Ultrasound M-Mode Segmentation tool object. | |
Object | getDicomAnonymizer () |
Returns DICOM Anonymizer Tool object. | |
Object | getDicomRelabeler () |
Returns DICOM Relabeler Tool object. | |
Object | getCorticalThicknessTool () |
Returns cortical thickness tool object. | |
Object | getBedRemovalWidget (string name) |
Return Widget name in Bedremoval Dialog. | |
double | getHalfLife (string name) |
Get an isotope's half life. More... | |
Object | readCSVFile (string name) |
Parse a CSV file into arrays of values. More... | |
string | getDefaultPal (string modality, int i) |
get default palette from modality More... | |
string | getOS () |
get current Operating System name More... | |
Main VivoScript object to access other modules and perform generic actions.
bool appendFile | ( | string | fn, |
string | text | ||
) |
Appends text to file on disk.
fn | Path of output file |
text | Text to write to output file |
void askForCancelReason | ( | bool | ask | ) |
Set whether a prompt asks for a reason if the user cancels the script, which can be written to the audit trail.
ask | If true, a prompt will ask the user to enter a reason if they do something that cancels the script while it is running |
bool askYesNoQuestion | ( | string | msg, |
bool | modal = true |
||
) |
Displays dialog box with "Yes" or "No" option.
msg | Message displayed in dialog box |
modal | Determines whether VivoQuant is inaccesible while dialog box is open (true) or accesible (false) |
void auditTrailMessage | ( | string | msg, |
string | project = "/" , |
||
string | type = string() |
||
) |
Creates an audit trail message on the current repository.
msg | The message to be logged |
project | The project to log the message to |
type | Message type |
Array<string> availableItems | ( | string | name | ) |
Returns available items from widget with multiple options.
name | Name of widget |
Array<string> availableItemsObj | ( | Object | obj | ) |
Returns available items from widget with multiple options.
obj | Widget object, which can be accessed by ScriptMaster::getWidget |
Object BrainAtlasTool | ( | bool | visible = true , |
bool | quiet = false |
||
) |
Opens the Brain Atlas Tool.
visible | Whether or not the tool dialog is shown upon being created |
quiet | Whether or not the tool is in quiet mode. In quiet mode no warnings or popups will be displayed. |
bool copyFile | ( | string | filepath, |
string | newpath | ||
) |
Copies file from one path to another.
Current | path to file |
New | path to file |
|
inline |
Returns cosine of angle.
f | Angle (in radians) |
|
inline |
Convenience function to return a 0-padded counter.
c | Number to pad |
s | Number of digits in padded output |
Object dcmRep | ( | string | text | ) |
Creates and returns a DICOM repository object.
text | Location of DICOM repository. Can be URL, local directory, or other path to a DICOM repository. Local folders should start with "folder://" followed by the path. iPACS (R) repositories should start with "ipacss://". |
void debug | ( | string | text | ) |
Prints output to debugger and/or logfile.
text | String to be printed |
bool deleteFile | ( | string | filepath | ) |
Deletes file at given path.
filepath | Path to file |
bool deletePath | ( | string | path | ) |
Deletes folder and all its contents at given path.
path | to be deleted |
Object dicomBrowser | ( | AbstractDicomRepository * | rep | ) |
Returns VivoQuant's Data Browser object for a given DICOM repository.
rep | DICOM repository to use with Data Browser object |
void dicomBrowserLoad | ( | AbstractDicomRepository * | rep, |
string | studyInstanceUID, | ||
string | seriesInstanceUID, | ||
bool | append = false , |
||
bool | isPlanar = false , |
||
bool | force4Dto3D = false |
||
) |
Downloads image(s) from DICOM repository and loads them into the Data Manager.
rep | DICOM repository |
studyInstanceUID | StudyInstanceUID of study in which image(s) are found |
seriesInstanceUID | SeriesInstanceUID of series in which image(s) are found |
append | Determines whether incoming data is appended (1) or opened to replace data currently loaded in Data Manager (0) |
isPlanar | (optional) determines whether VivoQuant loads incoming data as planar (1) or not (0) |
force4Dto3D | (optional) determines whether VivoQuant loads incoming 4D data as 4D (1) or 3 |
void dicomBrowserLoad | ( | DicomBrowser * | dcmBrowser, |
string | studyInstanceUID, | ||
string | seriesInstanceUID, | ||
string | sopInstanceUID = string() |
||
) |
Downloads image(s) from DICOM repository and loads them into Data Manager.
dcmBrowser | DICOM browser object |
studyInstanceUID | StudyInstanceUID of study in which image(s) are found |
seriesInstanceUID | SeriesInstanceUID of series in which image(s) are found |
sopInstanceUID | SOPInstanceUID of image(s) |
Object downloadImages | ( | AbstractDicomRepository * | rep, |
string | studyInstanceUID, | ||
string | seriesInstanceUID, | ||
string | sopInstanceUID = string() |
||
) |
Downloads image to cache.
rep | DICOM repository |
studyInstanceUID | StudyInstanceUID of study |
seriesInstanceUID | SeriesInstanceUID of series |
sopInstanceUID | SOPInstanceUID of image |
Object downloadImages | ( | string | targetDir, |
AbstractDicomRepository * | rep, | ||
string | studyInstanceUID, | ||
string | seriesInstanceUID, | ||
string | sopInstanceUID = string() |
||
) |
Downloads image to a location on disk.
targetDir | Desired location on disk |
rep | DICOM repository |
studyInstanceUID | StudyInstanceUID of study |
seriesInstanceUID | SeriesInstanceUID of series |
sopInstanceUID | SOPInstanceUID of image |
Object downloadImages | ( | string | targetDir, |
bool | forceRedownload, | ||
AbstractDicomRepository * | rep, | ||
string | studyInstanceUID, | ||
string | seriesInstanceUID, | ||
string | sopInstanceUID = string() |
||
) |
Downloads image to a location on disk.
targetDir | Desired location on disk |
rep | DICOM repository |
studyInstanceUID | StudyInstanceUID of study |
seriesInstanceUID | SeriesInstanceUID of series |
sopInstanceUID | SOPInstanceUID of image |
forceRedownload | whether to re-download if the image is already in the cache |
void evalDialog | ( | string | text = string() | ) |
Opens VivoScript evaluation window with given text.
text | Text to write in VivoScript evaluation window |
bool fileExists | ( | string | path | ) |
Checks whether file at specified path exists.
path | Full path to file |
Index flatIndex | ( | int | i | ) |
Get a script flat image index object used to reference data in the Data Manager The index should be passed directly to function, ie: var t = op.testFunc(VQ.flatIndex(1));.
i | The first level position |
bool folderExists | ( | string | path | ) |
Checks whether file at specified path exists.
path | Full path to folder |
float frand | ( | ) |
Returns a random float.
string getConfig | ( | string | entry, |
string | defaultValue = string() |
||
) |
Returns current value of option in VivoQuant configuration.
entry | Option in VivoQuant configuration |
string getDcmString | ( | AbstractDicomRepository * | rep, |
string | tag, | ||
string | studyInstanceUID, | ||
string | seriesInstanceUID, | ||
string | sopInstanceUID | ||
) |
Looks up the value of the specified tag in the DICOM header of an image in the repository.
rep | DICOM repository |
tag | DICOM tag |
studyInstanceUID | StudyInstanceUID of study |
seriesInstanceUID | SeriesInstanceUID of series |
sopInstanceUID | SOPInstanceUID of image |
string getDefaultPal | ( | string | modality, |
int | i | ||
) |
get default palette from modality
image | modality |
index | in datamanager |
Object getDouble | ( | string | title, |
string | label, | ||
double | value = 0 , |
||
double | min = -2147483647 , |
||
double | max = 2147483647 , |
||
int | decimals = 1 |
||
) |
Displays input box to request double-precision value.
title | Text in title of box |
label | Text in body of box |
value | Default value of input |
min | Minimum allowed value for input |
max | Maximum allowed value for input |
decimals | Number of decimal places to store for value |
Object getDoubleInteractive | ( | string | title, |
string | label, | ||
double | value = 0 , |
||
double | min = -2147483647 , |
||
double | max = 2147483647 , |
||
int | decimals = 1 |
||
) |
Displays an input box like ScriptMaster::getDouble() and allows interaction with VivoQuant while the dialog is waiting for input.
string getEnv | ( | string | key, |
string | defaultValue = string() |
||
) |
Get the system's environment variables.
key | Name of system environment variable |
defaultValue | The default value if they key does not exists |
double getHalfLife | ( | string | name | ) |
Get an isotope's half life.
name | The isotope's name |
|
inline |
Returns current value of key in hash.
key | Key in hash |
|
inline |
Returns current numerical value of key in hash.
Key | in hash |
Object getIndexContainer | ( | int | i | ) |
Get a script image index container used to reference data in the Data Manager. Use .get() function of the container to access the internal index.
i | The first level position |
Object getIndexContainer | ( | int | i, |
int | j | ||
) |
Get a script image index container used to reference data in the Data Manager. Use .get() function of the container to access the internal index.
i | The first level position (parent) |
j | The second level position (child) |
Object getInt | ( | string | title, |
string | label, | ||
int | value = 0 , |
||
int | min = -2147483647 , |
||
int | max = 2147483647 , |
||
int | step = 1 |
||
) |
Displays input box to request integer value.
title | Text in title of box |
label | Text in body of box |
value | Default value of input |
min | Minimum allowed value for input |
max | Maximum allowed value for input |
step | Amount to increment value when scrolling in input box |
Object getIntInteractive | ( | string | title, |
string | label, | ||
int | value = 0 , |
||
int | min = -2147483647 , |
||
int | max = 2147483647 , |
||
int | step = 1 |
||
) |
Displays an input box like ScriptMaster::getInt() and allows interaction with VivoQuant while the dialog is waiting for input.
Object getItem | ( | string | title, |
string | label, | ||
Array< string > | items, | ||
int | current = 0 |
||
) |
Displays input box to request selection from user-defined list of options.
title | Text in title of box |
label | Text in body of box |
items | Array of items to include as options |
current | Index of default value to display |
Object getItemInteractive | ( | string | title, |
string | label, | ||
Array< string > | items, | ||
int | current = 0 |
||
) |
Displays an input box like ScriptMaster::getItem() and allows interaction with VivoQuant while the dialog is waiting for input.
Array<string> getLocalFiles | ( | string | caption = "Select files:" , |
string | startDir = string(".") |
||
) |
Returns array of paths to files selected by user in file dialog.
caption | Text in title of dialog |
startDir | Default path at which the file dialog starts |
Object getLocalPath | ( | string | caption = "Select directory:" , |
string | startDir = string(".") |
||
) |
Returns path of directory selected by user in file dialog.
caption | Text in title of dialog |
startDir | Default path at which file dialog starts |
Object getNMCTWidget | ( | string | name | ) |
Returns 3D Brain Atlas Tool widgets.
string getOS | ( | ) |
get current Operating System name
Object getROIStats | ( | Index | idx | ) |
Returns array of ROI quantification table information for given dataset and ALL ROIs.
idx | Index of dataset from which to calculate stats (see index()) |
Object getROIStats | ( | Index | idx, |
int | roiID, | ||
int | layerID = -1 |
||
) |
Returns object with ROI quantification table information for given dataset and ROI.
idx | Index of dataset from which to calculate stats (see index()) |
roiID | Index of ROI for which to calculate stats |
Object getSavePath | ( | string | caption = string("Select output file:") , |
string | startDir = string(".") , |
||
string | filter = string() |
||
) |
Returns path to file selected by user in file dialog.
caption | Text in title of dialog |
startDir | Default path at which file dialog starts |
filter | File type filter for file dialog |
Object getText | ( | string | title, |
string | label, | ||
string | text = string() , |
||
int | mode = 0 |
||
) |
Displays input box to request text input.
title | Text in title of box |
label | Text in body of box |
text | Default text |
mode | Determines whether input is visible in box (0), hidden (1), masked (2) or initially masked but visible on edit (3) |
Object getTextInteractive | ( | string | title, |
string | label, | ||
string | text = string() , |
||
int | mode = 0 |
||
) |
Displays an input box like ScriptMaster::getText() and allows interaction with VivoQuant while the dialog is waiting for input.
VariantMap getValues | ( | string | title, |
VariantMap & | map, | ||
bool | modal = true |
||
) |
Displays a dialog box to request input for multiple prompts at once.
title | Text in title of box |
map | Map of label to either a string with the type of input desired (text, int, double, item) or list of input parameters. The first element of the list should be the type of data desired. Based on that type, the rest of the list contains the same arguments that can be supplied to getText(), getInt(), getDouble(), and getItem(): ['text', string default] ['int', int default, int min, int max, int step] ['double', double default, double min, double max, int decimals, double step] ['item', Array<string> items] or simply [Array<string> items] All of these arguments are optional except for the list of items that must be supplied to a prompt of type 'item'. If the first argument in the list doesn't match one of the expected types, the input type will be assumed to be 'text' for one argument and 'item' for more than one argument. |
modal | If true, the dialog will not allow user interaction with the rest of VQ while it is open |
string getVersion | ( | ) |
Get the string representing the script version.
version | The version string |
Object getWidget | ( | string | name | ) |
Returns an object containing functions/properties of specified widget. Widgets are UI elements (e.g. buttons, checkboxes, combo boxes, etc.) in VivoQuant.
name | Name of widget. Names of widgets can be revealed by clicking the Lookup button on the VivoScript toolbar, and clicking the widget. |
Index index | ( | int | i | ) |
Get a script image index object used to reference data in the Data Manager The index should be passed directly to function, ie: var t = op.testFunc(VQ.index(1));.
i | The first level position |
Index index | ( | int | i, |
int | j | ||
) |
Get a script image index object used to reference data in the Data Manager The index should be passed directly to function, ie: var t = op.testFunc(VQ.index(0,1));.
i | The first level position (parent) |
j | The second level position (child) |
bool loadHash | ( | string | fileName | ) |
Loads local file, containing hash keys and values, to VivoQuant's persistent hash.
fileName | Path to file |
Object loadRepository | ( | string | name | ) |
Returns DICOM repository object from DICOM repository saved in VivoQuant.
name | Name of DICOM repository saved in VivoQuant |
void loadRGB | ( | Index | idx, |
Array< string > | imgFiles, | ||
float | voxX, | ||
float | voxY, | ||
float | voxZ, | ||
int | rgbRep = 4 , |
||
bool | forcePlanar = true |
||
) |
Load RGB data without the voxel size prompt.
idx | Index where opened data should be positioned in the DataManager (see index()) |
imgFiles | Index List of RGB image to load as a volume |
voxX | Expected X voxel size |
voxY | Expected Y voxel size |
voxZ | Expected Z voxel size |
rgbRep | Representation of RGB values (0=Red, 1=Green, 2=Blue, 3=AVG, 4=SUM, 5=MAX, 6=MIN) |
forcePlanar | Force volume to load as planar |
Object logMessage | ( | AbstractDicomRepository * | rep, |
string | msg, | ||
string | type = string() |
||
) |
Creates a log message on the given DICOM repository.
rep | The DicomRepository object |
msg | The message to be logged |
type | Message type |
Object logMessage | ( | Index | dataIndex, |
string | msg, | ||
string | noipacsTitle = string("Get iPACS from data") , |
||
string | type = string() |
||
) |
Creates a log message on the given's data iPACS repository.
dataIndex | The data index (see index()) |
msg | The message to be logged |
noipacsTitle | Default no iPACS title for warning |
type | Message type |
Array<string> lsDir | ( | string | dir, |
string | nameFilter = string() , |
||
int | filter = QDir::AllEntries|QDir::NoDotAndDotDot , |
||
QDir::SortFlags | sort = QDir::Name |
||
) |
Returns array of files in given directory on local disk.
dir | Directory on local disk |
nameFilter | Expression to use to filter files. Wildcard (*) is acceptable. |
Object MASTool | ( | string | libraryPath = string("") | ) |
Opens Multi-Atlas Segmentation Tool, formerly known as Whole Body Atlas)
libraryPath | The path of the library to be used |
void mkdir | ( | string | path, |
string | subdir | ||
) |
Creates sub-directory at specified path.
path | Path in which to create new subdirectory |
subdir | Name of new subdirectory |
bool openFileExternally | ( | string | path | ) |
Opens a local file in an external application.
path | Full path to file |
void openNMCT | ( | ) |
Opens 3D Brain Atlas Tool.
string preProcess | ( | string | protocol, |
bool | showDialog = false |
||
) |
Runs Pre-Processing Tool tool with the given protocol.
protocol | String with protocol |
showDialog | Whether or not the tool dialog is shown upon being created |
Object PreProcessingTool | ( | bool | showDialog = true | ) |
Opens the Pre-Processing Tool.
showDialog | Whether or not the tool dialog is shown upon being created |
Object progressDialog | ( | string | label, |
string | cancelButtonText, | ||
int | minimum, | ||
int | maximum | ||
) |
Returns a progress dialog object, which can be used to show the current state of a longer process.
label | Text in title of dialog box |
cancelButtonText | Text in button that cancels process |
minimum | Minimum value progress dialog object can take |
maxmimum | Maximum value progress dialog object can take |
Object query | ( | AbstractDicomRepository * | rep, |
string | query, | ||
Array< string > | arguments = Array< string >() , |
||
Object & | fields = Object() , |
||
bool | isPost = false |
||
) |
Performs custom query of DICOM repository using the iPACS API.
rep | DICOM repository |
base | endpoint for the query |
arguments | (optional) additional arguments to supply to the query |
fields | (optional) fields to submit along with query |
isPost | (optional) use POST method for the query |
Object queryDataPoints | ( | AbstractDicomRepository * | rep, |
string | type, | ||
string | uid, | ||
string | form | ||
) |
Perform query of DICOM repository for datapoints at project, study, series, or image level, and returns datapoints matching criteria.
rep | DICOM repository |
type | Level at which to query datapoints (e.g. project, studies, series, or images) |
uid | UID of study, series, or image for which to query datapoints. If querying project-level datapoints, leave this field blank. |
form | Form name of datapoint to query |
Object queryImages | ( | AbstractDicomRepository * | rep, |
string | studyInstanceUID, | ||
string | seriesInstanceUID | ||
) |
Performs query of DICOM repository for images within a series, and returns images matching criteria.
rep | DICOM repository |
studyInstanceUID | StudyInstanceUID of study |
seriesInstanceUID | SeriesInstanceUID of series |
Object querySeries | ( | AbstractDicomRepository * | rep, |
string | studyInstanceUID | ||
) |
Performs query of DICOM repository for series within a given study, and returns series matching criteria.
rep | DICOM repository |
studyInstanceUID | StudyInstanceUID of study |
Object queryStudies | ( | AbstractDicomRepository * | rep, |
string | patientName, | ||
string | patientID = string() , |
||
string | dateRange = string() , |
||
string | studyDesc = string() |
||
) |
Performs query of DICOM repository for studies matching argument criteria.
rep | DICOM repository |
patientName | PatientsName filter |
patientID | PatientID filter |
dateRange | Date filter |
studyDesc | StudyDescription filter |
Object queryStudyPlan | ( | AbstractDicomRepository * | rep, |
string | plan, | ||
string | cohort, | ||
string | group, | ||
string | animal, | ||
string | modality, | ||
string | date, | ||
string | event = "$0" |
||
) |
If
event | is omitted, the first event of the day is returned |
int rand | ( | ) |
Returns a random integer.
int rand | ( | int | max | ) |
Returns random positive integer less than given maximum.
max | Maximum value of random positive integer |
Object readCSVFile | ( | string | name | ) |
Parse a CSV file into arrays of values.
name | The CSV file to read |
Array<string> readFile | ( | string | fn | ) |
Reads file into array of strings.
fn | Path to file |
bool renameFile | ( | string | filepath, |
string | newname | ||
) |
Renames file at given path.
Current | path to file |
New | path to file |
bool rmDir | ( | string | dirpath | ) |
Removes directory at given path.
dirpath | Path to directory |
void runNMCT | ( | ) |
Runs 3D Brain Atlas Tool.
void saveDataViaITK | ( | string | fn, |
Index | idx | ||
) |
Stores data to disk in ITK MHD/RAW or MHD/ZRAW file format.
fn | Path of output file. Note: should end in .RAW or .ZRAW to output MHD/RAW or MHD/ZRAW pair, respectively. |
idx | Index of data to save in Data Manager (see index()) |
void saveDataViaITK4D | ( | string | fn | ) |
Stores all data in Data Manager to disk as a single ITK 4D dataset in MHD/RAW or MHD/ZRAW file format.
fn | Path of output file. Note: should end in .RAW or .ZRAW to output MHD/RAW or MHD/ZRAW pair, respectively. |
bool saveScreenshot | ( | string | fileName | ) |
Saves screenshot of VivoQuant.
fileName | Output path of screenshot |
void setConfig | ( | string | entry, |
Variant & | val, | ||
bool | force = false |
||
) |
Sets option in VivoQuant configuration to given value.
entry | Option in VivoQuant configuration |
val | Desired value |
force | (optional) If val is not a recognized value for the entry, determines whether the entry will be forced to take on the value (1) or not (0) |
void setDebuggerEnabled | ( | bool | toShow | ) |
Enable debugger.
toShow | Boolean (1 = enabled, 0 = disabled0) |
void setECRFCallback | ( | string | function | ) |
Add callback function to execute when eCRF is loaded.
function | Text containing callback function to execute |
|
inline |
Sets value of key in hash.
key | Key in hash |
val | Value for key |
|
inline |
Sets VivoQuant to interactive (or not)
b | Determines whether VivoQuant is interactive (1) or not (0) |
void setNMCTOutputFormat | ( | string | format | ) |
Sets 3D Brain Atlas Tool output format.
format | "Standard" or "Master" |
void setNMCTQuietModeOn | ( | ) |
Sets 3D Brain Atlas Tool to run in Quiet Mode. Prevents output from opening automatically upon completion.
void setOption | ( | string | cbname, |
string | opt | ||
) |
Set widget to given option; for use with widgets with multiple options (e.g. comboboxes)
cbname | Name of widget |
opt | Name of option |
void setOptionObj | ( | Object | obj, |
string | opt | ||
) |
Set widget to given option; for use with widgets with multiple options (e.g. comboboxes)
obj | Widget object |
opt | Name of option |
|
inline |
Sets VivoQuant to test mode (or not)
b | Determines whether VivoQuant is in test mode (1) or not (0) |
void setVersion | ( | string | version | ) |
Set a string representing the script version that will be used in audit log messages.
version | The version string |
void showMessage | ( | string | msg, |
bool | modal = true |
||
) |
Displays dialog box with user-defined message.
msg | Message displayed in dialog box |
modal | Determines whether VivoQuant is inaccessible while dialog box is open (true) or accessible (false) |
|
inline |
Returns sin of angle.
f | Angle (in radians) |
void splitROI2DICOM | ( | Index | idx | ) |
For each ROI in the 3D ROI Tool, creates a masked image of a given image in the Data Manager, where voxels outside the ROI are mapped to the given image's minimum.
id | Index of image in Data Manager (see index()) |
string startTool | ( | string | tool, |
string | baseDir = "." , |
||
Array< string > | args = Array< string >() |
||
) |
Start an external tool.
tool | The application or external script to start |
key | baseDir The working directory for the tool |
key | args The list of arguments for the tool |
int storeAsDICOM | ( | string | fn, |
Index | idx, | ||
int | format = -1 , |
||
bool | compress = false , |
||
bool | quiet = true |
||
) |
Stores data to disk in DICOM file format.
fn | Path of output file. |
idx | Index of data to save in Data Manager (see index()) |
format | The format (equals to an index in the DICOM Save Dialog) |
compress | Use JPEG2000 Lossless compression |
quiet | Hide warning, error or information dialog |
bool storeAsRaw | ( | string | fn, |
Index | idx | ||
) |
Stores data to disk in MHD/RAW (or MHD/ZRAW) file format.
fn | Path of output file. Note: should end in .RAW or .ZRAW to output MHD/RAW or MHD/ZRAW pair, respectively. |
idx | Index of data to save in Data Manager (see index()) |
int storeData | ( | AbstractDicomRepository * | rep, |
Index | idx, | ||
int | format = -1 |
||
) |
Stores DICOM data to a DICOM repository.
rep | The DICOM repository object |
idx | Index of data to save in Data Manager (see index()) |
format | The format (equals to an index in the DICOM Save Dialog) |
bool storeHash | ( | string | fileName | ) |
Stores all keys and values in hash to local file.
fileName | Path to output file in which to store hash keys and values |
string stripCredentials | ( | string | url_string | ) |
Returns URL of DICOM repository with credentials (username and password) removed.
url_string | Full URL with credentials |
Object submitDataPoint | ( | AbstractDicomRepository * | rep, |
string | uid, | ||
Object & | data, | ||
string | type = string() |
||
) |
Submits datapoint to DICOM repository.
rep | DICOM repository |
uid | UID of study, series, or image for which to submit datapoint. If submitting project-level datapoints, leave this field blank. |
data | Object with datapoint fields as the object keys |
type | Level at which to submit datapoint (e.g. project, studies, series, or image) |
void suspend | ( | string | message = string() | ) |
Suspends script and opens a modeless "Resume" dialog.
message | String to display in dialog box |
bool waitForECRF | ( | int | timeout = 0 | ) |
Specifies time to wait for eCRF.
timeout | Time to wait (in milliseconds) |
Object webDisk | ( | string | rep | ) |
Return IPACS WebDisk object for project in given iPACS repository.
rep | DICOM repository, including URL/path to repository and path to WebDisk directory |
bool writeFile | ( | string | fn, |
string | text | ||
) |
Writes file to disk with given text.
fn | Path to output file |
text | Text to write to output file |