|
VivoQuant 6.3.0
|
Dialog and controller for configuring and running data pre-processing steps. More...
#include <PreProcessing.h>
Public Slots | |
| void | accept () |
| Runs execute() and, if it reports a problem, surfaces the resulting message to the user via a message box. | |
| void | bedRemovalState (Qt::CheckState state) |
| Updates the bed removal UI (label text and enabled state of the transform/bed selectors) to reflect the current cbBedRemoval tri-state check state: Checked = classic bed removal, Partially Checked = advanced bed removal, Unchecked = no bed removal. | |
Public Member Functions | |
| void | storeSettings () |
| Save current Preprocessing settings into the VQ settings. | |
| void | loadSettings () |
| Load current VQ settings for Preprocessing. | |
| string | settingsToString () |
| Dump current Preprocessing settings to a string. | |
| void | stringToSettings (string params) |
| Apply Preprocessing settings (| - delimited and defined with key=value) to the Preprocessing settings. | |
| void | setProtocol (string protocol) |
| Set values in the PreProcessing Tool based on the provided protocol string. | |
| string | execute (string protocol=string()) |
| Set values in the PreProcessing Tool based on the provided protocol string and execute the pre-processing based on these settings. | |
| void | setComment (string comment) |
| Add a comment to the series description of all loaded data. Each image should be marked as updated and will get a DICOM derivation entry on save. | |
| void | setConvertUnit (string convertUnit) |
| Set the target unit for image unit conversions, for example Ci, MBq, SUV, etc. Accepts either the current canonical spelling (e.g. "g/ml") or a recognized legacy alias (e.g. "SUV"); the corresponding unit-type category (Counts, Concentration, Percent, Per Weight/Mass, or SUV) is derived automatically – callers do not need to know about or set the unit-type category separately. | |
| string | getConvertUnit () |
| Get the current unit images will be converted to. | |
| string | getConvertUnitType () |
| Get the current unit-type category (Counts, Concentration, Percent, Per Weight/Mass, or SUV) associated with getConvertUnit(). This reflects the category cbUnitType is currently set to; it is derived automatically by setConvertUnit() and does not need to be set independently. | |
| string | convertUnit (string &outUnit) |
| Convert an image's units to another's. | |
| string | createQCImages (AbstractDicomRepository *rep) |
| Generate Quality Control images with the preprocessing tool. | |
| void | setUptakeParameter (string source, string parameter, Array< string > info, Index idx=Index()) |
| Change the value of a parameter used for decay correction. | |
| void | setPreferredUptakeSource (string source, Index idx=Index()) |
| Change the preferred source to check for decay correction parameters. | |
| void | setUptakeSourceOrder (Array< string > sourceList, Index idx=Index()) |
| Change the order in which to check sources for decay correction parameters. | |
| void | setInjectedDoseValue (string doseValue) |
| Set the injected dose value. | |
| void | setInjectedDoseUnit (string doseUnit) |
| Set the injected dose unit. | |
| string | getImgInjectedDoseValue (Index idx=Index()) |
| Get the injected dose for a given image's DICOM header. | |
| string | getImgInjectedDoseUnit (Index idx=Index()) |
| Get the injected dose for a given image's DICOM header. | |
| string | getInjectedDoseValue () |
| Get the current injected dose value setting in the preprocessor. | |
| string | getInjectedDoseUnit () |
| Get the current injected dose unit setting in the preprocessor. | |
| void | setWeightValue (string weightValue) |
| Set the value of the weight value setting in the preprocessor. | |
| void | setWeightUnit (string weightUnit) |
| Set the unit of the weight unit setting in the preprocessor. | |
| string | getImgWeightValue (Index idx=Index()) |
| Get the weight value of a loaded image. | |
| string | getImgWeightUnit (Index idx=Index()) |
| Get the weight unit of a loaded image. | |
| string | getWeightValue () |
| Get the current weight value. | |
| string | getWeightUnit () |
| Get the current weight unit. | |
| void | updateUptakeParameters () |
| Update uptake information. Should be called after calls to PreProcessing::setUptakeParameter() | |
| void | setStoreRepository (AbstractDicomRepository *rep) |
| Sets the DICOM repository for storage of QC images. | |
| bool | isValidQCFilename (string filename) |
| Checks whether or not the provided filename can be used for saving Quality Control image files. | |
| string | parseQCFilename (string filename) |
| Scans a filename format string and replaces special characters with header key names. | |
| string | parseQCFilename (ImageData *image, string filename) |
| Scans a filename format string and replaces special characters with header values from an image. | |
Static Public Attributes | |
| static Array< string > | s_suvModalities |
| Modalities eligible for unit conversion (activity/concentration/ ID/SUV, etc.) via convertUnit(), and for automatic weight/dose lookup via UptakeParams. Currently "PT" and "NM"; note that DICOM SUV Type (0054,1006) is a PET-specific concept, so downstream consumers should not assume "NM" images tagged with an SUV-family unit carry the same quantitative calibration guarantees as "PT". | |
Dialog and controller for configuring and running data pre-processing steps.
PreProcessing coordinates a set of optional, independently toggleable operations that are applied to the data currently loaded in the DataManager, in the following order:
Settings for each step are persisted to and restored from QSettings under the "Analysis" group (storeSettings() / loadSettings()), and can also be serialized to/from a compact pipe-delimited "protocol" string (settingsToString() / stringToSettings()) so that a full configuration can be captured, shared, or replayed via setProtocol().
Dose and weight values used for unit conversion can be sourced automatically from the loaded image's DICOM header (including decay-corrected dose and lean-body-mass-corrected weight), overridden manually, or restored from previously stored settings; see updateInjectedDose(), updateWeight(), and the associated setters/getters.
The class can be driven interactively as a modal dialog (show() / showDialog()) or invoked non-interactively from VQScript by supplying a protocol string directly to execute(), which runs the entire enabled pipeline and returns a status message.
See also ScriptMaster::PreProcessingTool() to obtain this object.
|
slot |
Updates the bed removal UI (label text and enabled state of the transform/bed selectors) to reflect the current cbBedRemoval tri-state check state: Checked = classic bed removal, Partially Checked = advanced bed removal, Unchecked = no bed removal.
| state | the new check state of cbBedRemoval |
| string convertUnit | ( | string & | outUnit | ) |
Convert an image's units to another's.
| outUnit | the unit to convert the image values to |
| string createQCImages | ( | AbstractDicomRepository * | rep | ) |
Generate Quality Control images with the preprocessing tool.
| rep | a DICOM repository to save to |
| string execute | ( | string | protocol = string() | ) |
Set values in the PreProcessing Tool based on the provided protocol string and execute the pre-processing based on these settings.
| protocol | The protocol string |
| string getConvertUnit | ( | ) |
Get the current unit images will be converted to.
| string getConvertUnitType | ( | ) |
Get the current unit-type category (Counts, Concentration, Percent, Per Weight/Mass, or SUV) associated with getConvertUnit(). This reflects the category cbUnitType is currently set to; it is derived automatically by setConvertUnit() and does not need to be set independently.
| string getImgInjectedDoseUnit | ( | Index | idx = Index() | ) |
Get the injected dose for a given image's DICOM header.
| idx | The index of the data. If no index is supplied the first image in the data list will be used. |
| string getImgInjectedDoseValue | ( | Index | idx = Index() | ) |
Get the injected dose for a given image's DICOM header.
| idx | The index of the data. If no index is supplied the first image in the data list will be used. |
| string getImgWeightUnit | ( | Index | idx = Index() | ) |
Get the weight unit of a loaded image.
| idx | The index of the data. If no index is supplied the first image in the data list will be used. |
| string getImgWeightValue | ( | Index | idx = Index() | ) |
Get the weight value of a loaded image.
| idx | The index of the data. If no index is supplied the first image in the data list will be used. |
| bool isValidQCFilename | ( | string | filename | ) |
Checks whether or not the provided filename can be used for saving Quality Control image files.
| filename | the filename that will be used to save the image |
| string parseQCFilename | ( | ImageData * | image, |
| string | filename | ||
| ) |
Scans a filename format string and replaces special characters with header values from an image.
| image | the image to read |
| filename | the format string, i.e. qc-i-I |
| string parseQCFilename | ( | string | filename | ) |
Scans a filename format string and replaces special characters with header key names.
| filename | the format string, i.e. qc-i-I |
| void setComment | ( | string | comment | ) |
Add a comment to the series description of all loaded data. Each image should be marked as updated and will get a DICOM derivation entry on save.
| comment | the comment string |
| void setConvertUnit | ( | string | convertUnit | ) |
Set the target unit for image unit conversions, for example Ci, MBq, SUV, etc. Accepts either the current canonical spelling (e.g. "g/ml") or a recognized legacy alias (e.g. "SUV"); the corresponding unit-type category (Counts, Concentration, Percent, Per Weight/Mass, or SUV) is derived automatically – callers do not need to know about or set the unit-type category separately.
| convertUnit | the unit to convert to |
| void setInjectedDoseUnit | ( | string | doseUnit | ) |
Set the injected dose unit.
| doseUnit |
| void setInjectedDoseValue | ( | string | doseValue | ) |
Set the injected dose value.
| doseValue |
| void setPreferredUptakeSource | ( | string | source, |
| Index | idx = Index() |
||
| ) |
Change the preferred source to check for decay correction parameters.
| source | The source of the info (DCM, Manual, or IPACS) |
| idx | The index of the data to modify |
| void setProtocol | ( | string | protocol | ) |
Set values in the PreProcessing Tool based on the provided protocol string.
| protocol | The protocol string, which is of the form "<preprocessingstep0>=<value0>|<preprocessingstep1>=<value1>|...|<preprocessingstepN>=<valueN>" An example protocol string can be generated by clicking the "Protocol" button in the PreProcessing Tool dialog. |
| void setStoreRepository | ( | AbstractDicomRepository * | rep | ) |
Sets the DICOM repository for storage of QC images.
| rep | The DICOM repository |
| string settingsToString | ( | ) |
Dump current Preprocessing settings to a string.
| void setUptakeParameter | ( | string | source, |
| string | parameter, | ||
| Array< string > | info, | ||
| Index | idx = Index() |
||
| ) |
Change the value of a parameter used for decay correction.
| source | The source of the info (DCM, Manual, or IPACS) |
| parameter | The name of the parameter |
| info | The parameter's value - either a list containing a single number or a list containing datapoint information |
| idx | The index of the data to modify |
| void setUptakeSourceOrder | ( | Array< string > | sourceList, |
| Index | idx = Index() |
||
| ) |
Change the order in which to check sources for decay correction parameters.
| sourceList | The list of sources (DCM, Manual, or IPACS) |
| idx | The index of the data to modify |
| void setWeightUnit | ( | string | weightUnit | ) |
Set the unit of the weight unit setting in the preprocessor.
| weightUnit |
| void setWeightValue | ( | string | weightValue | ) |
Set the value of the weight value setting in the preprocessor.
| weightValue |
| void stringToSettings | ( | string | params | ) |
Apply Preprocessing settings (| - delimited and defined with key=value) to the Preprocessing settings.
| params | one or more pipe delimited key=value pairs of settings |