VivoQuant 6.5.0
Loading...
Searching...
No Matches
Examples

Test Data

Sample DICOM files for use with these examples can be downloaded here: Download Test Data Extract the loose files into a folder called "data" one level lower than the script.

Getting Started

Example Description
Hello World Basic "Hello World!" function. Illustrates how to display dialog messages in VivoQuant.
Load Local Data Basic loading of a DICOM from local disk
Sizes A minimal one-shot diagnostic script that reports three related measurements for the currently loaded dataset: the slice viewer's current scale factor, the XY and Z voxel sizes in mm, and the derived real-world pixel size (voxel size divided by scale factor). Useful for quickly sanity-checking image resolution and display scaling before running quantitative workflows.
Spline MM A convenience script for setting the spline brush radius in real-world millimetres rather than pixels. It reads the current scale factor and XY voxel size, navigates to the spline tool tab, then asks the user for a brush size in mm via a dialog and converts it to the pixel-space value the bullyRadius widget expects (mm / pixPerMm + 0.5 for rounding).
ROI Neighborhood Segmentation Execute the ROI UIs neighborhood segmentation algorithm.
Dynamic ROI Creation Basic creation of a dynamic ROI with some quant table exporting.
Save Slice Images Method for looping over slices and saving out as images.
Customizable VQS UI Fully customizable and persistent VQS UI: the Script Panel's fields and sections, updated while the script works and read back at the end.
Script Settings with SettingsTab.vqs A script's settings kept in a file and shown on a Script Panel tab, with SettingsTab.vqs: describe the settings in a table, and run() checks them, waits for the user and saves them.
Histogram Tool Histogram of an image restricted to an ROI with the ROI Filter, read back in the script and saved as CSV and PDF.

Advanced Examples

Example Description
Exhaustive Get Values A comprehensive test and reference script for the VQ.getValues() API. It exercises every supported input type (text, int, double, item) with every valid argument combination — from minimal to fully specified — plus implicit shorthand forms. It also demonstrates the cancel/abort behaviour.
Compatible A compatibility shim library meant to be included by other scripts. It detects the application version from VQ.applicationName() and provides a VQC wrapper object that routes calls to either the current or legacy API depending on whether the major version is ≥ 6. It abstracts over renamed methods (controller/controler, mipController/mipControler) and changed conventions for storeData format enums and DICOM descriptor key names (IPACS_Repository vs __repository, IPACS_Project vs __project).
Script Panel: Tabs, Repeatables and Validation The Script Panel across several tabs: repeatable sections, a status line kept up to date as the user edits, fields made read-only from a handler, and waiting until the form is valid.
Ui Widget Tree Dump The script we use to produce the current UI widget tree for use with getWidget API calls.