SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
svk4DImageData Class Reference

#include <svk4DImageData.h>

Inheritance diagram for svk4DImageData:
svkImageData svkMrsImageData

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)
 
svkDcmHeaderGetDcmHeader ()
 
void SetProvenance (svkProvenance *provenance)
 
svkProvenanceGetProvenance ()
 
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)
 
svkImageDataGetSourceData ()
 
void SyncVTKImageDataToDcmHeader ()
 
 vtkSetStringMacro (SourceFileName)
 
 vtkGetStringMacro (SourceFileName)
 

Static Public Member Functions

static svk4DImageDataNew ()
 
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
svkDcmHeaderdcmHeader
 
svkProvenanceprovenance
 
char * SourceFileName
 
svkImageDatasource
 
double range [3][2]
 Range needs to be able to accomodate real, imaginary, and magnitude components. More...
 

Detailed Description

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.

Member Enumeration Documentation

enum ActorType
Enumerator
PLOT_GRID 
VOL_SELECTION 
SAT_BANDS 

Constructor & Destructor Documentation

svk4DImageData ( )
protected

Constructor.

~svk4DImageData ( )
protected

Destructor.

Member Function Documentation

void EstimateDataRange ( double  range[2],
int  minPt,
int  maxPt,
int  component,
int *  tlcBrc = NULL,
int *  indexArray = NULL 
)
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.

Parameters
range
minPt
maxPt
component
tlcBrc
indexArray

References svk4DImageData::GetArray(), svkImageData::GetIndexFromID(), and svkImageData::MAGNITUDE.

vtkDataArray * GetArray ( int  linearIndex)
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.

Parameters
x
y
z
indexArray
Returns

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().

string GetArrayName ( svkDcmHeader::DimensionVector dimensionVector)
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().

int GetIDFromIndex ( int  indexX,
int  indexY,
int  indexZ,
int *  indexArray = NULL 
)
virtual
void GetImage ( svkImageData image,
int  point,
int *  indexArray = NULL,
int  component = 2,
int  vtkDataType = VTK_VOID 
)
virtual

Method will extract a volume into a vtkImageData object representing a single point in the spectra. This is usefull for spatial FFT's.

Parameters
targetimage the point image (must be initialized)
pointthe point in the array you wish operate on
componentthe component to operate on
timePointthe time point to operate on
channelthe 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().

void GetImage ( svkImageData image,
int  point,
svkDcmHeader::DimensionVector indexVector = NULL,
int  component = 2,
int  vtkDataType = VTK_VOID 
)
virtual

Method will extract a volume into a vtkImageData object representing a single point in the spectra. This is usefull for spatial FFT's.

Parameters
targetimage the point image (must be initialized)
pointthe point in the array you wish operate on
componentthe component to operate on
timePointthe time point to operate on
channelthe 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.

void GetImage ( svkImageData image,
int  point,
string  seriesDescription,
int *  indexArray = NULL,
int  component = 2,
int  vtkDataType = VTK_VOID 
)
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.

Parameters
targetimage the point image (must be initialized)
pointthe point in the array you wish operate on
seriesDescriptionfor DCM header
indexArrayis 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().

void GetImage ( svkImageData image,
int  point,
string  seriesDescription,
svkDcmHeader::DimensionVector indexVector = NULL,
int  component = 2,
int  vtkDataType = VTK_VOID 
)
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.

Parameters
targetimage the point image (must be initialized)
pointthe point in the array you wish operate on
seriesDescriptionfor DCM header
indexVectoris 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().

int GetLastSlice ( svkDcmHeader::Orientation  sliceOrientation = svkDcmHeader::UNKNOWN_ORIENTATION)
virtual

Get the last slice index for a given orientation. This is different for cell data so that is why it is overloaded.

Parameters
sliceOrientationthe orientation whose last slice you wish to get
Returns
the last slice

Reimplemented from svkImageData.

Referenced by svkMrsImageData::Get2DProjectedTlcBrcInSelectionBox(), svk4DImageData::GetTlcBrcInUserSelection(), and svkMrsImageData::IsSliceInSelectionBox().

int GetNumberOfSlices ( svkDcmHeader::Orientation  sliceOrientation)
virtual

Determins the number of slices for a given orientation.

Reimplemented from svkImageData.

References svkImageData::GetDcmHeader(), svkImageData::GetOrientationIndex(), svkDcmHeader::GetOrientationType(), and svkDcmHeader::UNKNOWN_ORIENTATION.

int GetNumberOfVolumeDimensions ( )
virtual

Currently assumes one dimension. TODO: Use the header to dynamically determine the number of dimensions

Returns

Reimplemented in svkMrsImageData.

Referenced by svk4DImageData::GetIDFromIndex(), svk4DImageData::GetZeroImage(), and svkPlotLineGrid::SetInput().

void GetNumberOfVoxels ( int  numVoxels[3])
virtual
void GetPolyDataGrid ( vtkPolyData *  grid)
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

Parameters
tlcBrcthe destination for the result of the calculation
userSelectionthe [minx, maxx, miny, maxy, minz, maxz] selection range
slicethe 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.

int GetVolumeIndexSize ( int  volumeIndex)
virtual

Gets the size of the given volume Index

Parameters
volumeIndex
Returns

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.

Parameters
targetimage the zero image (must be initialized)

References svk4DImageData::GetImage(), and svk4DImageData::GetNumberOfVolumeDimensions().

Referenced by svkVoxelTaggingUtils::CreateVoxelTagData(), svkHSVD::RequestData(), and svkMRSAutoPhase::SVKRequestDataPreExec().

bool IsIndexInExtent ( int *  extent,
svkDcmHeader::DimensionVector indexVector 
)
static
static svk4DImageData* New ( )
static
vtkObject * 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.

Parameters
imagethe point image
pointthe point in the array you wish operate on
timePointthe time point to operate on
channelthe 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.

Parameters
imagethe point image
pointthe point in the array you wish operate on (point in spectral domain, frequency or time)
dimensionVectorrepresents 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.

Parameters
imagethe point image
pointthe point in the array you wish operate on
timePointthe time point to operate on
channelthe the channel to operate on
componentthe component Re or Im

References svk4DImageData::GetArray(), and svk4DImageData::GetIDFromIndex().

void UpdateRange ( int  component)
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   
)

The documentation for this class was generated from the following files: