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

ImageIO object for reading (not writing) RAD format images. More...

#include <otbRADImageIO.h>

+ Inheritance diagram for otb::RADImageIO:
+ Collaboration diagram for otb::RADImageIO:

Public Types

typedef Superclass::ByteOrder ByteOrder
 
typedef itk::SmartPointer< SelfPointer
 
typedef RADImageIO 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

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
 
virtual void Read (void *buffer)
 
virtual void ReadImageInformation ()
 
virtual void ReadVolume (void *buffer)
 
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 ()
 

Protected Member Functions

 RADImageIO ()
 
virtual ~RADImageIO ()
 
void InternalReadImageInformation ()
 
bool OpenOneraDataFileForReading (const char *filename)
 
bool OpenOneraDataFileForWriting (const char *filename)
 
bool OpenOneraHeaderFileForReading (const char *filename)
 
bool OpenOneraHeaderFileForWriting (const char *filename)
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 
- 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)
 

Private Member Functions

 RADImageIO (const Self &)
 
bool InternalReadHeaderInformation (const std::string &file_name, std::fstream &file, const bool reportError)
 
void operator= (const Self &)
 

Private Attributes

int m_BytePerPixel
 
std::fstream * m_ChannelsFile
 
std::vector< std::string > m_ChannelsFileName
 
otb::ImageIOBase::ByteOrder m_FileByteOrder
 
bool m_FlagWriteImageInformation
 
std::fstream m_HeaderFile
 
unsigned int m_NbOfChannels
 
std::string m_TypeRAD
 

Additional Inherited Members

- 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 (not writing) RAD format images.

The streaming read is implemented.

Definition at line 38 of file otbRADImageIO.h.

Member Typedef Documentation

typedef Superclass::ByteOrder otb::RADImageIO::ByteOrder

Byte order typedef

Definition at line 48 of file otbRADImageIO.h.

Definition at line 45 of file otbRADImageIO.h.

Standard class typedefs.

Definition at line 43 of file otbRADImageIO.h.

Definition at line 44 of file otbRADImageIO.h.

Constructor & Destructor Documentation

otb::RADImageIO::RADImageIO ( )
protected
otb::RADImageIO::~RADImageIO ( )
protectedvirtual

Destructor.

Definition at line 75 of file otbRADImageIO.cxx.

References m_ChannelsFile, m_HeaderFile, m_NbOfChannels, and NULL.

otb::RADImageIO::RADImageIO ( const Self )
private

Member Function Documentation

bool otb::RADImageIO::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 95 of file otbRADImageIO.cxx.

References InternalReadHeaderInformation(), and otbMsgDevMacro.

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

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

Reimplemented from otb::ImageIOBase.

Definition at line 63 of file otbRADImageIO.h.

virtual bool otb::RADImageIO::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 84 of file otbRADImageIO.h.

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

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

Implements otb::ImageIOBase.

Definition at line 490 of file otbRADImageIO.cxx.

Referenced by WriteImageInformation().

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

Run-time type information (and related methods).

Reimplemented from otb::ImageIOBase.

bool otb::RADImageIO::InternalReadHeaderInformation ( const std::string &  file_name,
std::fstream &  file,
const bool  reportError 
)
private
void otb::RADImageIO::InternalReadImageInformation ( )
protected
static Pointer otb::RADImageIO::New ( )
static

Method for creation through the object factory.

bool otb::RADImageIO::OpenOneraDataFileForReading ( const char *  filename)
protected
bool otb::RADImageIO::OpenOneraDataFileForWriting ( const char *  filename)
protected
bool otb::RADImageIO::OpenOneraHeaderFileForReading ( const char *  filename)
protected
bool otb::RADImageIO::OpenOneraHeaderFileForWriting ( const char *  filename)
protected
void otb::RADImageIO::operator= ( const Self )
private
void otb::RADImageIO::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

Reimplemented from otb::ImageIOBase.

Definition at line 122 of file otbRADImageIO.cxx.

References otb::ImageIOBase::PrintSelf().

void otb::RADImageIO::Read ( void *  buffer)
virtual
void otb::RADImageIO::ReadImageInformation ( )
virtual
void otb::RADImageIO::ReadVolume ( void *  buffer)
virtual

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

Definition at line 128 of file otbRADImageIO.cxx.

void otb::RADImageIO::Write ( const void *  buffer)
virtual
void otb::RADImageIO::WriteImageInformation ( void  )
virtual

Member Data Documentation

int otb::RADImageIO::m_BytePerPixel
private
std::fstream* otb::RADImageIO::m_ChannelsFile
private
std::vector<std::string> otb::RADImageIO::m_ChannelsFileName
private

Definition at line 155 of file otbRADImageIO.h.

Referenced by InternalReadHeaderInformation(), and WriteImageInformation().

otb::ImageIOBase::ByteOrder otb::RADImageIO::m_FileByteOrder
private

Definition at line 152 of file otbRADImageIO.h.

Referenced by InternalReadHeaderInformation(), and RADImageIO().

bool otb::RADImageIO::m_FlagWriteImageInformation
private

Definition at line 151 of file otbRADImageIO.h.

Referenced by RADImageIO(), and Write().

std::fstream otb::RADImageIO::m_HeaderFile
private

Definition at line 153 of file otbRADImageIO.h.

Referenced by ReadImageInformation(), WriteImageInformation(), and ~RADImageIO().

unsigned int otb::RADImageIO::m_NbOfChannels
private
std::string otb::RADImageIO::m_TypeRAD
private

Definition at line 154 of file otbRADImageIO.h.

Referenced by RADImageIO(), and WriteImageInformation().


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