VQScript

VQScript, or VivoScript, is an implementation of ECMAScript (aka JavaScript) that allows you to access large parts of VivoQuant.

JavaScript structures

VQScript syntax is identical to JavaScript syntax.

Loop

    for (var i=0; i<10; ++i) {
        ...
    }

Function

    function blub() { ... }
    function bar(p1, p2, p3) { return p1+p2+p2; }
    var res = bar(1,2,3);

Array

    var array  = new Array();
    array[0]   = 'foo';
    array[1]   = 'bar';
    var array2 = new Array('foo', 'bar');
    var array3 = [ 'foo', 'bar' ];
    var last   = array2.pop();      // remove and get last element
    array2.push('burp');            // add element
Other array functions are for instance concat, join, reverse, sort, unshift, shift.

Hash

    ...

The VQScript Toolbar

Adding Script Shortcuts to the Toolbar

Shortcuts for commonly executed VQScripts can be added to the Quick Scripts menu on the VQScript Toolbar

To add a Quick Script shortcut:

Using the Peek Tool

The Peek tool is used to reveal the names of elements (called widgets) in the operator GUIs for use in scripts. The command VQ.getWidget("widgetName") can then be used to interact with these elements. For example, to determine the name of the button in the 3D ROI Tool that resets all ROIs, click on the peek icon, then click on the button in the 3D ROI Tool. A yellow box containing the class and name of the selected button will be displayed.

One can then use the command VQ.getWidget("buttonResetROIs").click() to click the button and reset all ROIs.

VQScript Examples

Included with VivoQuant are 30 VQScript example scripts to help you get started working with VQScript. These scripts illustrate some of the many ways VQScript may be used to streamline workflows in VivoQuant. To learn more about each files, see the VQScript Example Scripts page.

VQScript Objects and Object Methods

VQ Object

