ITK  4.4.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::MRCHeaderObject Class Reference

#include <itkMRCHeaderObject.h>

+ Inheritance diagram for itk::MRCHeaderObject:
+ Collaboration diagram for itk::MRCHeaderObject:

Detailed Description

This class is a light wrapper for a couple of plain old data structures, so that they can be utilized in a MetaDataDictionary.

The class is designed to be intialized from a chuck of bytes that are read in from a file. Verification is performed to ensure that the bytes appear to be the correct format for the headers.

The POD structures a publicly avaible without access methods.

This code was contributed in the Insight Journal paper: "A Streaming IO Base Class and Support for Streaming the MRC and VTK File Format" by Lowekamp B., Chen D. http://www.insight-journal.org/browse/publication/729 http://hdl.handle.net/10380/3171

See Also
MetaDataDictionary

Definition at line 49 of file itkMRCHeaderObject.h.

Classes

struct  FeiExtendedHeader
 
struct  Header
 

Public Types

enum  {
  MRCHEADER_MODE_UINT8 = 0,
  MRCHEADER_MODE_IN16 = 1,
  MRCHEADER_MODE_FLOAT = 2,
  MRCHEADER_MODE_COMPLEX_INT16 = 3,
  MRCHEADER_MODE_COMPLEX_FLOAT = 4,
  MRCHEADER_MODE_UINT16 = 6,
  MRCHEADER_MODE_RGB_BYTE = 16
}
 
enum  {
  MRCHEADER_MAP_X = 1,
  MRCHEADER_MAP_Y = 2,
  MRCHEADER_MAP_Z = 3
}
 
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef MRCHeaderObject Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
void DeepCopy (ConstPointer h)
 
SizeValueType GetExtendedHeaderSize (void) const
 
const HeaderGetHeader () const
 
SizeValueType GetHeaderSize (void) const
 
virtual const char * GetNameOfClass () const
 
bool IsOriginalHeaderBigEndian (void) const
 
bool SetExtendedHeader (const void *buffer)
 
bool SetHeader (const Header *buffer)
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Public Attributes

Header m_Header
 

Protected Member Functions

 MRCHeaderObject (void)
 
void PrintSelf (std::ostream &os, Indent indent) const
 
void swapHeader (bool bigEndian)
 
 ~MRCHeaderObject (void)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Member Functions

 MRCHeaderObject (const Self &)
 
void operator= (const Self &)
 

Private Attributes

bool m_BigEndianHeader
 
FeiExtendedHeaderm_ExtendedFeiHeader
 
void * m_ExtendedHeader
 
SizeValueType m_ExtendedHeaderSize
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

Member Typedef Documentation

Definition at line 57 of file itkMRCHeaderObject.h.

Definition at line 56 of file itkMRCHeaderObject.h.

Standard class typedefs.

Definition at line 54 of file itkMRCHeaderObject.h.

Definition at line 55 of file itkMRCHeaderObject.h.

Member Enumeration Documentation

anonymous enum

pixel type enumeration

Enumerator
MRCHEADER_MODE_UINT8 
MRCHEADER_MODE_IN16 
MRCHEADER_MODE_FLOAT 
MRCHEADER_MODE_COMPLEX_INT16 
MRCHEADER_MODE_COMPLEX_FLOAT 
MRCHEADER_MODE_UINT16 
MRCHEADER_MODE_RGB_BYTE 

Definition at line 218 of file itkMRCHeaderObject.h.

anonymous enum

map enumeration

Enumerator
MRCHEADER_MAP_X 
MRCHEADER_MAP_Y 
MRCHEADER_MAP_Z 

Definition at line 227 of file itkMRCHeaderObject.h.

Constructor & Destructor Documentation

itk::MRCHeaderObject::MRCHeaderObject ( void  )
protected
itk::MRCHeaderObject::~MRCHeaderObject ( void  )
protected
itk::MRCHeaderObject::MRCHeaderObject ( const Self )
private

Member Function Documentation

virtual::itk::LightObject::Pointer itk::MRCHeaderObject::CreateAnother ( void  ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::LightObject.

void itk::MRCHeaderObject::DeepCopy ( ConstPointer  h)
SizeValueType itk::MRCHeaderObject::GetExtendedHeaderSize ( void  ) const

the expected number of bytes in the extended header, this is only valid after a successful call to SetHeader.

const Header& itk::MRCHeaderObject::GetHeader ( ) const
SizeValueType itk::MRCHeaderObject::GetHeaderSize ( void  ) const
inline

the expected number of bytes in the header

Definition at line 271 of file itkMRCHeaderObject.h.

virtual const char* itk::MRCHeaderObject::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::LightObject.

bool itk::MRCHeaderObject::IsOriginalHeaderBigEndian ( void  ) const

returns true if the original header from SetHeader was big endian.

static Pointer itk::MRCHeaderObject::New ( )
static

Method for creation through the object factory.

void itk::MRCHeaderObject::operator= ( const Self )
private
void itk::MRCHeaderObject::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

Prints loads of information from the header

Reimplemented from itk::LightObject.

bool itk::MRCHeaderObject::SetExtendedHeader ( const void *  buffer)

After SetHeader is called GetExtendedHeaderSize contains the extected size of the buffer argument. This buffer is expected to be the bytes which follow the header in the file.

The return value indicates if the extended header buffer is valid and known. If false is returned then extended header information is not available.

bool itk::MRCHeaderObject::SetHeader ( const Header buffer)
Parameters
bufferis assumed to point to a 1024 block of memory which has the header

The return value indicates if buffer appears valid. If false is returned then the header member varible is in an undefined state.

If the byte order of the header then byte swapping will be performed.

void itk::MRCHeaderObject::swapHeader ( bool  bigEndian)
protected

Methods to fix the order of a set header

Member Data Documentation

bool itk::MRCHeaderObject::m_BigEndianHeader
private

Definition at line 302 of file itkMRCHeaderObject.h.

FeiExtendedHeader* itk::MRCHeaderObject::m_ExtendedFeiHeader
private

Definition at line 300 of file itkMRCHeaderObject.h.

void* itk::MRCHeaderObject::m_ExtendedHeader
private

Definition at line 298 of file itkMRCHeaderObject.h.

SizeValueType itk::MRCHeaderObject::m_ExtendedHeaderSize
private

Definition at line 297 of file itkMRCHeaderObject.h.

Header itk::MRCHeaderObject::m_Header

Public avaiable data : FIXME : NO MEMBER VARIABLES SHOULD BE PUBLIC.

Definition at line 279 of file itkMRCHeaderObject.h.


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