Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
otb::MSTARImageIO Class Reference

ImageIO object for reading and writing MSTAR images. More...

#include <otbMSTARImageIO.h>

+ Inheritance diagram for otb::MSTARImageIO:
+ Collaboration diagram for otb::MSTARImageIO:

Public Types

typedef itk::SmartPointer< SelfPointer
 
typedef MSTARImageIO Self
 
typedef otb::ImageIOBase Superclass
 
- Public Types inherited from otb::ImageIOBase
typedef std::vector< std::string > ArrayOfExtensionsType
 
typedef vcl_size_t BufferSizeType
 
enum  ByteOrder {
  BigEndian,
  LittleEndian,
  OrderNotApplicable
}
 
enum  FileType {
  ASCII,
  Binary,
  TypeNotApplicable
}
 
typedef long IndexValueType
 
enum  IOComponentType {
  UNKNOWNCOMPONENTTYPE,
  UCHAR,
  CHAR,
  USHORT,
  SHORT,
  UINT,
  INT,
  ULONG,
  LONG,
  FLOAT,
  DOUBLE,
  CSHORT,
  CINT,
  CFLOAT,
  CDOUBLE
}
 
enum  IOPixelType {
  UNKNOWNPIXELTYPE,
  SCALAR,
  RGB,
  RGBA,
  OFFSET,
  VECTOR,
  POINT,
  COVARIANTVECTOR,
  SYMMETRICSECONDRANKTENSOR,
  DIFFUSIONTENSOR3D,
  COMPLEX,
  FIXEDARRAY,
  MATRIX
}
 
typedef itk::SmartPointer< SelfPointer
 
typedef ImageIOBase Self
 
typedef std::streamoff SizeType
 
typedef unsigned long SizeValueType
 
typedef itk::LightProcessObject Superclass
 

Public Member Functions

 MSTARImageIO ()
 
virtual ~MSTARImageIO ()
 
virtual bool CanReadFile (const char *)
 
virtual bool CanStreamRead ()
 
virtual bool CanStreamWrite ()
 
virtual bool CanWriteFile (const char *)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 
virtual void Read (void *buffer)
 
virtual void ReadImageInformation ()
 
virtual void Write (const void *buffer)
 
virtual void WriteImageInformation ()
 
- Public Member Functions inherited from otb::ImageIOBase
virtual itk::ImageIORegion GenerateStreamableReadRegionFromRequestedRegion (const itk::ImageIORegion &requested) const
 
virtual unsigned int GetActualNumberOfSplitsForWriting (unsigned int numberOfRequestedSplits, const itk::ImageIORegion &pasteRegion, const itk::ImageIORegion &largestPossibleRegion)
 
virtual ByteOrder GetByteOrder () const
 
std::string GetByteOrderAsString (ByteOrder) const
 
virtual unsigned int GetComponentSize () const
 
virtual IOComponentType GetComponentType () const
 
std::string GetComponentTypeAsString (IOComponentType) const
 
virtual const std::type_info & GetComponentTypeInfo () const
 
virtual std::vector< double > GetDefaultDirection (unsigned int i) const
 
virtual unsigned int GetDimensions (unsigned int i) const
 
virtual std::vector< double > GetDirection (unsigned int i) const
 
virtual const char * GetFileName () const
 
virtual FileType GetFileType () const
 
std::string GetFileTypeAsString (FileType) const
 
SizeType GetImageSizeInBytes () const
 
SizeType GetImageSizeInComponents () const
 
SizeType GetImageSizeInPixels () const
 
virtual const itk::ImageIORegionGetIORegion ()
 
virtual const unsigned int & GetNumberOfComponents ()
 
virtual unsigned int GetNumberOfDimensions () const
 
virtual double GetOrigin (unsigned int i) const
 
virtual SizeType GetPixelStride () const
 
virtual IOPixelType GetPixelType () const
 
std::string GetPixelTypeAsString (IOPixelType) const
 
virtual double GetSpacing (unsigned int i) const
 
virtual itk::ImageIORegion GetSplitRegionForWriting (unsigned int ithPiece, unsigned int numberOfActualSplits, const itk::ImageIORegion &pasteRegion, const itk::ImageIORegion &largestPossibleRegion)
 
const ArrayOfExtensionsTypeGetSupportedReadExtensions () const
 
const ArrayOfExtensionsTypeGetSupportedWriteExtensions () const
 
virtual bool GetUseCompression () const
 
virtual bool GetUseStreamedReading () const
 
virtual bool GetUseStreamedWriting () const
 
