SIVIC API
0.9.26
|
#include <svk4DImageData.h>
Public Types | |
enum | ActorType { PLOT_GRID, VOL_SELECTION, SAT_BANDS } |
Public Types inherited from svkImageData | |
enum | RangeComponent { REAL = 0, IMAGINARY, MAGNITUDE } |
enum | DataBasis { ROW = 0, COLUMN, SLICE, LR, PA, SI } |
Public Member Functions | |
vtkTypeMacro (svk4DImageData, svkImageData) | |
virtual void | GetNumberOfVoxels (int numVoxels[3]) |
virtual int | GetIDFromIndex (int indexX, int indexY, int indexZ, int *indexArray=NULL) |
vtkDataArray * | GetArray (int linearIndex) |
vtkDataArray * | GetArrayFromID (int index, int *indexArray=NULL) |
vtkDataArray * | GetArray (int x, int y, int z, int *indexArray=NULL) |
vtkDataArray * | GetArray (int *indexArray) |
void | SetArrayName (vtkDataArray *array, svkDcmHeader::DimensionVector *dimensionVector) |
virtual int | GetLastSlice (svkDcmHeader::Orientation sliceOrientation=svkDcmHeader::UNKNOWN_ORIENTATION) |
void | GetTlcBrcInUserSelection (int tlcBrc[2], double userSelection[6], svkDcmHeader::Orientation orientation=svkDcmHeader::UNKNOWN_ORIENTATION, int slice=-1) |
void | GetZeroImage (svkImageData *image) |
virtual void | GetImage (svkImageData *image, int point, int *indexArray=NULL, int component=2, int vtkDataType=VTK_VOID) |
virtual void | GetImage (svkImageData *image, int point, svkDcmHeader::DimensionVector *indexVector=NULL, int component=2, int vtkDataType=VTK_VOID) |
virtual void | GetImage (svkImageData *image, int point, string seriesDescription, int *indexArray=NULL, int component=2, int vtkDataType=VTK_VOID) |
virtual void | GetImage (svkImageData *image, int point, string seriesDescription, svkDcmHeader::DimensionVector *indexVector=NULL, int component=2, int vtkDataType=VTK_VOID) |
void | SetImage (vtkImageData *image, int point, int *indexArray=NULL) |
void | SetImage (vtkImageData *image, int point, svkDcmHeader::DimensionVector *indexVector) |
void | SetImageComponent (vtkImageData *image, int point, int *indexArray=NULL, int component=0) |
virtual void | UpdateRange (int component) |
int | GetNumberOfSlices (svkDcmHeader::Orientation sliceOrientation) |
virtual void | EstimateDataRange (double range[2], int minPt, int maxPt, int component, int *tlcBrc=NULL, int *indexArray=NULL) |
virtual int | GetVolumeIndexSize (int volumeIndex) |
virtual int | GetNumberOfVolumeDimensions () |
virtual void | GetPolyDataGrid (vtkPolyData *grid) |
Public Member Functions inherited from svkImageData | |
vtkTypeMacro (svkImageData, vtkImageData) | |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | DeepCopy (vtkDataObject *src) |
virtual void | DeepCopy (vtkDataObject *src, svkDcmHeader::DcmPixelDataFormat castToFormat) |
virtual void | ShallowCopy (vtkDataObject *src) |
virtual void | ShallowCopy (vtkDataObject *src, svkDcmHeader::DcmPixelDataFormat castToFormat) |
virtual void | ZeroCopy (vtkImageData *src, svkDcmHeader::DcmPixelDataFormat castToFormat=svkDcmHeader::UNDEFINED) |
virtual void | CopyAndFillComponents (vtkImageData *src, double fillValue, svkDcmHeader::DcmPixelDataFormat castToFormat=svkDcmHeader::UNDEFINED) |
virtual void | CastDataFormat (svkDcmHeader::DcmPixelDataFormat castToFormat) |
virtual void | CopyAndCastFrom (vtkImageData *inData, int extent[6]) |
virtual void | CopyAndCastFrom (vtkImageData *inData, int x0, int x1, int y0, int y1, int z0, int z1) |
virtual void | CopyStructure (vtkDataSet *ds) |
virtual void | CopyDcos (vtkDataObject *src) |
virtual void | CopyVtkImage (vtkImageData *sourceImage, double dcos[][3]) |
virtual double * | GetPoint (vtkIdType ptId) |
virtual void | GetPoint (vtkIdType id, double x[3]) |
virtual vtkCell * | GetCell (vtkIdType cellId) |
virtual void | GetCell (vtkIdType cellId, vtkGenericCell *cell) |
virtual void | GetCellBounds (vtkIdType cellId, double bounds[6]) |
virtual vtkIdType | FindPoint (double x, double y, double z) |
virtual vtkIdType | FindPoint (double x[3]) |
virtual vtkIdType | FindCell (double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) |
virtual vtkIdType | FindCell (double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) |
virtual vtkCell * | FindAndGetCell (double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) |
virtual int | GetCellType (vtkIdType cellId) |
virtual void | GetCellPoints (vtkIdType cellId, vtkIdList *ptIds) |
virtual void | GetPointCells (vtkIdType ptId, vtkIdList *cellIds) |
virtual void | ComputeBounds () |
virtual int | ComputeStructuredCoordinates (double x[3], int ijk[3], double pcoords[3]) |
virtual void | GetVoxelGradient (int i, int j, int k, vtkDataArray *s, vtkDataArray *g) |
virtual void | GetPointGradient (int i, int j, int k, vtkDataArray *s, double g[3]) |
virtual void | SetAxisUpdateExtent (int axis, int min, int max) |
virtual void | GetAxisUpdateExtent (int axis, int &min, int &max) |
virtual void | SetDcos (double x[3][3]) |
virtual void | GetDcos (double x[3][3]) |
void | SetDcmHeader (svkDcmHeader *dcmHeader) |
svkDcmHeader * | GetDcmHeader () |
void | SetProvenance (svkProvenance *provenance) |
svkProvenance * | GetProvenance () |
int | GetIDFromIndex (int indexX, int indexY, int indexZ) |
void | GetIndexFromID (int voxelID, int *indexX, int *indexY, int *indexZ) |
void | GetIndexFromID (int voxelID, int *index) |
void | GetIndexFromPosition (double posLPS[3], int *index) |
void | GetIndexFromPosition (double posLPS[3], double *index) |
virtual void | GetPositionFromIndex (int *index, double *posLPS) |
virtual void | GetSliceOrigin (int slice, double *sliceOrigin, svkDcmHeader::Orientation sliceOrientation=svkDcmHeader::UNKNOWN_ORIENTATION) |
virtual void | GetSliceCenter (int slice, double *sliceCenter, svkDcmHeader::Orientation sliceOrientation=svkDcmHeader::UNKNOWN_ORIENTATION) |
virtual void | GetSliceNormal (double *normal, svkDcmHeader::Orientation sliceOrientation=svkDcmHeader::UNKNOWN_ORIENTATION) |
virtual int | GetClosestSlice (double *posLPS, svkDcmHeader::Orientation sliceOrientation=svkDcmHeader::UNKNOWN_ORIENTATION, double tolerance=-1) |
virtual int | GetFirstSlice (svkDcmHeader::Orientation sliceOrientation=svkDcmHeader::UNKNOWN_ORIENTATION) |
virtual void | GetDataBasis (double basisVector[3], DataBasis basis) |
virtual int | GetOrientationIndex (svkDcmHeader::Orientation orientation) |
virtual void | GetImageCenter (double *center) |
void | GetDataRange (double range[2], int component) |
Getter of the data range variable. More... | |
void | SetDataRange (double range[2], int component) |
Setter of the data range variable. More... | |
void | SetSourceData (svkImageData *source) |
svkImageData * | GetSourceData () |
void | SyncVTKImageDataToDcmHeader () |
vtkSetStringMacro (SourceFileName) | |
vtkGetStringMacro (SourceFileName) | |
Static Public Member Functions | |
static svk4DImageData * | New () |
static vtkObject * | NewObject () |
static string | GetArrayName (svkDcmHeader::DimensionVector *dimensionVector) |
static bool | IsIndexInExtent (int *extent, svkDcmHeader::DimensionVector *indexVector) |
Static Public Member Functions inherited from svkImageData | |
static void | RemoveArrays (svkImageData *data) |
Protected Member Functions | |
svk4DImageData () | |
~svk4DImageData () | |
Protected Member Functions inherited from svkImageData | |
svkImageData () | |
~svkImageData () | |
bool | WasModified () |
virtual void | UpdateSvkParams () |
int | FindMatchingSlice (double *posLPS, svkDcmHeader::Orientation sliceOrientation, double *origin, double *spacing, double tolerance=-1) |
Additional Inherited Members | |
Protected Attributes inherited from svkImageData | |
svkDcmHeader * | dcmHeader |
svkProvenance * | provenance |
char * | SourceFileName |
svkImageData * | source |
double | range [3][2] |
Range needs to be able to accomodate real, imaginary, and magnitude components. More... | |
This class represents multi-volumentric 4D imaging data. Data is stored in its vtkCellData object and we will have one vtkDataArray per voxel/ per volume. Data can be accessed with general GetArray methods that take as input the number of volumetric indices, an array the index values, and an array of dimension sizes. From this a linear index is determined (based on the order of these afore mentioned arrays ) and the data can be accessed. As such it is extremely important not to change the order of the arrays as it implies the cell association.
enum ActorType |
|
protected |
Constructor.
|
protected |
Destructor.
|
virtual |
Attempts to estimate the data range for a given frequency range. It finds the average maximum/minimum then adds three standard deviations. This should cover around 99% of the peaks.
range | |
minPt | |
maxPt | |
component | |
tlcBrc | |
indexArray |
References svk4DImageData::GetArray(), svkImageData::GetIndexFromID(), and svkImageData::MAGNITUDE.
vtkDataArray * GetArray | ( | int | linearIndex | ) |
Gets the array by linear index.
linearIndex |
Referenced by svk4DImageData::EstimateDataRange(), svk4DImageData::GetArray(), svk4DImageData::GetArrayFromID(), svk4DImageData::GetImage(), svkMrsImageData::GetSpectrum(), svkMrsImageData::InitializeDataArrays(), svkGEPFileMapper::ReorderEPSI(), svkDSCDeltaR2::RequestData(), svkMRSKinetics::RequestData(), svkMrsImageFFT::RequestDataSpatial(), svkMrsZeroFill::RequestDataSpatial(), svk4DImageData::SetImage(), svk4DImageData::SetImageComponent(), svkMRSAutoPhase::SVKRequestDataPreExec(), and svk4DImageData::UpdateRange().
vtkDataArray * GetArray | ( | int | x, |
int | y, | ||
int | z, | ||
int * | indexArray = NULL |
||
) |
Gets an array based on the xyz index of the voxel and a volumetric index array.
x | |
y | |
z | |
indexArray |
References svk4DImageData::GetArray(), and svk4DImageData::GetIDFromIndex().
vtkDataArray* GetArray | ( | int * | indexArray | ) |
vtkDataArray * GetArrayFromID | ( | int | index, |
int * | indexArray = NULL |
||
) |
Gets a specified data array from linear index.
References svk4DImageData::GetArray(), and svkImageData::GetIndexFromID().
Referenced by svkMrsImageData::GetSpectrumFromID().
|
static |
Takes vector of dimension indices and constructs an array name for the cell data lookup.
References svkDcmHeader::GetDimensionVectorValue(), and svkTypeUtils::IntToString().
Referenced by svkEPSIReorder::CombineLobes(), svkMrsImageData::InitializeDataArrays(), svkImageData::RemoveArrays(), and svk4DImageData::SetArrayName().
|
virtual |
|
virtual |
Method will extract a volume into a vtkImageData object representing a single point in the spectra. This is usefull for spatial FFT's.
target | image the point image (must be initialized) |
point | the point in the array you wish operate on |
component | the component to operate on |
timePoint | the time point to operate on |
channel | the the channel to operate on |
component | (0 = real, 1=im, 2=cmplx) |
References svkImageData::CopyDcos(), svk4DImageData::GetArray(), and svk4DImageData::GetIDFromIndex().
Referenced by svk4DImageData::GetImage(), and svk4DImageData::GetZeroImage().
|
virtual |
Method will extract a volume into a vtkImageData object representing a single point in the spectra. This is usefull for spatial FFT's.
target | image the point image (must be initialized) |
point | the point in the array you wish operate on |
component | the component to operate on |
timePoint | the time point to operate on |
channel | the the channel to operate on |
component | (0 = real, 1=im, 2=cmplx) |
References svkDcmHeader::COL_INDEX, svkImageData::CopyDcos(), svk4DImageData::GetArray(), svkDcmHeader::GetCellIDFromDimensionVectorIndex(), svkImageData::GetDcmHeader(), svkDcmHeader::GetDimensionIndexVector(), svkDcmHeader::GetSpatialCellIDFromDimensionVectorIndex(), svkDcmHeader::GetSpatialDimensions(), loopVector, svkDcmHeader::ROW_INDEX, svkDcmHeader::SetDimensionVectorValue(), and svkDcmHeader::SLICE_INDEX.
|
virtual |
Method will extract a volume into a vtkImageData object representing a single point in the 4D representation. This is useful for spatial FFT's and map generation.
target | image the point image (must be initialized) |
point | the point in the array you wish operate on |
seriesDescription | for DCM header |
indexArray | is the array of non-spatial indices, e.g. channel and time point |
component | (0 = real, 1=im, 2=cmplx) |
References svkImageData::GetDcmHeader(), svk4DImageData::GetImage(), svkEnhancedMRIIOD::InitDcmHeader(), svkDcmHeader::InitDerivedMRIHeader(), svkEnhancedMRIIOD::New(), svkIOD::SetDcmHeader(), and svkImageData::SyncVTKImageDataToDcmHeader().
|
virtual |
Method will extract a 3D volume into a vtkImageData object representing a single 3D point from the 4+D representation. This is useful for spatial FFT's and map generation.
target | image the point image (must be initialized) |
point | the point in the array you wish operate on |
seriesDescription | for DCM header |
indexVector | is the array of non-spatial indices, e.g. channel and time point for the image we want to get |
component | (0 = real, 1=im, 2=cmplx) |
References svkImageData::GetDcmHeader(), svk4DImageData::GetImage(), svkEnhancedMRIIOD::InitDcmHeader(), svkDcmHeader::InitDerivedMRIHeader(), svkEnhancedMRIIOD::New(), svkIOD::SetDcmHeader(), and svkImageData::SyncVTKImageDataToDcmHeader().
|
virtual |
Get the last slice index for a given orientation. This is different for cell data so that is why it is overloaded.
sliceOrientation | the orientation whose last slice you wish to get |
Reimplemented from svkImageData.
Referenced by svkMrsImageData::Get2DProjectedTlcBrcInSelectionBox(), svk4DImageData::GetTlcBrcInUserSelection(), and svkMrsImageData::IsSliceInSelectionBox().
|
virtual |
Determins the number of slices for a given orientation.
Reimplemented from svkImageData.
References svkImageData::GetDcmHeader(), svkImageData::GetOrientationIndex(), svkDcmHeader::GetOrientationType(), and svkDcmHeader::UNKNOWN_ORIENTATION.
|
virtual |
Currently assumes one dimension. TODO: Use the header to dynamically determine the number of dimensions
Reimplemented in svkMrsImageData.
Referenced by svk4DImageData::GetIDFromIndex(), svk4DImageData::GetZeroImage(), and svkPlotLineGrid::SetInput().
|
virtual |
Returns the number of voxels in the data set.
Implements svkImageData.
Referenced by svkMultiCoilPhase::CalculateCenterPhase(), svkMrsImageData::GetSelectionBoxMask(), svkIntegratePeak::RequestData(), svkMrsLinearPhase::RequestData(), svkDSCDeltaR2::RequestData(), and svkMrsZeroFill::RequestInformation().
|
virtual |
References dims.
void GetTlcBrcInUserSelection | ( | int | tlcBrc[2], |
double | userSelection[6], | ||
svkDcmHeader::Orientation | orientation = svkDcmHeader::UNKNOWN_ORIENTATION , |
||
int | slice = -1 |
||
) |
This will get the top left corner, and bottom right hand corner (low index-high index) for a given selection and slice. It assumes the userSelection defines a minimum and maximum range and that the user wishes to select all voxels within that range (for a given slice) in a regular box aligned with the dcos having corners at the minimum and maximum values. If no slice is defined
tlcBrc | the destination for the result of the calculation |
userSelection | the [minx, maxx, miny, maxy, minz, maxz] selection range |
slice | the slice within which to make the selection, if slice is outside of the range then the resulting tlcBrc will span the slices in the given selection |
References svkImageData::GetDcmHeader(), svkImageData::GetFirstSlice(), svkImageData::GetIndexFromPosition(), svk4DImageData::GetLastSlice(), svkImageData::GetOrientationIndex(), svkDcmHeader::GetOrientationType(), and svkDcmHeader::UNKNOWN_ORIENTATION.
|
virtual |
Gets the size of the given volume Index
volumeIndex |
Reimplemented in svkMrsImageData.
References svkImageData::dcmHeader, and svkDcmHeader::GetNumberOfCoils().
Referenced by svk4DImageData::GetIDFromIndex().
void GetZeroImage | ( | svkImageData * | image | ) |
Method will extract a volume into a svkImageData object that matches the geometry of the 4D Image volume with a zero value for all pixels.
target | image the zero image (must be initialized) |
References svk4DImageData::GetImage(), and svk4DImageData::GetNumberOfVolumeDimensions().
Referenced by svkVoxelTaggingUtils::CreateVoxelTagData(), svkHSVD::RequestData(), and svkMRSAutoPhase::SVKRequestDataPreExec().
|
static |
References svkDcmHeader::GetDimensionVectorValue().
Referenced by svkMRSAutoPhase::AutoPhaseExecute(), and svkMrsImageFFT::RequestDataSpectral().
|
static |
Referenced by svkMriImageData::GetCellDataRepresentation(), and svk4DImageData::NewObject().
|
static |
This is used by vtkInstantiator and is used in svk algorithms
References svk4DImageData::New().
Referenced by svkImageAlgorithm::svkImageAlgorithm(), and svkThreadedImageAlgorithm::svkThreadedImageAlgorithm().
void SetArrayName | ( | vtkDataArray * | array, |
svkDcmHeader::DimensionVector * | dimensionVector | ||
) |
Takes vector of dimension indices and constructs an array name for the cell data (vtkDataArray). Will always be at least: "col row slice", but may have additional indices appended as well.
References svk4DImageData::GetArrayName().
Referenced by svkGEPFileMapper::ReorderEPSI().
void SetImage | ( | vtkImageData * | image, |
int | point, | ||
int * | indexArray = NULL |
||
) |
Method will set a spectral point from a vtkImageData object representing a single 3D image point in the spectra. This is usefull for spatial FFT's.
image | the point image |
point | the point in the array you wish operate on |
timePoint | the time point to operate on |
channel | the the channel to operate on |
References svk4DImageData::GetArray(), and svk4DImageData::GetIDFromIndex().
Referenced by svkMriImageData::SyncCellRepresentationToPixelData().
void SetImage | ( | vtkImageData * | image, |
int | point, | ||
svkDcmHeader::DimensionVector * | indexVector | ||
) |
Method will set a spectral point from a vtkImageData object representing a single 3D image point in the spectra. This is usefull for spatial FFT's.
image | the point image |
point | the point in the array you wish operate on (point in spectral domain, frequency or time) |
dimensionVector | represents non spatial volume indices to set 3D image into |
References svkDcmHeader::COL_INDEX, svk4DImageData::GetArray(), svkDcmHeader::GetCellIDFromDimensionVectorIndex(), svkImageData::GetDcmHeader(), svkDcmHeader::GetDimensionIndexVector(), svkDcmHeader::GetSpatialCellIDFromDimensionVectorIndex(), svkDcmHeader::GetSpatialDimensions(), loopVector, svkDcmHeader::ROW_INDEX, svkDcmHeader::SetDimensionVectorValue(), and svkDcmHeader::SLICE_INDEX.
void SetImageComponent | ( | vtkImageData * | image, |
int | point, | ||
int * | indexArray = NULL , |
||
int | component = 0 |
||
) |
Method will set a spectral point from a vtkImageData object representing a single point in the spectra. This is usefull for spatial FFT's.
image | the point image |
point | the point in the array you wish operate on |
timePoint | the time point to operate on |
channel | the the channel to operate on |
component | the component Re or Im |
References svk4DImageData::GetArray(), and svk4DImageData::GetIDFromIndex().
|
virtual |
Makes sure the range gets updated when the object is modified. It searches all arrays for each component to determine maximum and minimums
Reimplemented from svkImageData.
References svk4DImageData::GetArray(), svkImageData::IMAGINARY, svkImageData::MAGNITUDE, svkImageData::REAL, and svkImageData::SetDataRange().
vtkTypeMacro | ( | svk4DImageData | , |
svkImageData | |||
) |