NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
itk::INRImageIO Class Reference

ITK IO class to load INRIA image format. More...

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

Public Types

typedef INRImageIO Self
 
typedef ImageIOBase Superclass
 
typedef SmartPointer< SelfPointer
 

Public Member Functions

virtual const char * GetClassName () const
 
virtual bool CanReadFile (const char *) override
 
virtual void ReadImageInformation () override
 
virtual void Read (void *buffer) override
 
virtual bool ReadHeader ()
 
virtual void ReadVolume (void *buffer)
 
virtual unsigned int GetComponentSize () const override
 
virtual bool CanWriteFile (const char *) override
 
virtual void WriteImageInformation () override
 
virtual void Write (const void *buffer) override
 

Static Public Member Functions

static Pointer New ()
 

Public Attributes

unsigned int m_pixelSize
 

Protected Member Functions

 INRImageIO ()
 
virtual ~INRImageIO ()
 
virtual bool GetParamFromHeader (char *headerPtr, const char *variableToFind, const char *patternToFind, int *target)
 
virtual bool GetParamFromHeader (char *headerPtr, const char *variableToFind, const char *patternToFind, char *target)
 
virtual bool GetParamFromHeader (char *headerPtr, const char *variableToFind, const char *patternToFind, float *target)
 
virtual bool GetParamFromHeader (char *headerPtr, const char *variableToFind, const char *patternToFind, int *target, int defaultValue)
 
virtual bool GetParamFromHeader (char *headerPtr, const char *variableToFind, const char *patternToFind, unsigned int *target, unsigned int defaultValue)
 
virtual bool GetParamFromHeader (char *headerPtr, const char *variableToFind, const char *patternToFind, float *target, float defaultValue)
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void WriteSlice (std::string &fileName, const void *buffer)
 
void SwapBytesIfNecessary (void *buffer, unsigned long numberOfPixels)
 

Detailed Description

ITK IO class to load INRIA image format.

Member Typedef Documentation

typedef SmartPointer<Self> itk::INRImageIO::Pointer

Standard class typedefs.

typedef ImageIOBase itk::INRImageIO::Superclass

Constructor & Destructor Documentation

itk::INRImageIO::INRImageIO ( )
protected
itk::INRImageIO::~INRImageIO ( )
protectedvirtual

Member Function Documentation

bool itk::INRImageIO::CanReadFile ( const char *  file)
overridevirtual

Determine the file type. Returns true if this ImageIO can read the file specified.

bool itk::INRImageIO::CanWriteFile ( const char *  name)
overridevirtual

Determine the file type. Returns true if this ImageIO can read the file specified.

virtual const char* itk::INRImageIO::GetClassName ( ) const
virtual

Run-time type information (and related methods).

unsigned int itk::INRImageIO::GetComponentSize ( ) const
overridevirtual

Compute the size (in bytes) of the components of a pixel. For example, and RGB pixel of unsigned char would have a component size of 1 byte.

bool itk::INRImageIO::GetParamFromHeader ( char *  headerPtr,
const char *  variableToFind,
const char *  patternToFind,
int target 
)
protectedvirtual

Get an integer field from the header

bool itk::INRImageIO::GetParamFromHeader ( char *  headerPtr,
const char *  variableToFind,
const char *  patternToFind,
char *  target 
)
protectedvirtual
bool itk::INRImageIO::GetParamFromHeader ( char *  headerPtr,
const char *  variableToFind,
const char *  patternToFind,
float *  target 
)
protectedvirtual
bool itk::INRImageIO::GetParamFromHeader ( char *  headerPtr,
const char *  variableToFind,
const char *  patternToFind,
int target,
int  defaultValue 
)
protectedvirtual
bool itk::INRImageIO::GetParamFromHeader ( char *  headerPtr,
const char *  variableToFind,
const char *  patternToFind,
unsigned int target,
unsigned int  defaultValue 
)
protectedvirtual
bool itk::INRImageIO::GetParamFromHeader ( char *  headerPtr,
const char *  variableToFind,
const char *  patternToFind,
float *  target,
float  defaultValue 
)
protectedvirtual
static Pointer itk::INRImageIO::New ( )
static

Method for creation through the object factory.

void itk::INRImageIO::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected
void itk::INRImageIO::Read ( void buffer)
overridevirtual

Reads the data from disk into the memory buffer provided.

bool itk::INRImageIO::ReadHeader ( )
virtual

Read header and setup data

void itk::INRImageIO::ReadImageInformation ( )
overridevirtual

Set the spacing and diemention information for the set filename.

void itk::INRImageIO::ReadVolume ( void buffer)
virtual

Reads 3D data from multiple files assuming one slice per file.

void itk::INRImageIO::SwapBytesIfNecessary ( void buffer,
unsigned long  numberOfPixels 
)
protected

Warning this code is stole from DicomImageIO.cxx

  • Been extended to support all the types inr supports
void itk::INRImageIO::Write ( const void buffer)
overridevirtual

Writes the data to disk from the memory buffer provided. Make sure that the IORegion has been set properly.

void itk::INRImageIO::WriteImageInformation ( void  )
overridevirtual

Writes the spacing and dimentions of the image. Assumes SetFileName has been called with a valid file name.

void itk::INRImageIO::WriteSlice ( std::string fileName,
const void buffer 
)
protected

Member Data Documentation

unsigned int itk::INRImageIO::m_pixelSize

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