virtual void SetByteOrder (const ByteOrder _arg)
 
void SetByteOrderToBigEndian ()
 
void SetByteOrderToLittleEndian ()
 
virtual void SetComponentType (const IOComponentType _arg)
 
virtual void SetDimensions (unsigned int i, unsigned int dim)
 
virtual void SetDirection (unsigned int i, std::vector< double > &direction)
 
virtual void SetDirection (unsigned int i, vnl_vector< double > &direction)
 
virtual void SetFileName (const char *_arg)
 
virtual void SetFileType (const FileType _arg)
 
void SetFileTypeToASCII ()
 
void SetFileTypeToBinary ()
 
virtual void SetIORegion (itk::ImageIORegion _arg)
 
virtual void SetNumberOfComponents (unsigned int _arg)
 
void SetNumberOfDimensions (unsigned int)
 
virtual void SetOrigin (unsigned int i, double origin)
 
virtual void SetPixelType (const IOPixelType _arg)
 
virtual bool SetPixelTypeInfo (const std::type_info &ptype)
 
virtual void SetSpacing (unsigned int i, double spacing)
 
virtual void SetUseCompression (bool _arg)
 
virtual void SetUseStreamedReading (bool _arg)
 
virtual void SetUseStreamedWriting (bool _arg)
 
virtual bool SupportsDimension (unsigned long dim)
 
virtual void UseCompressionOff ()
 
virtual void UseCompressionOn ()
 
virtual void UseStreamedReadingOff ()
 
virtual void UseStreamedReadingOn ()
 
virtual void UseStreamedWritingOff ()
 
virtual void UseStreamedWritingOn ()
 

Static Public Member Functions

static Pointer New ()
 

Private Member Functions

 MSTARImageIO (const Self &)
 
float byteswap_SR_IR (unsigned char *pointer)
 
unsigned short byteswap_SUS_IUS (unsigned char *pointer)
 
int CheckByteOrder (void)
 
void operator= (const Self &)
 

Private Attributes

unsigned char bigfloatbuf [4]
 
unsigned char bigushortbuf [2]
 
int byteorder
 
long bytesPerImage
 
float * CHIPdata
 
unsigned short * FSCENEdata
 
FILE * HDRfp
 
char HDRname [80]
 
int i
 
int j
 
float littlefloatval
 
unsigned short littleushortval
 
int m_BytePerPixel
 
long magloc
 
FILE * MSTARfp
 
const char * MSTARname
 
int mstartype
 
int n
 
long nchunks
 
int nhlen
 
int numcols
 
int numgot
 
int numrows
 
int outOpt
 
char * phdr
 
int phlen
 
FILE * RAWfp
 
char RAWname [80]
 
int rv
 
char tbuff [1024]
 
long totchunks
 
char * tptr
 

Additional Inherited Members

- Protected Member Functions inherited from otb::ImageIOBase
 ImageIOBase ()
 
virtual ~ImageIOBase ()
 
void AddSupportedReadExtension (const char *extension)
 
void AddSupportedWriteExtension (const char *extension)
 
void ComputeStrides ()
 
virtual unsigned int GetActualNumberOfSplitsForWritingCanStreamWrite (unsigned int numberOfRequestedSplits, const itk::ImageIORegion &pasteRegion) const
 
SizeType GetComponentStride () const
 
virtual unsigned int GetPixelSize () const
 
SizeType GetRowStride () const
 
SizeType GetSliceStride () const
 
virtual itk::ImageIORegion GetSplitRegionForWritingCanStreamWrite (unsigned int ithPiece, unsigned int numberOfActualSplits, const itk::ImageIORegion &pasteRegion) const
 
void ReadBufferAsASCII (std::istream &os, void *buffer, IOComponentType ctype, SizeType numberOfBytesToBeRead)
 
bool ReadBufferAsBinary (std::istream &os, void *buffer, SizeType numberOfBytesToBeRead)
 
virtual void Reset (const bool freeDynamic=true)
 
void Resize (const unsigned int numDimensions, const unsigned int *dimensions)
 
void WriteBufferAsASCII (std::ostream &os, const void *buffer, IOComponentType ctype, SizeType numberOfBytesToWrite)
 
- Protected Attributes inherited from otb::ImageIOBase
ByteOrder m_ByteOrder
 
IOComponentType m_ComponentType
 
std::vector< SizeValueTypem_Dimensions
 
std::vector< std::vector
< double > > 
m_Direction
 
std::string m_FileName
 
FileType m_FileType
 
bool m_Initialized
 
itk::ImageIORegion m_IORegion
 
