Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

itk::MRCHeaderObject Class Reference

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

#include <itkMRCHeaderObject.h>

Inheritance diagram for itk::MRCHeaderObject:
Inheritance graph
[legend]
Collaboration diagram for itk::MRCHeaderObject:
Collaboration graph
[legend]

List of all members.

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 Member Functions

virtual Pointer CreateAnother () const
void DeepCopy (ConstPointer h)
virtual void Delete ()
vcl_size_t GetExtendedHeaderSize (void) const
vcl_size_t GetHeaderSize (void) const
virtual const char * GetNameOfClass () const
virtual int GetReferenceCount () const
bool IsOriginalHeaderBigEndian (void) const
void Print (std::ostream &os, Indent indent=0) const
virtual void Register () const
bool SetExtendedHeader (const void *buffer)
virtual void SetReferenceCount (int)
virtual void UnRegister () const

bool SetHeader (const Header *buffer)
const HeaderGetHeader () const

Static Public Member Functions

static void BreakOnError ()
static Pointer New ()

Public Attributes

Header m_Header

Protected Types

typedef int InternalReferenceCountType

Protected Member Functions

 MRCHeaderObject (void)
void PrintSelf (std::ostream &os, Indent indent) const
void swapHeader (bool bigEndian)
 ~MRCHeaderObject (void)

virtual void PrintHeader (std::ostream &os, Indent indent) const
virtual void PrintTrailer (std::ostream &os, Indent indent) const

Protected Attributes

InternalReferenceCountType m_ReferenceCount
SimpleFastMutexLock m_ReferenceCountLock

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.

See also:
MetaDataDictionary

Definition at line 45 of file itkMRCHeaderObject.h.


Member Typedef Documentation

Reimplemented from itk::LightObject.

Definition at line 53 of file itkMRCHeaderObject.h.

typedef int itk::LightObject::InternalReferenceCountType [protected, inherited]

Define the type of the reference count according to the target. This allows the use of atomic operations

Definition at line 139 of file itkLightObject.h.

Reimplemented from itk::LightObject.

Definition at line 52 of file itkMRCHeaderObject.h.

Standard class typedefs.

Reimplemented from itk::LightObject.

Definition at line 50 of file itkMRCHeaderObject.h.

Definition at line 51 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 221 of file itkMRCHeaderObject.h.

anonymous enum

map enumeration

Enumerator:
MRCHEADER_MAP_X 
MRCHEADER_MAP_Y 
MRCHEADER_MAP_Z 

Definition at line 230 of file itkMRCHeaderObject.h.


Constructor & Destructor Documentation

itk::MRCHeaderObject::MRCHeaderObject ( void   )  [protected]
itk::MRCHeaderObject::~MRCHeaderObject ( void   )  [protected]

Member Function Documentation

static void itk::LightObject::BreakOnError (  )  [static, inherited]

This method is called when itkExceptionMacro executes. It allows the debugger to break on error.

virtual Pointer itk::LightObject::CreateAnother (  )  const [virtual, inherited]
void itk::MRCHeaderObject::DeepCopy ( ConstPointer  h  ) 
virtual void itk::LightObject::Delete (  )  [virtual, inherited]

Delete an itk object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.

vcl_size_t 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
Parameters:
buffer is 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.

vcl_size_t itk::MRCHeaderObject::GetHeaderSize ( void   )  const [inline]

the expected number of bytes in the header

Definition at line 278 of file itkMRCHeaderObject.h.

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

Run-time type information (and related methods).

Reimplemented from itk::LightObject.

virtual int itk::LightObject::GetReferenceCount (  )  const [inline, virtual, inherited]

Gets the reference count on this object.

Definition at line 106 of file itkLightObject.h.

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.

Reimplemented from itk::LightObject.

void itk::LightObject::Print ( std::ostream &  os,
Indent  indent = 0 
) const [inherited]

Cause the object to print itself out.

Referenced by itk::WeakPointer< ProcessObject >::Print().

virtual void itk::LightObject::PrintHeader ( std::ostream &  os,
Indent  indent 
) const [protected, virtual, inherited]

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.

void itk::MRCHeaderObject::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected, virtual]

Prints loads of information from the header

Reimplemented from itk::LightObject.

virtual void itk::LightObject::PrintTrailer ( std::ostream &  os,
Indent  indent 
) const [protected, virtual, inherited]

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.

virtual void itk::LightObject::Register (  )  const [virtual, inherited]

Increase the reference count (mark as used by another object).

Reimplemented in itk::Object.

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:
buffer is 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.

virtual void itk::LightObject::SetReferenceCount ( int   )  [virtual, inherited]

Sets the reference count on this object. This is a dangerous method, use it with care.

Reimplemented in itk::Object.

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

Methods to fix the order of a set header

virtual void itk::LightObject::UnRegister (  )  const [virtual, inherited]

Decrease the reference count (release by another object).

Reimplemented in itk::Object.


Member Data Documentation

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

Definition at line 286 of file itkMRCHeaderObject.h.

Number of uses of this object by other objects.

Definition at line 144 of file itkLightObject.h.

Mutex lock to protect modification to the reference count

Definition at line 147 of file itkLightObject.h.


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

Generated at Tue Jul 13 2010 00:23:20 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000