STIR  6.2.0
Public Member Functions | Public Attributes | List of all members
Image Class Reference

Reading and writing gipl files. More...

#include "stir/IO/GIPL_ImageFormat.h"

Public Member Functions

 Image (const int num_voxels, const short data_type_case)
 
void GiplRead (char *filename)
 Read data from GIPL filename. More...
 
void ReadGiplHeader (std::fstream *myFile)
 Read GIPL header. More...
 
void GiplWrite (const char *filename)
 Write image data to GIPL output file. More...
 
void WriteGiplHeader (std::fstream *myFile)
 Write GIPL header to output file. More...
 
void ByteSwapHeader ()
 Swap bytes (little/big endian conversion).
 
void GetMinMaxValue ()
 Get minimum and maximum gray values in image.
 
void Initialize (Image *Input, short type)
 Initialize image data by with the dimension of the input image. More...
 
void Initialize (Image *Input)
 Initialize image data by with the dimension of the input image. More...
 
void Zeros (Image *Input, short type)
 Initialize zero image. More...
 
void Zeros ()
 Initialize zero image. More...
 
void Ones (Image *Input, short type)
 Initialize one image. More...
 
void Copy (Image *Input, short type)
 Copy image. More...
 
void ByteSwap (int *i)
 
void ByteSwap (short *s)
 
void ByteSwap (float *f)
 
void ByteSwap (double *d)
 

Public Attributes

short * vData
 
float * vData_f
 
short m_dim [4]
 
short m_image_type
 
float m_pixdim [4]
 
char m_patDesc [80]
 
float m_matrixElements [12]
 
int m_identifier
 
char m_spare [28]
 
char m_orientationFlag
 
char m_flag1
 
double m_min
 
double m_max
 
double m_origin [4]
 
float m_pixval_offset
 
float m_pixval_cal
 
float m_user_def1
 
float m_user_def2
 
unsigned int m_magic_number
 
int ImageDimension
 
int ParametersDimension
 
int MaxLength
 
float iMax
 
float iMin
 
int ImageOffset [2]
 
float vCenter [4]
 
short vDownsample [3]
 

Detailed Description

Reading and writing gipl files.

Date
2010
Author
Colin Studholme, (original VoxObj concept) Derek Hill, Jason Zhao, Cliff Ruff, Abhir H. Bhalerao, modified by Christian Buerger adapted for STIR by Charalampos Tsoumpas
Note
Copyright (c) King's College London, The Rayne Institute. Division of Imaging Sciences, 4th floow Lambeth Wing, St Thomas' Hospital. All rights reserved.

Member Function Documentation

◆ GiplRead()

void Image::GiplRead ( char *  filename)

Read data from GIPL filename.

Parameters
filenameInput filename

◆ ReadGiplHeader()

void Image::ReadGiplHeader ( std::fstream *  myFile)

Read GIPL header.

Parameters
myFileInput file

◆ GiplWrite()

void Image::GiplWrite ( const char *  filename)

Write image data to GIPL output file.

Parameters
filenameOutput filename

◆ WriteGiplHeader()

void Image::WriteGiplHeader ( std::fstream *  myFile)

Write GIPL header to output file.

Parameters
myfileOutput file

◆ Initialize() [1/2]

void Image::Initialize ( Image Input,
short  iType 
)

Initialize image data by with the dimension of the input image.

Parameters
InputInput image

◆ Initialize() [2/2]

void Image::Initialize ( Image Input)

Initialize image data by with the dimension of the input image.

Parameters
InputInput image

◆ Zeros() [1/2]

void Image::Zeros ( Image Input,
short  iType 
)

Initialize zero image.

Parameters
InputInput image

◆ Zeros() [2/2]

void Image::Zeros ( )

Initialize zero image.

Parameters
InputInput image

◆ Ones()

void Image::Ones ( Image Input,
short  iType 
)

Initialize one image.

Parameters
InputInput image

◆ Copy()

void Image::Copy ( Image Input,
short  iType 
)

Copy image.

Parameters
InputInput image

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