unsigned int m_NumberOfComponents
 
unsigned int m_NumberOfDimensions
 
std::vector< double > m_Origin
 
IOPixelType m_PixelType
 
std::vector< double > m_Spacing
 
std::vector< SizeTypem_Strides
 
bool m_UseCompression
 
bool m_UseStreamedReading
 
bool m_UseStreamedWriting
 

Detailed Description

ImageIO object for reading and writing MSTAR images.

The streaming read/write are implemented.

Definition at line 35 of file otbMSTARImageIO.h.

Member Typedef Documentation

Definition at line 41 of file otbMSTARImageIO.h.

Standard class typedefs.

Definition at line 39 of file otbMSTARImageIO.h.

Definition at line 40 of file otbMSTARImageIO.h.

Constructor & Destructor Documentation

otb::MSTARImageIO::MSTARImageIO ( )
otb::MSTARImageIO::~MSTARImageIO ( )
virtual

Destructor

Definition at line 77 of file otbMSTARImageIO.cxx.

References NULL, and phdr.

otb::MSTARImageIO::MSTARImageIO ( const Self )
private

Member Function Documentation

float otb::MSTARImageIO::byteswap_SR_IR ( unsigned char *  pointer)
private

Methode permettant de recuperer le format et le nom de l'image a partir du nom d'un fichier image.

Definition at line 673 of file otbMSTARImageIO.cxx.

Referenced by Read().

unsigned short otb::MSTARImageIO::byteswap_SUS_IUS ( unsigned char *  pointer)
private

Definition at line 687 of file otbMSTARImageIO.cxx.

Referenced by Read().

bool otb::MSTARImageIO::CanReadFile ( const char *  filename)
virtual

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

Implements otb::ImageIOBase.

Definition at line 86 of file otbMSTARImageIO.cxx.

References CHIP_IMAGE, FSCENE_IMAGE, MSTARfp, MSTARname, mstartype, nhlen, NULL, numcols, numrows, otbMsgDevMacro, phlen, tbuff, and tptr.

virtual bool otb::MSTARImageIO::CanStreamRead ( )
inlinevirtual

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

Reimplemented from otb::ImageIOBase.

Definition at line 56 of file otbMSTARImageIO.h.

virtual bool otb::MSTARImageIO::CanStreamWrite ( void  )
inlinevirtual

Determine the file type. Returns true if the ImageIO can stream write the specified file

Reimplemented from otb::ImageIOBase.

Definition at line 74 of file otbMSTARImageIO.h.

bool otb::MSTARImageIO::CanWriteFile ( const char *  filename)
virtual

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

Implements otb::ImageIOBase.

Definition at line 217 of file otbMSTARImageIO.cxx.

int otb::MSTARImageIO::CheckByteOrder ( void  )
private

Definition at line 699 of file otbMSTARImageIO.cxx.

References LSB_FIRST, and MSB_FIRST.

Referenced by Read().

virtual::itk::LightObject::Pointer otb::MSTARImageIO::CreateAnother ( void  ) const
virtual const char* otb::MSTARImageIO::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from otb::ImageIOBase.

static Pointer otb::MSTARImageIO::New ( )
static

Method for creation through the object factory.

void otb::MSTARImageIO::operator= ( const Self )
private
void otb::MSTARImageIO::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
virtual

Print Self Method

Reimplemented from otb::ImageIOBase.

Definition at line 668 of file otbMSTARImageIO.cxx.

References otb::ImageIOBase::PrintSelf().

void otb::MSTARImageIO::Read ( void *  buffer)
virtual
void otb::MSTARImageIO::ReadImageInformation ( )
virtual
void otb::MSTARImageIO::Write ( const void *  buffer)
virtual

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

The write function is not implemented

Implements otb::ImageIOBase.

Definition at line 662 of file otbMSTARImageIO.cxx.

void otb::MSTARImageIO::WriteImageInformation ( void  )
virtual

Set the spacing and dimension information for the set filename.

The write function is not implemented

Implements otb::ImageIOBase.

Definition at line 656 of file otbMSTARImageIO.cxx.

Member Data Documentation

unsigned char otb::MSTARImageIO::bigfloatbuf[4]
private

Definition at line 123 of file otbMSTARImageIO.h.

Referenced by Read().

unsigned char otb::MSTARImageIO::bigushortbuf[2]
private

Definition at line 125 of file otbMSTARImageIO.h.

Referenced by Read().

int otb::MSTARImageIO::byteorder
private

Definition at line 122 of file otbMSTARImageIO.h.

