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

Class that defines how to read Analyze file format. Analyze IMAGE FILE FORMAT - As much information as I can determine from the Medical image formats web site, and the Analyze75.pdf file provided from the Mayo clinic. A special note of thanks to Dennis P. Hanson (dph@m.nosp@m.ayo..nosp@m.edu) for his generous contributions in getting this information correct. More...

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

Public Types

typedef AnalyzeImageIO3160 Self
 
typedef ImageIOBase Superclass
 
typedef SmartPointer< SelfPointer
 

Public Member Functions

virtual const char * GetClassName () const
 
virtual bool CanReadFile (const char *FileNameToRead) override
 
virtual void ReadImageInformation () override
 
virtual void Read (void *buffer) override
 
virtual bool CanWriteFile (const char *FileNameToWrite) override
 
virtual void WriteImageInformation () override
 
virtual void Write (const void *buffer) override
 
virtual std::vector< double > GetDirection (unsigned int i) const override
 
virtual std::vector< double > GetDefaultDirection (unsigned int i) const override
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 AnalyzeImageIO3160 ()
 
 ~AnalyzeImageIO3160 ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 

Detailed Description

Class that defines how to read Analyze file format. Analyze IMAGE FILE FORMAT - As much information as I can determine from the Medical image formats web site, and the Analyze75.pdf file provided from the Mayo clinic. A special note of thanks to Dennis P. Hanson (dph@m.nosp@m.ayo..nosp@m.edu) for his generous contributions in getting this information correct.

Author
Hans J. Johnson Analyze image file sets consist of at least 2 files: REQUIRED:
  • an image file ([basename].img or [basename].img.gz or [basename].img.Z) This contains the binary represenation of the raw voxel values. If the file is uncompressed, it should be of of size (sizeof(storagetype)*NX*NY*NZ(*NT). The format of the image file is very simple; containing usually uncompressed voxel data for the images in one of the several possible voxel formats:
    • 1 bit packed binary (slices begin on byte boundaries)
    • 8 bit (unsigned char) gray scale unless .lkup file present
    • 16 bit signed short
    • 32 bit signed integers or float
    • 24 bit RGB, 8 bits per channel
  • a header file ([basename].hdr) This a 348 byte file 99.99% of all images that contains a binary represenation of the C-struct defined in this file. The analyze 7.5 header structure may, however, be extended beyond this minimal defintion to encompase site specific information, and would have more than 348 bytes. Given that the ability to extend the header has rarely been used, this implementation of the Analyze 7.5 file will only read the first 348 bytes into the structure defined in this file, and all informaiton beyond the 348 bytes will be ignored. OPTIONAL:
  • a color lookup file ([basename].lkup) The .lkup file is a plain ASCII text file that contains 3 integer values between 0 and 255 on each line. Each line of the lkup file represents one color table entry for the Red, Green and Blue color components, respectively. The total dynamic range of the image is divided by the number of colors in color table to determine mapping of the image through these colors.

    For example, an 8-color 'rainbow colors' lookup table is represented as:

255 0 0 255 128 0 255 255 0 128 255 0 0 255 0 0 0 255 128 0 255

255 0 255

Member Typedef Documentation

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

Standard class typedefs.

Constructor & Destructor Documentation

itk::AnalyzeImageIO3160::AnalyzeImageIO3160 ( )
protected
itk::AnalyzeImageIO3160::~AnalyzeImageIO3160 ( )
protected

Member Function Documentation

bool itk::AnalyzeImageIO3160::CanReadFile ( const char *  FileNameToRead)
overridevirtual

Determine if the file can be read with this ImageIO implementation.

Author
Hans J Johnson
Parameters
FileNameToReadThe name of the file to test for reading.
Postcondition
Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite
Returns
Returns true if this ImageIO can read the file specified.
bool itk::AnalyzeImageIO3160::CanWriteFile ( const char *  FileNameToWrite)
overridevirtual

Determine if the file can be written with this ImageIO implementation.

Parameters
FileNameToWriteThe name of the file to test for writing.
Author
Hans J. Johnson
Postcondition
Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite
Returns
Returns true if this ImageIO can write the file specified.
virtual const char* itk::AnalyzeImageIO3160::GetClassName ( ) const
virtual

Run-time type information (and related methods).

Reimplemented in itk::DRCAnalyzeImageIO.

std::vector< double > itk::AnalyzeImageIO3160::GetDefaultDirection ( unsigned int  k) const
overridevirtual

Return the directions to be assigned by default to recipient images whose dimension is smaller than the image dimension in file.

Return the directions that this particular ImageIO would use by default in the case the recipient image dimension is smaller than the dimension of the image in file.

std::vector< double > itk::AnalyzeImageIO3160::GetDirection ( unsigned int  k) const
overridevirtual

Return the directions with a correction for the 2D case.

Return the directions that this particular ImageIO would use by default in the case the recipient image dimension is smaller than the dimension of the image in file.

static Pointer itk::AnalyzeImageIO3160::New ( )
static

Method for creation through the object factory.

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

Reads the data from disk into the memory buffer provided.

void itk::AnalyzeImageIO3160::ReadImageInformation ( )
overridevirtual

Set the spacing and dimension information for the set filename.

Reimplemented in itk::DRCAnalyzeImageIO.

void itk::AnalyzeImageIO3160::Write ( const void buffer)
overridevirtual

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

This method writes the content of the image buffer to disk.

void itk::AnalyzeImageIO3160::WriteImageInformation ( void  )
overridevirtual

Set the spacing and dimension information for the set filename.


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