VivoQuant
Public Member Functions | Protected Member Functions | List of all members
PreProcessing Class Reference

Object to handle operation of the PreProcessing Tool. More...

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. More...
 
void stringToSettings (string params)
 Apply Preprocessing settings (| - delimited and defined with key=value) to the Preprocessing settings. More...
 
void setProtocol (string protocol)
 Set values in the PreProcessing Tool based on the provided protocol string. More...
 
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. More...
 
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. More...
 
void setConvertUnit (string convertUnit)
 Set the target unit for image unit conversions, for example Ci, MBq, SUV, etc. More...
 
string getConvertUnit ()
 Get the current unit images will be converted to. More...
 
string convertUnit (string &outUnit)
 Convert an image's units to another's. More...
 
string createQCImages (AbstractDicomRepository *rep)
 Generate Quality Control images with the preprocessing tool. More...
 
void setUptakeParameter (string source, string parameter, Array< string > info, Index idx=Index())
 Change the value of a parameter used for decay correction. More...
 
void setPreferredUptakeSource (string source, Index idx=Index())
 Change the preferred source to check for decay correction parameters. More...
 
void setUptakeSourceOrder (Array< string > sourceList, Index idx=Index())
 Change the order in which to check sources for decay correction parameters. More...
 
void setInjectedDose (string injectedDose=string())
 Set the injected dose. If a unit is provided, it will be used instead of values from the image header. More...
 
void setInjectedDoseValue (string doseValue)
 Set the injected dose value. More...
 
void setInjectedDoseUnit (string doseUnit)
 Set the injected dose unit. More...
 
string getInjectedDose (Index idx=Index())
 Get the injected dose for a given image's DICOM header. More...
 
string getInjectedDoseValue ()
 Get the current injected dose value.
 
string getInjectedDoseUnit ()
 Get the current injected dose unit.
 
void setWeight (string weight=string())
 Set the weight value and unit. More...
 
void setWeightValue (string weightValue)
 Set the value of the weight. More...
 
void setWeightUnit (string weightUnit)
 Set the unit of the weight. More...
 
string getWeight (Index idx=Index())
 Get the weight. More...
 
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 of the data to be stored. More...
 
bool isValidQCFilename (string filename)
 Checks whether or not the provided filename can be used for saving Quality Control image files. More...
 
Array< string > parseDoseInput (string doseInput)
 Scans a dose input string (such as "1.0 Bq") for a valid value and unit combination. More...
 
Array< string > parseWeightInput (string weightInput)
 Scans a weight input string (such as "1.0 kg") for a valid value and unit combination. More...
 
string parseQCFilename (string filename)
 Scans a filename format string and replaces special characters with header key names. More...
 
string parseQCFilename (ImageData *image, string filename)
 Scans a filename format string and replaces special characters with header values from an image. More...
 

Protected Member Functions

bool updateInjectedDose ()
 Update the injected dose value by iterating through the currently loaded data in the DataManager until a valid dose is found. More...
 

Detailed Description

Object to handle operation of the PreProcessing Tool.

This object can be used to configure and run various pre-processing steps on loaded data.

See also ScriptMaster::PreProcessingTool() to obtain this object.

Member Function Documentation

◆ convertUnit()

string convertUnit ( string &  outUnit)

Convert an image's units to another's.

Parameters
outUnitthe unit to convert the image values to
Returns
a string detailing any problems in conversion, if any

◆ createQCImages()

string createQCImages ( AbstractDicomRepository *  rep)

Generate Quality Control images with the preprocessing tool.

Parameters
repa DICOM repository to save to
Returns
a string detailing any problems creating the images, if any

◆ execute()

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.

Parameters
protocolThe protocol string
Returns
A message describing the result of executing the protocol

◆ getConvertUnit()

string getConvertUnit ( )

Get the current unit images will be converted to.

Returns
an image unit (Ci, Bq, SUV, etc.) that is the current target for unit conversion.

◆ getInjectedDose()

string getInjectedDose ( Index  idx = Index())

Get the injected dose for a given image's DICOM header.

Parameters
idxThe index of the data. If no index is supplied the first image in the data list will be used.
Deprecated:
Use separate methods to get the dose value and unit instead.
Returns
The injected dose and its unit.

◆ getWeight()

string getWeight ( Index  idx = Index())

Get the weight.

Parameters
idxThe index of the data. If no index is supplied the first image in the data list will be used.
Deprecated:
Use seperate methods to get weight value and unit instead.
Returns
The weight and its unit.

◆ isValidQCFilename()

bool isValidQCFilename ( string  filename)

Checks whether or not the provided filename can be used for saving Quality Control image files.

Parameters
filenamethe filename that will be used to save the image
Returns
true if valid, false otherwise

◆ parseDoseInput()

Array<string> parseDoseInput ( string  doseInput)

Scans a dose input string (such as "1.0 Bq") for a valid value and unit combination.

Parameters
doseInputthe input string with dose information
Returns
a Array<string> of size = 2 containing dose value and unit, if a valid combination was found, or size = 0 otherwise

◆ parseQCFilename() [1/2]

string parseQCFilename ( ImageData *  image,
string  filename 
)

Scans a filename format string and replaces special characters with header values from an image.

Parameters
imagethe image to read
filenamethe format string, i.e. qc-i-I
Returns
a string with any matching special characters replaced with values from an image's header

◆ parseQCFilename() [2/2]

string parseQCFilename ( string  filename)

Scans a filename format string and replaces special characters with header key names.

Parameters
filenamethe format string, i.e. qc-i-I
Returns
a string with any matching special characters replaced with header key names

◆ parseWeightInput()

Array<string> parseWeightInput ( string  weightInput)

Scans a weight input string (such as "1.0 kg") for a valid value and unit combination.

Parameters
weightInputthe input string with weight information
Returns
a Array<string> of size = 2 containing weight value and unit, if a valid combination was found, or size = 0 otherwise

◆ setComment()

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.

Parameters
commentthe comment string

◆ setConvertUnit()

void setConvertUnit ( string  convertUnit)

Set the target unit for image unit conversions, for example Ci, MBq, SUV, etc.

Parameters
convertUnitthe unit to convert to

◆ setInjectedDose()

void setInjectedDose ( string  injectedDose = string())

Set the injected dose. If a unit is provided, it will be used instead of values from the image header.

Parameters
injectedDoseThe injected dose value.
Deprecated:
Use separate methods to set the dose value and unit instead. This function will be removed in VQ 6.0.

◆ setInjectedDoseUnit()

void setInjectedDoseUnit ( string  doseUnit)

Set the injected dose unit.

Parameters
doseUnit

◆ setInjectedDoseValue()

void setInjectedDoseValue ( string  doseValue)

Set the injected dose value.

Parameters
doseValue

◆ setPreferredUptakeSource()

void setPreferredUptakeSource ( string  source,
Index  idx = Index() 
)

Change the preferred source to check for decay correction parameters.

Parameters
sourceThe source of the info (DCM, Manual, or IPACS)
idxThe index of the data to modify

◆ setProtocol()

void setProtocol ( string  protocol)

Set values in the PreProcessing Tool based on the provided protocol string.

Parameters
protocolThe 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.

◆ setStoreRepository()

void setStoreRepository ( AbstractDicomRepository *  rep)

Sets the Dicom Repository of the data to be stored.

Parameters
repThe Dicom repository

◆ settingsToString()

string settingsToString ( )

Dump current Preprocessing settings to a string.

Returns
a string with the current settings

◆ setUptakeParameter()

void setUptakeParameter ( string  source,
string  parameter,
Array< string >  info,
Index  idx = Index() 
)

Change the value of a parameter used for decay correction.

Parameters
sourceThe source of the info (DCM, Manual, or IPACS)
parameterThe name of the parameter
infoThe parameter's value - either a list containing a single number or a list containing datapoint information
idxThe index of the data to modify

◆ setUptakeSourceOrder()

void setUptakeSourceOrder ( Array< string >  sourceList,
Index  idx = Index() 
)

Change the order in which to check sources for decay correction parameters.

Parameters
sourceListThe list of sources (DCM, Manual, or IPACS)
idxThe index of the data to modify

◆ setWeight()

void setWeight ( string  weight = string())

Set the weight value and unit.

Parameters
weightThe weight, which must include a unit.
Deprecated:
Use separate methods to set the weight value and unit instead. This function will be removed in VQ 6.0.

◆ setWeightUnit()

void setWeightUnit ( string  weightUnit)

Set the unit of the weight.

Parameters
weightUnit

◆ setWeightValue()

void setWeightValue ( string  weightValue)

Set the value of the weight.

Parameters
weightValue

◆ stringToSettings()

void stringToSettings ( string  params)

Apply Preprocessing settings (| - delimited and defined with key=value) to the Preprocessing settings.

Parameters
paramsone or more pipe delimited key=value pairs of settings

◆ updateInjectedDose()

bool updateInjectedDose ( )
protected

Update the injected dose value by iterating through the currently loaded data in the DataManager until a valid dose is found.

Returns
true if a valid dose was found, false otherwise