Referenced by Read().

long otb::MSTARImageIO::bytesPerImage
private

Definition at line 112 of file otbMSTARImageIO.h.

Referenced by Read().

float* otb::MSTARImageIO::CHIPdata
private

Definition at line 119 of file otbMSTARImageIO.h.

Referenced by MSTARImageIO(), and Read().

unsigned short* otb::MSTARImageIO::FSCENEdata
private

Definition at line 118 of file otbMSTARImageIO.h.

Referenced by MSTARImageIO(), and Read().

FILE* otb::MSTARImageIO::HDRfp
private

Definition at line 102 of file otbMSTARImageIO.h.

Referenced by MSTARImageIO().

char otb::MSTARImageIO::HDRname[80]
private

Definition at line 108 of file otbMSTARImageIO.h.

int otb::MSTARImageIO::i
private

Definition at line 104 of file otbMSTARImageIO.h.

Referenced by Read().

int otb::MSTARImageIO::j
private

Definition at line 104 of file otbMSTARImageIO.h.

float otb::MSTARImageIO::littlefloatval
private

Definition at line 124 of file otbMSTARImageIO.h.

Referenced by Read().

unsigned short otb::MSTARImageIO::littleushortval
private

Definition at line 126 of file otbMSTARImageIO.h.

Referenced by Read().

int otb::MSTARImageIO::m_BytePerPixel
private

Definition at line 128 of file otbMSTARImageIO.h.

Referenced by MSTARImageIO(), Read(), and ReadImageInformation().

long otb::MSTARImageIO::magloc
private

Definition at line 112 of file otbMSTARImageIO.h.

Referenced by Read().

FILE* otb::MSTARImageIO::MSTARfp
private

Definition at line 100 of file otbMSTARImageIO.h.

Referenced by CanReadFile(), MSTARImageIO(), Read(), and ReadImageInformation().

const char* otb::MSTARImageIO::MSTARname
private

Definition at line 106 of file otbMSTARImageIO.h.

Referenced by CanReadFile(), MSTARImageIO(), Read(), and ReadImageInformation().

int otb::MSTARImageIO::mstartype
private

Definition at line 111 of file otbMSTARImageIO.h.

Referenced by CanReadFile(), Read(), and ReadImageInformation().

int otb::MSTARImageIO::n
private

Definition at line 104 of file otbMSTARImageIO.h.

Referenced by Read().

long otb::MSTARImageIO::nchunks
private

Definition at line 112 of file otbMSTARImageIO.h.

Referenced by Read().

int otb::MSTARImageIO::nhlen
private

Definition at line 111 of file otbMSTARImageIO.h.

Referenced by CanReadFile(), Read(), and ReadImageInformation().

int otb::MSTARImageIO::numcols
private

Definition at line 104 of file otbMSTARImageIO.h.

Referenced by CanReadFile(), Read(), and ReadImageInformation().

int otb::MSTARImageIO::numgot
private

Definition at line 104 of file otbMSTARImageIO.h.

Referenced by Read().

int otb::MSTARImageIO::numrows
private

Definition at line 104 of file otbMSTARImageIO.h.

Referenced by CanReadFile(), Read(), and ReadImageInformation().

int otb::MSTARImageIO::outOpt
private

Definition at line 110 of file otbMSTARImageIO.h.

char* otb::MSTARImageIO::phdr
private

Definition at line 115 of file otbMSTARImageIO.h.

Referenced by MSTARImageIO(), and ~MSTARImageIO().

int otb::MSTARImageIO::phlen
private

Definition at line 111 of file otbMSTARImageIO.h.

Referenced by CanReadFile(), Read(), and ReadImageInformation().

FILE* otb::MSTARImageIO::RAWfp
private

Definition at line 101 of file otbMSTARImageIO.h.

char otb::MSTARImageIO::RAWname[80]
private

Definition at line 107 of file otbMSTARImageIO.h.

Referenced by Read().

int otb::MSTARImageIO::rv
private

Definition at line 104 of file otbMSTARImageIO.h.

char otb::MSTARImageIO::tbuff[1024]
private

Definition at line 116 of file otbMSTARImageIO.h.

Referenced by CanReadFile(), Read(), and ReadImageInformation().

long otb::MSTARImageIO::totchunks
private

Definition at line 112 of file otbMSTARImageIO.h.

Referenced by Read().

char* otb::MSTARImageIO::tptr
private

Definition at line 114 of file otbMSTARImageIO.h.

Referenced by CanReadFile(), MSTARImageIO(), Read(), and ReadImageInformation().


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