vtkMINCImageAttributes Class Reference

#include <vtkMINCImageAttributes.h>

Inheritance diagram for vtkMINCImageAttributes:

Inheritance graph
[legend]
Collaboration diagram for vtkMINCImageAttributes:

Collaboration graph
[legend]

List of all members.


Detailed Description

A container for a MINC image header.

This class provides methods to access all of the information contained in the MINC header. If you read a MINC file into VTK and then write it out again, you can use writer->SetImageAttributes(reader->GetImageAttributes) to ensure that all of the medical information contained in the file is tranferred from the reader to the writer. If you want to change any of the header information, you must use ShallowCopy to make a copy of the reader's attributes and then modify only the copy.

See also:
vtkMINCImageReader vtkMINCImageWriter
Thanks:
Thanks to David Gobbi for writing this class and Atamai Inc. for contributing it to VTK.
Tests:
vtkMINCImageAttributes (Tests)

Definition at line 84 of file vtkMINCImageAttributes.h.


Public Types

typedef vtkObject Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual void Reset ()
virtual vtkStringArrayGetAttributeNames (const char *variable)
virtual int HasAttribute (const char *variable, const char *attribute)
virtual void ShallowCopy (vtkMINCImageAttributes *source)
virtual void FindValidRange (double range[2])
virtual void FindImageRange (double range[2])
virtual void SetName (const char *)
virtual char * GetName ()
virtual void SetDataType (int)
virtual int GetDataType ()
virtual void AddDimension (const char *dimension)
virtual void AddDimension (const char *dimension, vtkIdType length)
virtual vtkStringArrayGetDimensionNames ()
virtual vtkIdTypeArrayGetDimensionLengths ()
virtual vtkStringArrayGetVariableNames ()
virtual void SetImageMin (vtkDoubleArray *imageMin)
virtual void SetImageMax (vtkDoubleArray *imageMax)
virtual vtkDoubleArrayGetImageMin ()
virtual vtkDoubleArrayGetImageMax ()
virtual int GetNumberOfImageMinMaxDimensions ()
virtual void SetNumberOfImageMinMaxDimensions (int)
virtual void SetAttributeValueAsArray (const char *variable, const char *attribute, vtkDataArray *array)
virtual vtkDataArrayGetAttributeValueAsArray (const char *variable, const char *attribute)
virtual void SetAttributeValueAsString (const char *variable, const char *attribute, const char *value)
virtual const char * GetAttributeValueAsString (const char *variable, const char *attribute)
virtual void SetAttributeValueAsInt (const char *variable, const char *attribute, int value)
virtual int GetAttributeValueAsInt (const char *variable, const char *attribute)
virtual void SetAttributeValueAsDouble (const char *variable, const char *attribute, double value)
virtual double GetAttributeValueAsDouble (const char *variable, const char *attribute)
virtual int ValidateAttribute (const char *varname, const char *attname, vtkDataArray *array)
virtual void PrintFileHeader ()
virtual void PrintFileHeader (ostream &os)

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkMINCImageAttributesSafeDownCast (vtkObject *o)
static vtkMINCImageAttributesNew ()

Protected Member Functions

 vtkMINCImageAttributes ()
 ~vtkMINCImageAttributes ()
const char * ConvertDataArrayToString (vtkDataArray *array)
virtual int ValidateGlobalAttribute (const char *attrib, vtkDataArray *array)
virtual int ValidateGeneralAttribute (const char *varname, const char *attname, vtkDataArray *array)
virtual int ValidateDimensionAttribute (const char *varname, const char *attname, vtkDataArray *array)
virtual int ValidateImageAttribute (const char *varname, const char *attname, vtkDataArray *array)
virtual int ValidateImageMinMaxAttribute (const char *varname, const char *attname, vtkDataArray *array)
virtual int ValidatePatientAttribute (const char *varname, const char *attname, vtkDataArray *array)
virtual int ValidateStudyAttribute (const char *varname, const char *attname, vtkDataArray *array)
virtual int ValidateAcquisitionAttribute (const char *varname, const char *attname, vtkDataArray *array)

