VivoQuant
|
Object for managing and querying all image data and meta-information in VivoQuant. More...
#include <DataManager.h>
Public Member Functions | |
bool | openDat (int type, Array< string > fileNames, bool forcePlanar=false, bool embedSliceDefault=false) |
Load a new image into VivoQuant from a list of filenames. | |
int | numROIs () |
Get number of regions of interest currently specified, including background Always greater than 1. | |
int | getDimX (Index idx) |
Get the number of sagittal slices ("X" dimension) in an image. | |
int | getDimY (Index idx) |
Get the number of coronal slices ("Y" dimension) in an image. | |
int | getDimZ (Index idx) |
Get the number of transverse/axial slices ("Z" dimension) in an image. | |
int | getDim (int id, Index idx) |
Get number of slices in an image along specified dimension. | |
int | getSize (Index idx) |
Get total number of voxels in an image. | |
float | getValue (int x, int y, int z, Index idx) |
Return the raw pixel value at provided voxel/pixel location. | |
float | getMin (Index idx) |
Get minimum raw voxel/pixel value of an image. | |
float | getMax (Index idx) |
Get maximum raw voxel/pixel value of an image. | |
void | setDynamicActive (Index idx, int activeId) |
Set the activated index for dynamic data. | |
int | getDynamicActive (Index idx) |
Get the activated child index for dynamic data. | |
bool | copyAsNewSeries (Index idx) |
Copy a given data set timepoint from a dynamic collapsed data set. | |
float | getMinCached (Index idx) |
Get the cached min intensity value of an image. | |
float | getMaxCached (Index idx) |
Get the cached max intensity value of an image. | |
void | setMinMaxCache (Index idx, float min, float max) |
Set the cached min/max intensity value of an image. | |
float | getLevelCached (Index idx) |
Get the cached window level itensity value of an image. | |
float | getWidthCached (Index idx) |
Get the cached window width itensity value of an image. | |
void | setLevelWidthCache (Index idx, float level, float width) |
Set the cached window level/width intensity value of an image. | |
bool | isPlanar (Index idx) |
Check if a given data set is planar or not. | |
string | getDataTypeString (Index idx) |
Get a string containing the data type of a given data set. | |
float | voxelSizeDim (int dim, Index idx) |
Get the voxel size of a given data set for a given dimension. | |
float | voxelSizeX (Index idx) |
Get the X voxel size of a given data set. | |
float | voxelSizeY (Index idx) |
Get the Y voxel size of a given data set. | |
float | voxelSizeXY (Index idx) |
Get the XY voxel size of a given data set. | |
float | voxelSizeZ (Index idx) |
Get the Z voxel size of a given data set. | |
string | getDesc (Index idx, string key) |
Get a DICOM tag value from a given data set. | |
void | setDesc (Index idx, string key, string val) |
Set a DICOM tag value to a given data set. | |
void | setDescs (Index idx, Array< string > keys, Array< string > vals) |
Set a list of DICOM tag value to a given data set. | |
double | getSUL (Index idx) |
Get the SUL value of a given data set. | |
string | getDcmString (Index idx, string key) |
Get a DICOM tag string value from a given data set. | |
string | getSOPUID (Index idx) |
Get the SOP UID of a given data set. | |
string | getSeriesUID (Index idx) |
Get the Series ID of a given data set. | |
string | getStudyUID (Index idx) |
Get the Study ID of a given data set. | |
void | setUniqueStudyID (Index idx) |
Set a unique Study ID to a given data set. | |
void | setUniqueStudyID (Index idx, string id) |
Set the given unique Study ID to a given data set. | |
Index | getParentImageIndex (DcmDataset *childImageHeader) |
Finds the index in the DataManager for a possible parent image to a dependent DICOM, for example the original image an RTSTRUCT would have been drawn on. We can match on either of the following: | |
string | getDataDetailsString (Index idx) |
Return a string with image details (original vs loaded for current voxel sizes, dimensions, and direction cosines matrix.) | |
string | getHeaderSummary (Index idx) |
Return a string with the header summary ( modality, patient name, and series description) | |
int | size () |
Return number of data in first level. | |
int | count (Index parent=Index()) |
Return number of dynamic data set contained at given index. | |
int | maxVis () |
Return the maximum number size that can be visualized. | |
bool | hasValid (Index idx) |
Check if the Data Manager holds valid data at the given index. | |
void | setPaletteParameters (Index idx, float param1, float param2) |
Set the palette values for the given data in Data Manager This function independent of the palette type. | |
void | setPaletteFromTo (Index idx, float from, float to) |
Set the palette "from" and "to" value for the given data in Data Manager. | |
void | setPaletteFrom (Index idx, float from) |
Set the palette "from" value for the given data in Data Manager. | |
void | setPaletteTo (Index idx, float to) |
Set the palette "to" value for the given data in Data Manager. | |
void | setPaletteLevel (Index idx, float level) |
Set the palette "level" value for the given data in Data Manager. | |
void | setPaletteWidth (Index idx, float width) |
Set the palette "width" value for the given data in Data Manager. | |
void | setPalette (Index idx, string name) |
Set the palette for the given data in Data Manager. | |
void | invertPalette (Index idx) |
Invert the palette for the given data in Data Manager. | |
void | saveDataPaletteParameter (string name) |
Save palette parameter to disk. | |
void | loadDataPaletteParameter (string name) |
load palette parameter from file | |
float | getPaletteFrom (Index idx) |
Get the palette "from" value for the given data in Data Manager. | |
float | getPaletteTo (Index idx) |
Get the palette "to" value for the given data in Data Manager. | |
float | getPaletteLevel (Index idx) |
Get the palette window "level" value for the given data in Data Manager. | |
float | getPaletteWidth (Index idx) |
Get the palette window "width" value for the given data in Data Manager. | |
string | getPaletteName (Index idx) |
Get the palette name for the given data in Data Manager. | |
bool | isPaletteInverted (Index idx) |
Get the inverted status of the palette for the given data in Data Manager. | |
void | unloadData (Index idx, int num=1) |
Unloads data. | |
void | unloadData (Array< Index > indices) |
Unloads a list of data. | |
void | swapData (Index a, Index b) |
Swap the position of two data set in the Data Manager. | |
void | moveData (Array< Index > list, int dst) |
Move data set in the Data Manager. | |
bool | mergeData (Array< Index > list, bool quiet=true) |
Create a collapsed data set with the selected data. | |
void | stackData (Array< int > &list, bool quiet=true) |
Create and append an image using multiple single-slice images and unload the images it was created from. | |
void | stackDataMultiple (QList< Variant > &list, bool quiet=true) |
Create and append images using multiple single-slice images and unload the images they were created from. | |
Protected Attributes | |
QVector< TPointAndMode > | m_paths |
list of annotation graphs | |
Friends | |
class | ImageSelectorWidget |
Object for managing and querying all image data and meta-information in VivoQuant.
This object can be used to query meta-information from an image, including the DICOM header. It can also be used to open/append new images into VQ and remove/unload images that are currently loaded.
Image data are indexed starting at zero. See also ScriptMaster::dataManager() to obtain this object.
bool copyAsNewSeries | ( | Index | idx | ) |
Copy a given data set timepoint from a dynamic collapsed data set.
idx | Index of data (see ScriptMaster::index()) |
int count | ( | Index | parent = Index() | ) |
Return number of dynamic data set contained at given index.
idx | Index of data (see ScriptMaster::index()) |
string getDataDetailsString | ( | Index | idx | ) |
Return a string with image details (original vs loaded for current voxel sizes, dimensions, and direction cosines matrix.)
idx | Index of data (see ScriptMaster::index()) |
string getDataTypeString | ( | Index | idx | ) |
Get a string containing the data type of a given data set.
idx | Index of data (see ScriptMaster::index()) |
string getDcmString | ( | Index | idx, |
string | key | ||
) |
Get a DICOM tag string value from a given data set.
idx | Index of data (see ScriptMaster::index()) |
string getDesc | ( | Index | idx, |
string | key | ||
) |
Get a DICOM tag value from a given data set.
idx | Index of data (see ScriptMaster::index()) |
keys | The tag/key |
vals | The value |
int getDim | ( | int | id, |
Index | idx | ||
) |
Get number of slices in an image along specified dimension.
id | Plane/dimension to query: 0=Sagittal, 1=Coronal, 2=Transverse/Axial |
idx | Index of data (see ScriptMaster::index()) |
int getDimX | ( | Index | idx | ) |
Get the number of sagittal slices ("X" dimension) in an image.
idx | Index of data (see ScriptMaster::index()) |
int getDimY | ( | Index | idx | ) |
Get the number of coronal slices ("Y" dimension) in an image.
idx | Index of data (see ScriptMaster::index()) |
int getDimZ | ( | Index | idx | ) |
Get the number of transverse/axial slices ("Z" dimension) in an image.
idx | Index of data (see ScriptMaster::index()) |
int getDynamicActive | ( | Index | idx | ) |
Get the activated child index for dynamic data.
idx | Index of data (see ScriptMaster::index()) |
string getHeaderSummary | ( | Index | idx | ) |
Return a string with the header summary ( modality, patient name, and series description)
idx | Index of data (see ScriptMaster::index()) |
float getLevelCached | ( | Index | idx | ) |
Get the cached window level itensity value of an image.
idx | Index of data (see ScriptMaster::index()) |
float getMax | ( | Index | idx | ) |
Get maximum raw voxel/pixel value of an image.
idx | Index of data (see ScriptMaster::index()) |
float getMaxCached | ( | Index | idx | ) |
Get the cached max intensity value of an image.
idx | Index of data (see ScriptMaster::index()) |
float getMin | ( | Index | idx | ) |
Get minimum raw voxel/pixel value of an image.
idx | Index of data (see ScriptMaster::index()) |
float getMinCached | ( | Index | idx | ) |
Get the cached min intensity value of an image.
idx | Index of data (see ScriptMaster::index()) |
float getPaletteFrom | ( | Index | idx | ) |
Get the palette "from" value for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
float getPaletteLevel | ( | Index | idx | ) |
Get the palette window "level" value for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
string getPaletteName | ( | Index | idx | ) |
Get the palette name for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
float getPaletteTo | ( | Index | idx | ) |
Get the palette "to" value for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
float getPaletteWidth | ( | Index | idx | ) |
Get the palette window "width" value for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
Index getParentImageIndex | ( | DcmDataset * | childImageHeader | ) |
Finds the index in the DataManager for a possible parent image to a dependent DICOM, for example the original image an RTSTRUCT would have been drawn on. We can match on either of the following:
childImageHeader | the DICOM header for the child image |
string getSeriesUID | ( | Index | idx | ) |
Get the Series ID of a given data set.
idx | Index of data (see ScriptMaster::index()) |
int getSize | ( | Index | idx | ) |
Get total number of voxels in an image.
idx | Index of data (see ScriptMaster::index()) |
string getSOPUID | ( | Index | idx | ) |
Get the SOP UID of a given data set.
idx | Index of data (see ScriptMaster::index()) |
string getStudyUID | ( | Index | idx | ) |
Get the Study ID of a given data set.
idx | Index of data (see ScriptMaster::index()) |
double getSUL | ( | Index | idx | ) |
Get the SUL value of a given data set.
idx | Index of data (see ScriptMaster::index()) |
float getValue | ( | int | x, |
int | y, | ||
int | z, | ||
Index | idx | ||
) |
Return the raw pixel value at provided voxel/pixel location.
x | Sagittal slice index |
y | Coronal slice index |
z | Transverse/Axial slice index |
idx | Index of data (see ScriptMaster::index()) |
float getWidthCached | ( | Index | idx | ) |
Get the cached window width itensity value of an image.
idx | Index of data (see ScriptMaster::index()) |
|
inline |
Check if the Data Manager holds valid data at the given index.
idx | Index of data (see ScriptMaster::index()) |
void invertPalette | ( | Index | idx | ) |
Invert the palette for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
bool isPaletteInverted | ( | Index | idx | ) |
Get the inverted status of the palette for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
bool isPlanar | ( | Index | idx | ) |
Check if a given data set is planar or not.
idx | Index of data (see ScriptMaster::index()) |
void loadDataPaletteParameter | ( | string | name | ) |
load palette parameter from file
path | with file name(*.txt) |
bool mergeData | ( | Array< Index > | list, |
bool | quiet = true |
||
) |
Create a collapsed data set with the selected data.
list | List of data index to be grouped (see ScriptMaster::index()) |
void moveData | ( | Array< Index > | list, |
int | dst | ||
) |
Move data set in the Data Manager.
a | List of data index to moved (see ScriptMaster::index()) |
b | Index of the parent destination to be moved. |
int numROIs | ( | ) |
Get number of regions of interest currently specified, including background Always greater than 1.
bool openDat | ( | int | type, |
Array< string > | fileNames, | ||
bool | forcePlanar = false , |
||
bool | embedSliceDefault = false |
||
) |
Load a new image into VivoQuant from a list of filenames.
type | Position where image will be loaded into the list. 0=Reference, 1=Input 1, etc. |
fileNames | Array of filenames containing full paths or path relative to current working directory where VQ was started from |
forcePlanar | (Optional) Indicates whether image should be forced into "Planar" mode upon loading https://www.vivoquant.com/cgi-bin/manual.cgi?config-data.html |
embedSliceDefault | (Optional) Indicates whether default values for embed slice (embedded in the center of the reference data) should be used or a dialog prompt will appear to define it. Only applies for plannar data. |
void saveDataPaletteParameter | ( | string | name | ) |
Save palette parameter to disk.
output | path with file name(*.txt) |
void setDesc | ( | Index | idx, |
string | key, | ||
string | val | ||
) |
Set a DICOM tag value to a given data set.
idx | Index of data (see ScriptMaster::index()) |
keys | The tag/key |
vals | The value |
void setDescs | ( | Index | idx, |
Array< string > | keys, | ||
Array< string > | vals | ||
) |
Set a list of DICOM tag value to a given data set.
idx | Index of data (see ScriptMaster::index()) |
keys | The list of tags/keys |
vals | The list of values |
void setDynamicActive | ( | Index | idx, |
int | activeId | ||
) |
Set the activated index for dynamic data.
idx | Index of data (see ScriptMaster::index()) |
activeId | indicate the number of child to be displayed. |
void setLevelWidthCache | ( | Index | idx, |
float | level, | ||
float | width | ||
) |
Set the cached window level/width intensity value of an image.
idx | Index of data (see ScriptMaster::index()) |
level | Window level or center |
width | Window width |
void setMinMaxCache | ( | Index | idx, |
float | min, | ||
float | max | ||
) |
Set the cached min/max intensity value of an image.
idx | Index of data (see ScriptMaster::index()) |
level | Window min |
width | Window max |
void setPalette | ( | Index | idx, |
string | name | ||
) |
Set the palette for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
name | Name of the palette |
void setPaletteFrom | ( | Index | idx, |
float | from | ||
) |
Set the palette "from" value for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
from | From parameter value from 0-1.0 |
void setPaletteFromTo | ( | Index | idx, |
float | from, | ||
float | to | ||
) |
Set the palette "from" and "to" value for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
from | From parameter value from 0-1.0 |
to | for right parameter from 0-1.0 |
void setPaletteLevel | ( | Index | idx, |
float | level | ||
) |
Set the palette "level" value for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
level | Level parameter value from 0-1.0 |
void setPaletteParameters | ( | Index | idx, |
float | param1, | ||
float | param2 | ||
) |
Set the palette values for the given data in Data Manager This function independent of the palette type.
idx | Index of data (see ScriptMaster::index()) |
param1 | First parameter value from 0-1.0 |
param2 | Second parameter value from 0-1.0 |
void setPaletteTo | ( | Index | idx, |
float | to | ||
) |
Set the palette "to" value for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
to | To parameter value from 0-1.0 |
void setPaletteWidth | ( | Index | idx, |
float | width | ||
) |
Set the palette "width" value for the given data in Data Manager.
idx | Index of data (see ScriptMaster::index()) |
width | Width parameter value from 0-1.0 |
void setUniqueStudyID | ( | Index | idx | ) |
Set a unique Study ID to a given data set.
idx | Index of data (see ScriptMaster::index()) |
void setUniqueStudyID | ( | Index | idx, |
string | id | ||
) |
Set the given unique Study ID to a given data set.
idx | Index of data (see ScriptMaster::index()) |
void stackData | ( | Array< int > & | list, |
bool | quiet = true |
||
) |
Create and append an image using multiple single-slice images and unload the images it was created from.
list | The indices of the data to be stacked |
quiet | (optional) If true, warnings are displayed in a UI popup, if false they are printed to the debug output. |
void stackDataMultiple | ( | QList< Variant > & | list, |
bool | quiet = true |
||
) |
Create and append images using multiple single-slice images and unload the images they were created from.
list | A list of lists, where each list contains indices of data that will be stacked into one image |
quiet | (optional) If true, warnings are displayed in a UI popup, if false they are printed to the debug output. |
void swapData | ( | Index | a, |
Index | b | ||
) |
Swap the position of two data set in the Data Manager.
a | Frist data index to swap (see ScriptMaster::index()) |
b | Second data index to swap (see ScriptMaster::index()) |
void unloadData | ( | Array< Index > | indices | ) |
Unloads a list of data.
indices | A list containing the indices to unload (see ScriptMaster::index()) |
void unloadData | ( | Index | idx, |
int | num = 1 |
||
) |
Unloads data.
from | Index at which to start unloading (see ScriptMaster::index()) |
num | Number of consecutive datasets to unload at the same level, starting with and including startIndex |
float voxelSizeDim | ( | int | dim, |
Index | idx | ||
) |
Get the voxel size of a given data set for a given dimension.
dim | the Dimension (x:0, y:1, z:2) |
idx | Index of data (see ScriptMaster::index()) |
float voxelSizeX | ( | Index | idx | ) |
Get the X voxel size of a given data set.
idx | Index of data (see ScriptMaster::index()) |
float voxelSizeXY | ( | Index | idx | ) |
Get the XY voxel size of a given data set.
idx | Index of data (see ScriptMaster::index()) |
float voxelSizeY | ( | Index | idx | ) |
Get the Y voxel size of a given data set.
idx | Index of data (see ScriptMaster::index()) |
float voxelSizeZ | ( | Index | idx | ) |
Get the Z voxel size of a given data set.
idx | Index of data (see ScriptMaster::index()) |