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

#include <svkMriImageData.h>

Inheritance diagram for svkMriImageData:
svkImageData

Public Member Functions

 vtkTypeMacro (svkMriImageData, svkImageData)
 
double * GetImagePixels (int slice)
 
vtkDataArray * GetImagePixelsArray (int slice)
 
double * GetImagePixel (int id)
 
double * GetImagePixel (int x, int y, int z)
 
void SetImagePixels (double *pixels, int slice)
 
void SetImagePixel (int id, double value)
 
void SetImagePixel (int x, int y, int z, double value)
 
virtual void GetNumberOfVoxels (int numVoxels[3])
 
void GetAutoWindowLevel (double &window, double &level, int numBins=START_NUM_BINS, double excludeFactor=EXCLUDE_FACTOR)
 
virtual int GetVolumeIndexForFrame (int frame)
 
void GetCenterOfMass (double centerOfMass[3], int component=0)
 
virtual svk4DImageDataGetCellDataRepresentation ()
 
void SyncPixelDataToCellRepresentation ()
 
void SyncCellRepresentationToPixelData ()
 
- 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 GetNumberOfSlices (svkDcmHeader::Orientation sliceOrientation=svkDcmHeader::UNKNOWN_ORIENTATION)
 
virtual int GetFirstSlice (svkDcmHeader::Orientation sliceOrientation=svkDcmHeader::UNKNOWN_ORIENTATION)
 
virtual int GetLastSlice (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 svkMriImageDataNew ()
 
static vtkObject * NewObject ()
 
static void UpdatePixelData (vtkObject *subject, unsigned long eid, void *thisObject, void *calldata)
 
- Static Public Member Functions inherited from svkImageData
static void RemoveArrays (svkImageData *data)
 

Protected Types

enum  ActorType { PLOT_GRID }
 

Protected Member Functions

 svkMriImageData ()
 
 ~svkMriImageData ()
 
- Protected Member Functions inherited from svkImageData
 svkImageData ()
 
 ~svkImageData ()
 
bool WasModified ()
 
virtual void UpdateSvkParams ()
 
virtual void UpdateRange (int component)
 
int FindMatchingSlice (double *posLPS, svkDcmHeader::Orientation sliceOrientation, double *origin, double *spacing, double tolerance=-1)
 

Additional Inherited Members

- Public Types inherited from svkImageData
enum  RangeComponent { REAL = 0, IMAGINARY, MAGNITUDE }
 
enum  DataBasis {
  ROW = 0, COLUMN, SLICE, LR,
  PA, SI
}
 
- 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

Class that represents a MR Image data set. Contains methods for accessing MRI specific actors.

Member Enumeration Documentation

enum ActorType
protected
Enumerator
PLOT_GRID 

Constructor & Destructor Documentation

svkMriImageData ( )
protected
~svkMriImageData ( )
protected

Member Function Documentation

void GetAutoWindowLevel ( double &  window,
double &  level,
int  numBins = START_NUM_BINS,
double  excludeFactor = EXCLUDE_FACTOR 
)

Method attempts to determine the best default window/level values for the dataset. It does this by:

  1. Create a histogram with the number of bins specified at input.
  2. Determine the mode, excluding zero, and use that as the level.
  3. Calculate the standard deviation excluding zero.
  4. Use the input number of standard deviations to determine the window.
  5. If the window extends outside the range, clip the window such that it is within range.
Parameters
windowoutput reference
leveloutput reference
numBinsthe number of bins used to make the histogram
excludeFactorthe percentage of pixels excluded from each end when defining the window.

References MAX_NUM_BINS, MIN_USED_BINS, and svkImageData::range.

svk4DImageData * GetCellDataRepresentation ( )
virtual

This method will return a representation of the data using cell data. This representation is used primarily for the visualization of the image volume as traces.

Returns

References svkImageData::GetDcmHeader(), svk4DImageData::New(), svkImageData::SetDcmHeader(), svkImageData::SetSourceData(), svkMriImageData::SyncCellRepresentationToPixelData(), and svkImageData::SyncVTKImageDataToDcmHeader().

Referenced by svkMRSKinetics::RequestData().

void GetCenterOfMass ( double  centerOfMass[3],
int  component = 0 
)

Calculates the center of mass of a volume using the pixel intensities as 'mass'. Just a weighted average location.

References dims, svkImageData::GetIDFromIndex(), and svkImageData::GetPositionFromIndex().

double * GetImagePixel ( int  id)

Returns a pointer to the data at the specified voxel ID.

Referenced by svkHSVD::GetFitSuccessStatus(), svkMriImageData::GetImagePixel(), and svkVoxelTaggingUtils::ToggleVoxelTag().

double * GetImagePixel ( int  x,
int  y,
int  z 
)

Returns a pointer to the data at the specified voxel index.

References svkImageData::GetIDFromIndex(), and svkMriImageData::GetImagePixel().

double * GetImagePixels ( int  slice)

Creates an array of doubles that is the pixels of image at slice "slice. Currently assumes 1 component data

Referenced by svkBurnResearchPixels::RequestData().

vtkDataArray * GetImagePixelsArray ( int  slice)

Creates an array of doubles that is the pixels of image at slice "slice. Output goes into a vtkDataArray that matches the type of the pixel array in the original dataset. Currently assumes 1 component data.

void GetNumberOfVoxels ( int  numVoxels[3])
virtual

Return the number of voxels in the data set.

Implements svkImageData.

Referenced by svkBurnResearchPixels::RequestData().

int GetVolumeIndexForFrame ( int  frame)
virtual
static svkMriImageData* New ( )
static
vtkObject * NewObject ( )
static
void SetImagePixel ( int  id,
double  value 
)

Returns a pointer to the data at the specified voxel ID.

Referenced by svkMriImageData::SetImagePixel(), and svkVoxelTaggingUtils::ToggleVoxelTag().

void SetImagePixel ( int  x,
int  y,
int  z,
double  value 
)

Returns a pointer to the data at the specified voxel index.

References svkImageData::GetIDFromIndex(), and svkMriImageData::SetImagePixel().

void SetImagePixels ( double *  pixels,
int  slice 
)

Sets a slice of pixels from a double array. Currently assumes 1 component data

void SyncCellRepresentationToPixelData ( )

This method will copy the pixel data into the cell representation of the data.

References svkImageData::GetDcmHeader(), svkDcmHeader::GetNumberOfCoils(), svkDcmHeader::GetNumberOfTimePoints(), and svk4DImageData::SetImage().

Referenced by svkMriImageData::GetCellDataRepresentation().

void SyncPixelDataToCellRepresentation ( )

This method will copy the cell data representation values into the pixel data array.

Referenced by svkMriImageData::UpdatePixelData().

void UpdatePixelData ( vtkObject *  subject,
unsigned long  eid,
void *  thisObject,
void *  calldata 
)
static

Updates the pixel data when the data representation is modified.

Parameters
subject
eid
thisObject
calldata

References svkMriImageData::SyncPixelDataToCellRepresentation().

vtkTypeMacro ( svkMriImageData  ,
svkImageData   
)

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