Protected Attributes

vtkStringArrayDimensionNames
vtkIdTypeArrayDimensionLengths
vtkStringArrayVariableNames
vtkMINCImageAttributeMap * AttributeNames
vtkMINCImageAttributeMap * AttributeValues
vtkStringArrayStringStore
vtkDoubleArrayImageMin
vtkDoubleArrayImageMax
int NumberOfImageMinMaxDimensions
int DataType
char * Name

Member Typedef Documentation

Reimplemented from vtkObject.

Definition at line 87 of file vtkMINCImageAttributes.h.


Constructor & Destructor Documentation

vtkMINCImageAttributes::vtkMINCImageAttributes (  )  [protected]

vtkMINCImageAttributes::~vtkMINCImageAttributes (  )  [protected]


Member Function Documentation

virtual const char* vtkMINCImageAttributes::GetClassName (  )  [virtual]

Reimplemented from vtkObject.

static int vtkMINCImageAttributes::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkMINCImageAttributes::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

static vtkMINCImageAttributes* vtkMINCImageAttributes::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkObject.

static vtkMINCImageAttributes* vtkMINCImageAttributes::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual void vtkMINCImageAttributes::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

virtual void vtkMINCImageAttributes::Reset (  )  [virtual]

Reset all the attributes in preparation for loading new information.

virtual void vtkMINCImageAttributes::SetName ( const char *   )  [virtual]

Get the name of the image, not including the path or the extension. This is only needed for printing the header and there is usually no need to set it.

virtual char* vtkMINCImageAttributes::GetName (  )  [virtual]

Get the name of the image, not including the path or the extension. This is only needed for printing the header and there is usually no need to set it.

virtual void vtkMINCImageAttributes::SetDataType ( int   )  [virtual]

Get the image data type, as stored on disk. This information is useful if the file was converted to floating-point when it was loaded. When writing a file from float or double image data, you can use this method to prescribe the output type.

virtual int vtkMINCImageAttributes::GetDataType (  )  [virtual]

Get the image data type, as stored on disk. This information is useful if the file was converted to floating-point when it was loaded. When writing a file from float or double image data, you can use this method to prescribe the output type.

virtual void vtkMINCImageAttributes::AddDimension ( const char *  dimension  )  [inline, virtual]

Add the names of up to five dimensions. The ordering of these dimensions will determine the dimension order of the file. If no DimensionNames are set, the writer will set the dimension order of the file to be the same as the dimension order in memory.

Definition at line 117 of file vtkMINCImageAttributes.h.

virtual void vtkMINCImageAttributes::AddDimension ( const char *  dimension,
vtkIdType  length 
) [virtual]

Add the names of up to five dimensions. The ordering of these dimensions will determine the dimension order of the file. If no DimensionNames are set, the writer will set the dimension order of the file to be the same as the dimension order in memory.

virtual vtkStringArray* vtkMINCImageAttributes::GetDimensionNames (  )  [inline, virtual]

Get the dimension names. The dimension names are same order as written in the file, starting with the slowest-varying dimension. Use this method to get the array if you need to change "space" dimensions to "frequency" after performing a Fourier transform.

Definition at line 127 of file vtkMINCImageAttributes.h.

virtual vtkIdTypeArray* vtkMINCImageAttributes::GetDimensionLengths (  )  [inline, virtual]

Get the lengths of all the dimensions. The dimension lengths are informative, the vtkMINCImageWriter does not look at these values but instead uses the dimension sizes of its input.

Definition at line 135 of file vtkMINCImageAttributes.h.

virtual vtkStringArray* vtkMINCImageAttributes::GetVariableNames (  )  [inline, virtual]

Get the names of all the variables.

Definition at line 141 of file vtkMINCImageAttributes.h.

virtual vtkStringArray* vtkMINCImageAttributes::GetAttributeNames ( const char *  variable  )  [virtual]

List the attribute names for a variable. Set the variable to the empty string to get a list of the global attributes.

virtual void vtkMINCImageAttributes::SetImageMin ( vtkDoubleArray imageMin  )  [virtual]

Get the image min and max arrays. These are set by the reader, but they aren't used by the writer except to compute the full real data range of the original file.

virtual void vtkMINCImageAttributes::SetImageMax ( vtkDoubleArray imageMax  )  [virtual]

Get the image min and max arrays. These are set by the reader, but they aren't used by the writer except to compute the full real data range of the original file.

virtual vtkDoubleArray* vtkMINCImageAttributes::GetImageMin (  )  [inline, virtual]

Get the image min and max arrays. These are set by the reader, but they aren't used by the writer except to compute the full real data range of the original file.

Definition at line 155 of file vtkMINCImageAttributes.h.

virtual vtkDoubleArray* vtkMINCImageAttributes::GetImageMax (  )  [inline, virtual]

Get the image min and max arrays. These are set by the reader, but they aren't used by the writer except to compute the full real data range of the original file.

Definition at line 156 of file vtkMINCImageAttributes.h.

virtual int vtkMINCImageAttributes::GetNumberOfImageMinMaxDimensions (  )  [virtual]

Get the number of ImageMinMax dimensions.

virtual void vtkMINCImageAttributes::SetNumberOfImageMinMaxDimensions ( int   )  [virtual]

Get the number of ImageMinMax dimensions.

virtual int vtkMINCImageAttributes::HasAttribute ( const char *  variable,
const char *  attribute 
) [virtual]

Check to see if a particular attribute exists.

virtual void vtkMINCImageAttributes::SetAttributeValueAsArray ( const char *  variable,
const char *  attribute,
vtkDataArray array 
) [virtual]

Set attribute values for a variable as a vtkDataArray. Set the variable to the empty string to access global attributes.

virtual vtkDataArray* vtkMINCImageAttributes::GetAttributeValueAsArray ( const char *  variable,
const char *  attribute 
) [virtual]

Set attribute values for a variable as a vtkDataArray. Set the variable to the empty string to access global attributes.

virtual void vtkMINCImageAttributes::SetAttributeValueAsString ( const char *  variable,
const char *  attribute,
const char *  value 
) [virtual]

Set an attribute value as a string. Set the variable to the empty string to access global attributes. If you specify a variable that does not exist, it will be created.

virtual const char* vtkMINCImageAttributes::GetAttributeValueAsString ( const char *  variable,
const char *  attribute 
) [virtual]

Set an attribute value as a string. Set the variable to the empty string to access global attributes. If you specify a variable that does not exist, it will be created.

virtual void vtkMINCImageAttributes::SetAttributeValueAsInt ( const char *  variable,
const char *  attribute,
int  value 
) [virtual]

Set an attribute value as an int. Set the variable to the empty string to access global attributes. If you specify a variable that does not exist, it will be created.

virtual int vtkMINCImageAttributes::GetAttributeValueAsInt ( const char *  variable,
const char *  attribute 
) [virtual]

Set an attribute value as an int. Set the variable to the empty string to access global attributes. If you specify a variable that does not exist, it will be created.

virtual void vtkMINCImageAttributes::SetAttributeValueAsDouble ( const char *  variable,
const char *  attribute,
double  value 
) [virtual]

Set an attribute value as a double. Set the variable to the empty string to access global attributes. If you specify a variable that does not exist, it will be created.

virtual double vtkMINCImageAttributes::GetAttributeValueAsDouble ( const char *  variable,
const char *  attribute 
) [virtual]

Set an attribute value as a double. Set the variable to the empty string to access global attributes. If you specify a variable that does not exist, it will be created.

virtual int vtkMINCImageAttributes::ValidateAttribute ( const char *  varname,
const char *  attname,
vtkDataArray array 
) [virtual]