FunctionDescription
setDebuggerEnabled(bool toShow)
debug(text)Writes text to VQ's debug console (e.g. the Windows debugger, a Unix terminal or the VQ logfile.
The text looks like:
Script: 1234 text
with 1234 being the time (in ms) since the script started.
mainWin()Returns VQ's Main Window object (see below)
dataManager()Returns VQ's Data Manager object (see below)
dataList()
sliceViewer()Returns VQ's Slice Viewer object (see below)
multiViewer()
mipViewer()Returns VQ's MIP Viewer object (see below)
controler()Returns VQ's View Contoller object (see below)
mipControler()Returns VQ's MIP controler object (see below)
vtkController()Returns VQ's VTK controller object (see below)
vtkViewer()Returns VQ's VTK viewer object (see below)
eCRF()
waitForECRF(int timeout = 0)
quit()Asks VQ to quit (in an interactive session, the user is asked for confirmation, while in a --script session VQ terminates without further ado.
counter(c, s)Convenience function (e.g. used for fileNames) that returns a 0-padded counter with at least s digits, e.g. counter(3,5) would return 00003.
showMessage(text)Shows text to the user. Please note that the user has to confirm the message and the script is paused until she does.
askYesNoQuestion(const QString &msg)Shows QString to user in Yes/No dialog box. Returns a boolean value (1 = yes, 0 = no)
progressDialog(label, cancel, min, max)Returns a progress dialog, which can be used to show the current state of a longer processing, e.g.
    var progress = VQ.progressDialog("Saving Images", "Cancel", 0, dm.getDimX());
    for(var x=0; x<dm.getDimX(); x++) {            // set position to third in all three dim
        progress.setValue(x);
        ...
    }
    progress.hide();
getDouble(title, label, value=0, min=-214748364, max=2147483647, decimals=1)Shows input window to ask for a floating point number, e.g.
    var radius = VQ.getDouble("Smoothing", "Radius", 3.141, 1.0, 5.0, 3);
Defaults are shown above, and these parameters are optional, e.g. this will also work: var v = VQ.getDouble("Some", "Value");
getInt(title, label, value=0, min=2147483647, max=2147483647, step=1)See getDouble(...), however, returns an integer value.
getItem(title, label, value, items, current=0)Lets a user pick an item out of a list, e.g.
    var item = VQ.getItem("Some", "Item", [ "item 1", “item two", "3rd item" ], 1);
getText(title, label, text="", mode=normal)Allows user to input a line of text, returned by this function.
getLocalPath(caption, startdir=".")Allows the user to select a local directory after being presented with the message specified by caption.
getSavePath(const QString &caption = QString
getLocalFiles(const QString &caption = "Select files:", const QString &startDir = QString
getVivoScriptDir()Returns VivoScript directory
mkdir(path, subdir)Creates the subdirectory subdir at the path specified by path.
fileExists(path)If the file specified by path exists, returns true; otherwise returns false.
folderExists(const QString &path)
minMaxTool()Returns the VQ Min/Max Tool object (see below)
isInteractive();Returns whether the script is started interactively, or non-interactively by using --script /path/to/script command line switch.
See also setInteractive() and quit().
setInteractive(b);Sets interactive or non-interactive mode.
isTestMode()
setTestMode(bool b = true)
lumiQuantMaster()
dicomBrowser(DicomRepository *rep)
dcmRep(repURL) Creates and returns a DICOM repository object, e.g.:
    var folderUnix = VQ.dcmRep("folder:///path/to/dir");
    var folderWin = VQ.dcmRep("folder://c:/path/to/dir");
    var ipacs = VQ.dcmRep("ipacs://username:password@ipacs.invicro.com:/project");
    var ipacss = VQ.dcmRep("ipacss://username:password@ipacs.invicro.com:/project"); // secure
    var dicom = VQ.dcmRep("dicom://calling:called@dicom.host:port");
See queryStudies(...) for more examples.
loadRepository(const QString &name)
etListOfRepositories(const QString &type = QString
abort()Stops execution of the script, returning to VQ.
queryStudies(rep, patName, patID, dRange, studyDesc)Performs query of DICOM repository rep for studies matching argument criteria. patName, patID, dRange, studyDesc are strings
querySeries(rep, studyInstanceUID)Performs query of DICOM repository rep for series matching argument criterion. studyInstanceUID is a string
queryImages(rep, studyInstanceUID, seriesInstanceUID)Performs query of DICOM repository rep for images matching argument criteria. studyInstanceUID and seriesInstanceUID are strings
downloadImages(rep, studyInstanceUID, seriesInstanceUID, sopInstanceUID="")Downloads a full series (sopInstanceUID empty) or individual image. Returns local fileNames (probably in DICOM cache).
queryDataPoints(rep, type, UID, formname) Returns the data point associated with rep, type, UID and formname. formname may be any form on the iPACS, such as quantification, metadata, SubjectInformation or tumor_analysis. type delineates the type of data point, such as images or project.
submitDataPoint(DicomRepository *rep, const QString &uid, const QScriptValue &data)
dicomBrowserLoad(DicomRepository *rep, const QString &studyInstanceUID, const QString &seriesInstanceUID, bool append = false)
queryStudyPlan(DicomRepository *rep, const QString &plan, const QString &cohort, const QString &group, const QString &animal, const QString &modality, const QString &date, const QString &event = "$0")
getWidget(name)"Access widget with given name of current operator's dialog
currentOp()Allows access to current operator
currentView()Allows access to current view mode
availableItems(const QString &name)
availableItemsObj(QScriptValue obj)
setOption(const QString &dropDownName,const QString &optionValue)Sets a dropdown to provided optionValue text.
setOptionObj(QScriptValue dropDown,const QString &optionValue)Sets a dropdown, given by VQ.getWidget, to value provided by optionValue text.
stripCredentials(const QString &url_string)
stringMatch(const QString &ret, const QString &text)
stringMatchList(const QString &ret, const QString &text)
setConfig(const QString &entry, const QVariant &val)
getConfig(const QString &entry, const QString &defaultValue)
getHome()Returns VQ home directory
getCache()Returns cache directory
getTempFolder()
deleteFile(const QString &filepath)Delets file at filepath
rmDir(const QString &dirpath)Deletes directory at dirpath
triggerAction(name)Calls VQ menu, use | as separator
OA    VQ.triggerAction("Tools|CT|Bed removal");
preProcess(protocol)Performs preprocessing given a specified protocol.
storeAsRaw(fileName, idx)Store data at index idx as a raw/mhd file locally with filename fileName
storeAsDICOM(const QString &fileName, int i, int format = -1)Store data as DICOM file locally with filename fileName
saveDataViaITK4D(const QString &fileName)
writeFile(fileName, text)
appendFile
Writes or appends text to a file with name fileName.
appendFile(const QString &fileName, const QString &text)
readFile(const QString &fn)
brukerImporter()Returns a BrukerImporter object. See examples/loadBruker.vqs for an example.
imgInfImporter()
gelImporter()
rawImporter()
imgHdrImporter()
centerCursor() Centers the crosshair in the field of view.
webDisk(rep) Returns an IPACSWebDisk object for the repository specified by rep. (See below.)
hexColorToList(hex)
saveScreenshot(fileName) Saves a .png of the loaded image to the path specified by fileName.
unloadData(int startIndex, int numberToUnload)Unloads data from num sequential indicies, starting at index from. Using num= -1 unloads all data.
applicationName() Returns 'VivoQuant' + versionNumber
buildID() Returns VQ Build ID
zipTool() Returns a ZipArchive object (see below).
evalDialog(const QString &text = QString
mergeROIs(const QString &out, const QScriptValue &map)
splitROI2DICOM(int id)
lsDir(const QString &dir, const QString &filter = QString
frand()
suspend()Suspends execution of current script and generates dialog box. User must select "OK" to continue execution of script.
getHash(const QString &key, const QString &def = QString
getHashKeys()
setHash(const QString &key, const QString &val)
clearHash()
storeHash(const QString &fileName)
loadHash(const QString &fileName)
ipacs()
translateUnit(const QString &type, float value, const QString &input, const QString &output)
repairSlice(int dataset, int pos, int off=0, int thick=1)
getEnv(const QString &key, const QString &defaultValue = QString
startTool(const QString &tool, const QString &baseDir = ".", QStringList args = QStringList
bedRemoval(const QString &bedName = QString
getROIStats(int datID, int roiID)
getROIStats(int datID, int roiID)
combineFrames(QStringList pngFiles, const QString &outfile, int delay = 40, bool deleteAfter = false)
getNMCTWidget(const QString &name)
atlasPath()
openNMCT()
setNMCTQuietModeOn()
runNMCT()
getMPRWidget()
loadRGB(int i, QStringList imgFiles, float voxX, float voxY, float voxZ, int rgbRep=4 /* sum */, bool forcePlanar=true)
sendSlack(const QString &webhook, const QScriptValue &data)
resume(QAbstractButton *button)
eCRFDone()
eCRFError()

MainWin Object

FunctionDescription
setViewMode(view, op)Opens view and op, e.g.
     VQ.mainWin().setViewMode("Tile View", "Navigation");
     VQ.mainWin().setViewMode("Slice View", "3D ROI Tool");
saveImage(fileName, type) type
  • Slice Viewer: 0=MIP, 1=S, 2=C, 3=T, 4=All, 5=Everything
  • Tile Viewer: 0=S, 1=C, 2=T, 3=Screen, 4=All
saveMovie(fileName, type)See saveImage()
toggleMIP(bool toEnable)
scriptOpenECRF(DicomRepository *rep, const QString &uid, int dataIndex=0,QString type=QString()
setControlStatus(bool on)
dDataFromCommandLine(const QStringList &arguments)
openZIPACS(fileName)Opens the ZIPACS file at filename
loadScript()
executeScript(const QString &file, bool interactive = false)
stopScript()Terminates script
evalScript()Evaluates script
openReference()Open data for Reference via dialog box
openInput1()Open data for Input 1 via dialog box
appendData()Append data via dialog box
openRaw()Open raw images via dialog box
importBrukerMR(const QString &directory = QStringOpen BrukerMR file via dialog box
importMultiMHD()Open MultiMHD file via dialog box
openRGBSliceViewer()
openDICOM()Opens Data Browser to load data from DICOM repository
openDICOMLocal()Opens dialog box to load data from local DICOM repository
print()Print images
zoomIn()
zoomOut
Instead of zoomIn(), please use VQ.currentView().setScaleFactor(x)
zoomOut()Instead of zoomOut(), please use VQ.currentView().setScaleFactor(x)
normalSize()Auto zooms to original size
toggleFullScreen()Toggles Full Screen mode
setGlobalMinMax(b)
toggleShowRGB(bool b)
setRGBChannel()
about()Opens 'About VivoQuant'
showManual()Opens VivoQuant Manual
requestHelp()Opens 'Request Help' tool
registration()Opens Registration tab of Configuration menu
saveImage(fileName, type) Saves image with fileName. types are listed below type
  • Slice Viewer: 0=MIP, 1=S, 2=C, 3=T, 4=All, 5=Everything
  • Tile Viewer: 0=S, 1=C, 2=T, 3=Screen, 4=All
saveMovie(fileName, type)See saveImage()
scaleImage(float f)Scales image by factor of f
enableOpt(int mod, bool b)
showImagePreview(int idx)
checkForUpdate(bool verbose = false)Checks for available VivoQuant update
forceCheckForUpdate()Forces check for available VivoQuant update
loadDicomFromBrowser()
artCTRecoFromBrowser()
crosstalkRemoval()Runs Crosstalk removal NanoSPECT module
showMinMaxTool()Opens Min/Max Tool
showWorklistTool()Shows worklist tool panel
showHistogram()Shows histogram from Min/Max Tool
bedRemoval()Runs Bed Removal module
bioDistVis()
updateWindowTitle()
unloadedData()
loadedData(int idx)
changedData()
setupIPACSConnect()
showHints()
showStartupDialogs()
setupLayout2x2()Sets Main Display to Grid 2x2 view
setupLayout1x4()Sets Main Display to Grid 1x4 view
setupLayoutMIP()Sets Main Display to MIP only view
setupLayoutTrans()Sets Main Display to Transversal only view
setupLayoutSlice()Sets Main Display to Slices only layout
toggleCrosshair()Toggles appearance of crosshairs
setViewMode(view, op)Opens view and op, e.g.
				VQ.mainWin().setViewMode("Tile View", "Navigation");
				VQ.mainWin().setViewMode("Slice View", "3D ROI Tool");
			
finishedCTReco()
tartCTReconstruction(const QStringList &files = QStringList)
startBatchCT()
startIPACSSync()
startAppHomepage()
startOrgHomepage()
showConfig()Opens Configuration window
showCalibCTGeometrical()
showCalibMMP()
saveCalibrationTxt()
showUserData()
showNFFUniformity()
showNFFEnergy()
switchPatientName(bool b)
switchSliceNumber(bool b)
switchCornerInfo(bool b)
switchPosLabels(bool b)
switchCrosshair(bool b)
switchShowActive(bool b)
switchAutoZoom(bool b)
autoZoom()
showDICOMDump()
renameDICOM()
relabelDICOMStudies()
anonymizeDICOM()
getDataName(int type)
operatorHasChanged()
updateViewPort()
updatePaletteHeight()
enableLogfile(bool b)
startDbgView()
imageToCapture()
logout()Forgets all passwords in memory (does not change DICOM Rep configuration)
saveSession()Opens Save Session dialog box
loadSession(name)Opens Load Session dialog box
exportSession()Opens Export Session dialog box
updateGUIFromOptions()
handleLockScreen()
toggleVCView()
toggleMCView
Toggles Visual Control
toggleMCView()Toggles MIP Control
toggleDMView()Toggles Data Manager
toggleMinMaxTool()Toggles Min/Max Tool
toggleWorkflowWidget()Toggles Workflow Widget
minimizeFloatingDock(bool topLevel)

DataManager Object

FunctionDescription
openDat(id, [files])Opens data id (0=Ref, 1=Inp1, ...) contained in list of files [files].
getMinMax(int i, float &min, float &max)
getMin(int i)Returns minimum value of image at index i
getMax(int i)Returns maximum value of image at index i
getMinMaxCached(int i, float &min, float &max)
getMinCached(int i)Returns cached minimum value of image at index i
getMaxCached(int i)Returns cached maximum value of image at index i
setMinMaxCache(id, min, max)Sets cached minimum and maximum values of image at index i
getLevelWidthCached(int i, float &level, float &width)
getLevelCached(int i)
getWidthCached(int i)
setLevelWidthCache(int i, float level, float width)
getDataTypeString(int i=0)
voxelSize(id=0)
voxelSizeXY
voxelSizeDim(int dim, int i=0)
voxelSizeX(int i=0)Returns dimension of voxel along X axis
voxelSizeY(int i=0)Returns dimension of voxel along Y axis
voxelSizeXY(int i=0)
voxelSizeZ(int i=0)Returns dimension of voxel along Z axis
getDesc(id, key)Returns key meta-information for data at index id
setDesc(id, key, value)Updates meta-information for data at index id, e.g.
				dm.setDesc(0, "__repository_url", dcmRepURL);   // set source (to be able to load datapoints,
				dm.setDesc(0, "__project", projectName);        // such as 3D ROIs, annotations, etc...)
			
getDcmString(int i, const QString &key)
fillDICOMFromDesc()Fills DICOM header with meta-information
getSOPUID(int i)Returns SOPInstanceUID string for image at index
getSeriesUID(int i)Returns SeriesUID as string for image at index i
getStudyUID(int i)Returns StudyUID as string for image at index i
setUniqueStudyID(int i)Creates and sets StudyInstanceUID
setUniqueStudyID(int i, const QString &id)Sets StudyInstanceUID according to QString
setDataTypeAll(const QString &type)
getDataDetailsString(int i=0)
getHeaderSummary(int i=0)
isEmpty()Returns boolean; true if Data Manager is empty
hasData(int i=0)Returns boolean; true if index i has data
unloadData(from, num)Unloads data from num sequential indicies, starting at index from. Using num= -1 unloads all data.
swapData(int a, int b)Swaps data at index a and b
moveData(QList<int> list, int dst)
toggleDefaultShift(bool on)
signalDataChange(int i)
signalDataUpdated(int i)
signalOptEnabled(int i, bool b)
nalDataAboutToChange(int i)
updatePaletteType()

SliceViewer Object

FunctionDescription
setMinMaxCache(id, min, cutOff)
setOperator(AbstractOperator *op)
updateDisplay()
forceUpdateDisplay()
updateDisplay()
changedData(int i)
updatedData(int i)
unloadedData()
hangeBeforeGUIUpdate()
changedActive()
setupLayout(int type=0)
resetLayout()
linkControls(bool on)
toggleShowReference()Toggles display of Reference
toggleShowInput1()Toggles display of Input 1
toggleShowInput2()Toggles display of Input 2
newDataComing(int type)
newDataLoaded(int type)
iewerConcurrentTasks()
callQuantiCalc(int mod, float activity, QString actUnit)
callSpecActCalc(int mod, float activity, float volume, const QString &actUnit)Opens SPECT Act. Calculator module and inputs activity, volume, and actUnit
callSUVCalc(int mod, float activity, const QString &actUnit, float volume)Opens SUV Calculator module and inputs activity, actUnit and volume
resetViewTransforms(bool triggerRender=true)
renderVTK()Forces re-render of VTK Viewer
enableVTK(bool toEnable)Enables VTK Viewer
syncDataListToMIP()
syncMIPToDataList()

Controler Object

FunctionDescription
getIntense(int a)
getAlpha()Get the intensity value of the image at Input 1.
getDim()Get the intensity value of the Input 1 image.
getBalance()Get the intensity value of the Input 2 image
getActive(int a)
getShowROIs()
getShowAnnotations()
setIntense(int a1, float a2)
setAlpha(float a)Set the intensity of the image at Input 1 to f, a value between 0 and 1.
setDim(float a)Set the intensity of the Input 1 image to f, a value between 0 and 1.
setBalance(float a)Set the intensity of the Input 2 image to f, a value between 0 and 1.
getIntensity(i)Get the intensity value for the image at the ith position.
setIntensity(i,f)Set the intensity value for the image at the ith position to f, where f is a value between 0 and 1.
setActive(int a1, bool a2)If on is true, makes the image at the ith position active; otherwise makes the image inactive.
setShowROIs(bool a)
setShowAnnotations(bool a)
setCropStyle(CropView a)
setPos(i, val)Sets slice number in i view to val ; For i, 0 = X, 1 = Y, 2 = Z
setRange(i, from, to)Set the lower and upper bounds on the color palette range for the image at the ith position to the specified from and to values, respectively, where from and to are values between 0 and 1.
setPal(i, palname)Set the color palette for the image loaded in the ith position, where palname is the name of an available color palette (e.g. "gray" or "nih_fire2").
getRange(int dataID, bool isFrom /* otw to */)
setFrom(i, f)Set the lower bound on the color palette range for the image at the ith position to f, where f is a value between 0 and 1.
setTo(i, f)Set the upper bound on the color palette range for the image at the ith position to f, where f is a value between 0 and 1.
getFrom(i)Get the current lower bound on the color palette range for the image at the ith position.
getTo(i)Get the current upper bound on the color palette range for the image at the ith position.
setPal(int dataID, const QString &name)
getPal(int dataID)
invertPalette(int dataID)
getLinkedState()
updateImage()
adjustActiveState()Better to use setActive (see above)
emitResetViewport()
setViewPosX(int x)
setViewPosY(int y)
setViewPosZ(int z)
setIntensityRef(int val)
setIntensityInp1(int val)
setIntensityInp2(int val)
setActiveRef(bool active)
setActiveInp1(bool active)
setActiveInp2(bool active)
setCurrentViewport(int index)
setCurrentID(int id)
setCropStyle(CropView a)
setShowROIs(bool a)
setShowAnnotations(bool a)
syncStates()
setLinkedState(bool toLink)

MinMaxTool Object

FunctionDescription
clipMin0()Sets all values below minimum to 0
clipMax0()Sets all values above maximum to 0
clipMinMin()Sets all values below minimum to minimum
clipMaxMax()Sets all values above maximum to maximum
applyValues()Applies current values
resetValues()Restores values from cache
recalcValues()Recalculates actual minimum and maximum values
PercentileToImageVal()
centileButtonEnabled(int imageIdx)
copyToMax()
aveNewPercentilesCSV()Opens dialog box that allows user to save percentiles to .csv file
appendPercentilesCSV()Opens dialog box that allows user to append percentiles to existing .csv file
showTable(bool)
appendRow()
removeRow()
updateMode()
updateEnabledImages(int imgIdx)
show()
updateMIP()Updates MIP
updateDisplay()Updates Main Display
updateAll()Updates MIP, Main Display, etc.
showHistogram()Opens Histogram Tool
showPctileTool(bool)
updateROIList()Updates ROI List
updatePalette()
updateFromPalette()

MultiViewer Object

FunctionDescription
setPlane(int id, int p)
setData(int row, int col, int viewIndex, int dataIndex)
getEnabled(int row, int col)
setEnabled(int id, bool e)
setEnabled(int id, bool e)
setPlane(int id, int p)
activateView()
deactivateView()
updateDisplay(int id)
updateDisplay(int id)
newDataLoaded(int type)
eViewportDataChanged(int id=-1)
handleResetViewport(int id=-1)

IPACSWebDisk Object

FunctionDescription
lsDir(path)Returns a list of files/directories.
put(src, dest)Saves a file from the local path specified by src and stores it on the WebDisk at the path specified by dest
put(src, dest)Saves a file from the local path specified by src and stores it on the WebDisk at the path specified by dest
mkdir(path)Creates a WebDisk directory
rm(path, recursive=false)Deletes a WebDisk directory
get(src, dest)Retrieves the file specified by the path in src and places it locally in the path specified by dest
getPublicLink(const QString &file)
setExtraTimeout(int t)
execReport(const QString &path)
openInBrowser(const QString &path)
getStoreFile()
printProgress(int done, int total)

ZipArchive Object

FunctionDescription
createZip(fileName, srcdir)Zips the contents of the directory srcdir into a zip file named fileName.
unzip(zipfile, outdir)Unzips the zip file specified by zipfile to the directory outdir.
cancel()

DataList Object

FunctionDescription
annotate(int idx)
annotate(int idx)
setPaletteFromTo(int dataIndex, float pctFrom, float pctTo)
setPaletteFrom(int dataIndex, float percent)
getPaletteFrom(int dataIndex)
setPaletteTo(int dataIndex, float percent)
getPaletteTo(int dataIndex)
getPaletteLevel(int dataIndex)
getPaletteWidth(int dataIndex)
setDataPalette(int dataIndex, const QString &name)
getDataPalette(int dataIndex)
pdatePaletteContrast(int i, float value1, float value2)
showForm()
toggleForm()

MIPViewer Object

FunctionDescription
loadedSlice(int i)
updateDisplay()
scaleImage(float factor)
updateCacheStat()
setActive(QList<int> a)
setSync(bool s)
isSync()
parameterChanged()
invalidateImageCache()

MIPController Object

FunctionDescription
setNumber(int val)Sets number of frames in MIP; default = 60
sliderPos(int i)Sets View Angle slider to value i
getAlpha()Returns the intensity of the image at Input 1; Better to use getAlpha(), setAlpha() in VQ.controler() object
getDim()Returns the intensity of the image at Reference; Better to use getDim(), setDim() in VQ.controler() object
getBalance()Returns the intensity of the image at Input 2; Better to use getBalance(), setBalance() in VQ.controler() object
getIntensity(int i)Returns Intensity of image at ndex i
setPal(int i, QString name)Sets color palette of index i to name
playMovie(bool checked)Plays MIP movie
saveMovie()Use saveMovie() in VQ.mainWin() object
saveImage()Use saveImage() in VQ.mainWin() object
speedChanged(int val)Changes speed of MIP movie
setEnabled(bool)

VTKController Object

FunctionDescription
getMIPEnabled()
getMPREnabled()
getAnnotationEnabled()
setAnnotationEnabled(bool toEnable)
getOrientEnabled()
setOrientEnabled(bool toEnable)
getRenderSpeed()
setInteractiveDelay(int msec)
setUseRenderDelay(bool toEnable)
getUseRenderDelay()
orceVolumeMapperMode(int mode)
setStillUpdateRate(double factor)
getAutoUpdate()
tSmoothingIterations(int iter)
setFeatureAngle(double angle)
setPassBand(double passBand)
disableAxes(bool b = true)
setPatientsName(const QString &text)
setMPRPlanes(int planes)
tScalarOpacityPoints(int imgIdx, QList<QVariant> imgRange, QList<QVariant> opacityRange)
radientOpacityPoints(int imgIdx, QList<QVariant> imgRange, QList<QVariant> opacityRange)
tOpacityPointsScalar(int imgIdx, QList<QVariant> imgRange, QList<QVariant> opacityRange)
changeRenderSpeed(QString speed)
renderSpeedUpdated(QAction *action)
handleModified()
handleEnabledChanged()
updateVTK()Forces re-rendering of VTK
forceRender()
resetCamera()
setMPRImage(int i, double offset, QImage *image, int min=0)
updateMIPPointers()
imageLoaded(int i)
imageUnloaded()
imageUpdated(int i)
updateVolumeColors()
interactive()
startInteractive()
endInteractive()
transform(const vtkMatrix4x4 *mat)

VTKViewer Object

FunctionDescription
setEnableGradient(bool toEnable)
getGradientEnabled()
setBackgroundColor(const QString &fg, const QString &bg = QString()
setBackgroundColor(const QString &fg, const QString &bg = QString()
renderingProgress(vtkObject *obj)
setAzimuthAngle(int ang)
renderUpdate()
resetCamera()
resetPosition()
vtkUserEventsHandler(vtkObject *obj)

DicomRepository Object

FunctionDescription
get(const QString &key)
set(const QString &key, const QString &val)
setUsername(const QString &u)
setPassword(const QString &p)
username()
password()
wasCanceled()
project()
stop()

3D ROI Operator Object

FunctionDescription
addROI(const QString &name, const QString &colorName, bool immutable=false, bool hidden=false, int alphaSlice=127, int alphaSurface=255)Appends a new ROI to the table using provided parameters, with default arguments as needed.
editROI(int index, const QString &name, const QString &colorName, bool immutable=false, bool hidden=false, int alphaSlice=127, int alphaSurface=255)Edits ROI at provided index (zero is background) using provided parameters
deleteROI(int index=-1, int target=-1)Delete ROI at provided index. If the index provided is less than zero (default), the currently selected ROI will be deleted. Its voxels will be reassigned to the ROI defined by "target" (can be zero for background). If target is less than zero, the user will be prompted to provide an ROI as a target.
clearROI(int index=-1, int target=-1)Reassign voxels from ROI at "index" to ROI at "target". "index" and "target" are defined exactly as they are in the aforementioned deleteROI function.
clearAllROIs()Deletes all ROIs and reassigns them to background.
exportTable(const QString &filename)Save quantification table to CSV formatted spreadsheet at file provided by filename
cutROI(bool bg, bool quiet = false)Set all voxels in an ROI to the minimum intensity value of that image. Only affects visible images, or if Inp2 is selected, all images after Inp2. If bg is true, the cut ROI will be background. If false, the cut ROI will be the current ROI. The quiet option indicates whether VivoQuant will ask the user for confirmation or not.

Cropping Operator Object

FunctionDescription
executeCropping(bool forceClassicMIPCompatibility=false)Run cropping with currently set parameters
autoCrop()Set cropping boundaries to estimated border of images, exactly as the Cropping tool's autocrop button functions.
reset()Reset cropping boundaries to boundaries of the image
embed()Embed image into user-provided bounds in the operator GUI.

Reorientation/Registration Object

FunctionDescription
saveTransformationToFile(const QString &fileName)Save current transform to a file provided by fileName
loadTransformationFromFile(const QString &fileName)Load transformation from provided fileName. Returns an error message if the file could not be loaded succesfully.
getTransformParameters(int mode, int slice = 0)Returns an array of transform parameters for the mode provided (0=3D Manual, 1=2D Manual, 2=3D Auto, 3=2D Auto, 4=3D Deform, 5=2D Deform). If 2D, the slice may be provided.
getFixedTransformParameters(int mode, int slice = 0)Returns an array of fixed parameters for the transform in the mode provided.
applyTransformation()Applies the currently visualized transform to the selected images.