Validate a particular attribute. This involves checking that the attribute is a MINC standard attribute, and checking whether it can be set (as opposed to being set automatically from the image information). The return values is 0 if the attribute is set automatically and therefore should not be copied from here, 1 if this attribute is valid and should be set, and 2 if the attribute is non-standard.

virtual void vtkMINCImageAttributes::ShallowCopy ( vtkMINCImageAttributes source  )  [virtual]

Do a shallow copy. This will copy all the attributes from the source. It is much more efficient than a DeepCopy would be, since it only copies pointers to the attribute values instead of copying the arrays themselves. You must use this method to make a copy if you want to modify any MINC attributes from a MINCReader before you pass them to a MINCWriter.

virtual void vtkMINCImageAttributes::FindValidRange ( double  range[2]  )  [virtual]

Find the valid range of the data from the information stored in the attributes.

virtual void vtkMINCImageAttributes::FindImageRange ( double  range[2]  )  [virtual]

Find the image range of the data from the information stored in the attributes.

virtual void vtkMINCImageAttributes::PrintFileHeader (  )  [virtual]

A diagnostic function. Print the header of the file in the same format as ncdump or mincheader.

virtual void vtkMINCImageAttributes::PrintFileHeader ( ostream &  os  )  [virtual]

A diagnostic function. Print the header of the file in the same format as ncdump or mincheader.

const char* vtkMINCImageAttributes::ConvertDataArrayToString ( vtkDataArray array  )  [protected]

virtual int vtkMINCImageAttributes::ValidateGlobalAttribute ( const char *  attrib,
vtkDataArray array 
) [protected, virtual]

virtual int vtkMINCImageAttributes::ValidateGeneralAttribute ( const char *  varname,
const char *  attname,
vtkDataArray array 
) [protected, virtual]

virtual int vtkMINCImageAttributes::ValidateDimensionAttribute ( const char *  varname,
const char *  attname,
vtkDataArray array 
) [protected, virtual]

virtual int vtkMINCImageAttributes::ValidateImageAttribute ( const char *  varname,
const char *  attname,
vtkDataArray array 
) [protected, virtual]

virtual int vtkMINCImageAttributes::ValidateImageMinMaxAttribute ( const char *  varname,
const char *  attname,
vtkDataArray array 
) [protected, virtual]

virtual int vtkMINCImageAttributes::ValidatePatientAttribute ( const char *  varname,
const char *  attname,
vtkDataArray array 
) [protected, virtual]

virtual int vtkMINCImageAttributes::ValidateStudyAttribute ( const char *  varname,
const char *  attname,
vtkDataArray array 
) [protected, virtual]

virtual int vtkMINCImageAttributes::ValidateAcquisitionAttribute ( const char *  varname,
const char *  attname,
vtkDataArray array 
) [protected, virtual]


Member Data Documentation

Definition at line 278 of file vtkMINCImageAttributes.h.

Definition at line 279 of file vtkMINCImageAttributes.h.

Definition at line 281 of file vtkMINCImageAttributes.h.

vtkMINCImageAttributeMap* vtkMINCImageAttributes::AttributeNames [protected]

Definition at line 282 of file vtkMINCImageAttributes.h.

vtkMINCImageAttributeMap* vtkMINCImageAttributes::AttributeValues [protected]

Definition at line 283 of file vtkMINCImageAttributes.h.

Definition at line 285 of file vtkMINCImageAttributes.h.

Definition at line 287 of file vtkMINCImageAttributes.h.

Definition at line 288 of file vtkMINCImageAttributes.h.

Definition at line 289 of file vtkMINCImageAttributes.h.

Definition at line 291 of file vtkMINCImageAttributes.h.

char* vtkMINCImageAttributes::Name [protected]

Definition at line 292 of file vtkMINCImageAttributes.h.


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

Generated on Sat Dec 27 13:37:43 2008 for VTK by  doxygen 1.5.6