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

ImageIO object for reading and writing images with GDAL. More...

#include <otbGDALImageIO.h>

+ Inheritance diagram for otb::GDALImageIO:
+ Collaboration diagram for otb::GDALImageIO:

Public Types

typedef std::vector< std::string > GDALCreationOptionsType
 
typedef unsigned char InputPixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef GDALImageIO 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
 
bool GDALPixelTypeIsComplex ()
 
bool GetAvailableResolutions (std::vector< unsigned int > &res)
 
virtual int GetCompressionLevel ()
 
virtual unsigned int GetDatasetNumber ()
 
virtual bool GetIsComplex ()
 
virtual bool GetIsVectorImage ()
 
virtual const char * GetNameOfClass () const
 
virtual unsigned int GetNumberOfOverviews ()
 
GDALCreationOptionsType GetOptions (void)
 
bool GetResolutionInfo (std::vector< unsigned int > &res, std::vector< std::string > &desc)
 
bool GetSubDatasetInfo (std::vector< std::string > &names, std::vector< std::string > &desc)
 
virtual void Read (void *buffer)
 
virtual void ReadImageInformation ()
 
virtual void ReadVolume (void *buffer)
 
virtual void SetCompressionLevel (int _arg)
 
virtual void SetDatasetNumber (unsigned int _arg)
 
virtual void SetIsComplex (bool _arg)
 
virtual void SetIsVectorImage (bool _arg)
 
void SetOptions (const GDALCreationOptionsType &opts)
 
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

 GDALImageIO ()
 
virtual ~GDALImageIO ()
 
void InternalReadImageInformation ()
 
void InternalWriteImageInformation (const void *buffer)
 
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 PrintSelf (std::ostream &os, itk::Indent indent) 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

int m_CompressionLevel
 
unsigned int m_DatasetNumber
 
bool m_IsIndexed
 
int m_NbBands
 
- 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
 

Private Types

typedef itk::SmartPointer
< GDALDatasetWrapper
GDALDatasetWrapperPointer
 

Private Member Functions

 GDALImageIO (const Self &)
 
bool CreationOptionContains (std::string partialOption) const
 
std::string FilenameToGdalDriverShortName (const std::string &name) const
 
bool GDALInfoReportCorner (const char *corner_name, double x, double y, double &dfGeoX, double &dfGeoY) const
 
std::string GetGdalWriteImageFileName (const std::string &gdalDriverShortName, const std::string &filename) const
 
bool GetOriginFromGMLBox (std::vector< double > &origin)
 
void operator= (const Self &)
 

Private Attributes

int m_BytePerPixel
 
bool m_CanStreamWrite
 
GDALCreationOptionsType m_CreationOptions
 
GDALDatasetWrapperPointer m_Dataset
 
bool m_FlagWriteImageInformation
 
bool m_IsComplex
 
bool m_IsVectorImage
 
unsigned int m_NumberOfOverviews
 
std::vector< unsigned int > m_OriginalDimensions
 
std::vector< std::pair
< unsigned int, unsigned int > > 
m_OverviewsSize
 
GDALDataTypeWrapperm_PxType
 
unsigned int m_ResolutionFactor
 

Detailed Description

ImageIO object for reading and writing images with GDAL.

This ImageIO uses GDAL interface to read/write images. The origin and spacing are translated from/to GDAL geotransform matrix (even in the case of a sensor image). It means that extracts from sensor images are well supported. Typical sensor images in OTB have a spacing of [1,1] and an origin at [0.5,0.5] (when there is no GDAL geotransform, GDAL physical space is identical to GDAL index space).

Note that the geotransform matrix supports any rotated physical space whereas OTB doesn't.

Warning : the index coordinate system used in GDAL is attached to the corner of the top left pixel, whereas in OTB, the index coordinate system is attached to the centre of the top-left pixel. It means that the origin coefficents read from the GDAL geotransform are the location of the top-left pixel corner. This is why this location has to be shifted by half a pixel to be used as an OTB origin. In a nutshell, OTB images read/written by this ImageIO have the same physical space as GDAL physical space : a given point of image has the same physical location in OTB and in GDAL.

The streaming read is implemented.

Definition at line 64 of file otbGDALImageIO.h.

Member Typedef Documentation

typedef std::vector<std::string> otb::GDALImageIO::GDALCreationOptionsType

Definition at line 75 of file otbGDALImageIO.h.

GDAL parameters.

Definition at line 213 of file otbGDALImageIO.h.

typedef unsigned char otb::GDALImageIO::InputPixelType

Definition at line 68 of file otbGDALImageIO.h.

Definition at line 73 of file otbGDALImageIO.h.

Standard class typedefs.

Definition at line 71 of file otbGDALImageIO.h.

Definition at line 72 of file otbGDALImageIO.h.

Constructor & Destructor Documentation

otb::GDALImageIO::GDALImageIO ( )
protected
otb::GDALImageIO::~GDALImageIO ( )
protectedvirtual

Destructor.

Definition at line 165 of file otbGDALImageIO.cxx.

References m_PxType.

otb::GDALImageIO::GDALImageIO ( const Self )
private

Member Function Documentation

bool otb::GDALImageIO::CanReadFile ( const char *  file)
virtual

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

Implements otb::ImageIOBase.

Definition at line 171 of file otbGDALImageIO.cxx.

References otb::GDALDriverManagerWrapper::GetInstance(), itk::SmartPointer< TObjectType >::IsNotNull(), m_Dataset, NULL, and otb::GDALDriverManagerWrapper::Open().

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

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

Reimplemented from otb::ImageIOBase.

Definition at line 122 of file otbGDALImageIO.h.

bool otb::GDALImageIO::CanStreamWrite ( void  )
virtual

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

Reimplemented from otb::ImageIOBase.

Definition at line 1258 of file otbGDALImageIO.cxx.

References FilenameToGdalDriverShortName(), otb::GDALDriverManagerWrapper::GetDriverByName(), otb::GDALDriverManagerWrapper::GetInstance(), m_CanStreamWrite, otb::ImageIOBase::m_FileName, and NULL.

bool otb::GDALImageIO::CanWriteFile ( const char *  name)
virtual

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

Implements otb::ImageIOBase.

Definition at line 1229 of file otbGDALImageIO.cxx.

References FilenameToGdalDriverShortName(), otb::GDALDriverManagerWrapper::GetDriverByName(), otb::GDALDriverManagerWrapper::GetInstance(), otb::ImageIOBase::m_FileName, and NULL.

virtual::itk::LightObject::Pointer otb::GDALImageIO::CreateAnother ( void  ) const
bool otb::GDALImageIO::CreationOptionContains ( std::string  partialOption) const
private

Test whether m_CreationOptions has an option

Parameters
partialOptionThe beginning of a creation option (for example "QUALITY=")

Definition at line 1925 of file otbGDALImageIO.cxx.

References m_CreationOptions.

std::string otb::GDALImageIO::FilenameToGdalDriverShortName ( const std::string &  name) const
private
bool otb::GDALImageIO::GDALInfoReportCorner ( const char *  corner_name,
double  x,
double  y,
double &  dfGeoX,
double &  dfGeoY 
) const
private

Definition at line 1900 of file otbGDALImageIO.cxx.

References m_Dataset.

Referenced by InternalReadImageInformation().

bool otb::GDALImageIO::GDALPixelTypeIsComplex ( )

Get if the pixel type in the file is complex or not (GDAL side)

Definition at line 479 of file otbGDALImageIO.cxx.

References m_PxType, and otb::GDALDataTypeWrapper::pixType.

bool otb::GDALImageIO::GetAvailableResolutions ( std::vector< unsigned int > &  res)

Get all resolutions possible from the file dimensions

Definition at line 490 of file otbGDALImageIO.cxx.

References m_Dataset, m_NumberOfOverviews, and uint_ceildivpow2().

Referenced by GetResolutionInfo().

virtual int otb::GDALImageIO::GetCompressionLevel ( )
virtual
virtual unsigned int otb::GDALImageIO::GetDatasetNumber ( )
virtual
std::string otb::GDALImageIO::GetGdalWriteImageFileName ( const std::string &  gdalDriverShortName,
const std::string &  filename 
) const
private

Determine real file name to write the image

Definition at line 1887 of file otbGDALImageIO.cxx.

References otb::System::GetRootName().

Referenced by InternalWriteImageInformation(), and Write().

virtual bool otb::GDALImageIO::GetIsComplex ( )
virtual
virtual bool otb::GDALImageIO::GetIsVectorImage ( )
virtual
virtual const char* otb::GDALImageIO::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from otb::ImageIOBase.

virtual unsigned int otb::GDALImageIO::GetNumberOfOverviews ( )
virtual

Set/Get the overview count of the file (0 = one full resolution)

GDALCreationOptionsType otb::GDALImageIO::GetOptions ( void  )
inline

Definition at line 110 of file otbGDALImageIO.h.

bool otb::GDALImageIO::GetOriginFromGMLBox ( std::vector< double > &  origin)
private

Parse a GML box from a Jpeg2000 file and get the origin

Definition at line 1830 of file otbGDALImageIO.cxx.

References otb::ImageIOBase::m_FileName, and otbMsgDevMacro.

Referenced by InternalReadImageInformation().

bool otb::GDALImageIO::GetResolutionInfo ( std::vector< unsigned int > &  res,
std::vector< std::string > &  desc 
)

Get Info about all resolution possible from the file dimensions

Definition at line 530 of file otbGDALImageIO.cxx.

References GetAvailableResolutions(), m_Dataset, m_OriginalDimensions, and uint_ceildivpow2().

bool otb::GDALImageIO::GetSubDatasetInfo ( std::vector< std::string > &  names,
std::vector< std::string > &  desc 
)

Get Info about all subDataset in hdf file

Definition at line 438 of file otbGDALImageIO.cxx.

References m_Dataset, NULL, otbMsgDevMacro, and otb::System::ParseHdfSubsetName().

void otb::GDALImageIO::InternalReadImageInformation ( )
protected

Read all information on the image

retrieve origin and spacing from the geo transform

Definition at line 584 of file otbGDALImageIO.cxx.

References otb::MetaDataKey::CacheSizeInBytes, otb::ImageIOBase::CDOUBLE, otb::ImageIOBase::CFLOAT, otb::ImageIOBase::CHAR, otb::ImageIOBase::CINT, otb::MetaDataKey::ColorEntryAsRGBKey, otb::MetaDataKey::ColorEntryCountKey, otb::MetaDataKey::ColorTableNameKey, otb::ImageIOBase::COMPLEX, otb::ImageIOBase::CSHORT, otb::ImageIOBase::DOUBLE, otb::MetaDataKey::DriverLongNameKey, otb::MetaDataKey::DriverShortNameKey, otb::ImageIOBase::FLOAT, otb::MetaDataKey::GCPCountKey, otb::MetaDataKey::GCPParametersKey, otb::MetaDataKey::GCPProjectionKey, GDALInfoReportCorner(), otb::MetaDataKey::GeoTransformKey, otb::ImageIOBase::GetComponentType(), otb::ImageIOBase::GetComponentTypeAsString(), otb::GDALDriverManagerWrapper::GetInstance(), otb::ImageIOBase::GetNumberOfComponents(), GetOriginFromGMLBox(), otb::ImageIOBase::GetPixelType(), otb::ImageIOBase::GetPixelTypeAsString(), otb::ImageIOBase::INT, otb::ImageIOBase::LONG, otb::MetaDataKey::LowerLeftCornerKey, otb::MetaDataKey::LowerRightCornerKey, m_BytePerPixel, m_Dataset, m_DatasetNumber, otb::ImageIOBase::m_Dimensions, otb::ImageIOBase::m_FileName, otb::OTB_GCP::m_GCPCol, otb::OTB_GCP::m_GCPRow, otb::OTB_GCP::m_GCPX, otb::OTB_GCP::m_GCPY, otb::OTB_GCP::m_GCPZ, otb::OTB_GCP::m_Id, otb::OTB_GCP::m_Info, m_IsComplex, m_IsIndexed, m_IsVectorImage, m_NbBands, otb::ImageIOBase::m_NumberOfDimensions, m_NumberOfOverviews, otb::ImageIOBase::m_Origin, m_OriginalDimensions, m_OverviewsSize, m_PxType, m_ResolutionFactor, otb::ImageIOBase::m_Spacing, otb::MetaDataKey::MetadataKey, NULL, otb::GDALDriverManagerWrapper::Open(), otbMsgDevMacro, otbWarningMacro, otb::System::ParseHdfSubsetName(), otb::GDALDataTypeWrapper::pixType, otb::MetaDataKey::ProjectionRefKey, otb::MetaDataKey::ResolutionFactor, otb::ImageIOBase::SCALAR, otb::ImageIOBase::SetComponentType(), otb::ImageIOBase::SetFileTypeToBinary(), otb::ImageIOBase::SetNumberOfComponents(), otb::ImageIOBase::SetNumberOfDimensions(), otb::ImageIOBase::SetPixelType(), otb::ImageIOBase::SHORT, otb::MetaDataKey::SubMetadataKey, otb::MetaDataKey::TileHintX, otb::MetaDataKey::TileHintY, otb::ImageIOBase::UCHAR, otb::ImageIOBase::UINT, uint_ceildivpow2(), otb::ImageIOBase::ULONG, otb::MetaDataKey::UpperLeftCornerKey, otb::MetaDataKey::UpperRightCornerKey, otb::ImageIOBase::USHORT, and otb::ImageIOBase::VECTOR.

Referenced by ReadImageInformation().

void otb::GDALImageIO::InternalWriteImageInformation ( const void *  buffer)
protected

Write all information on the image

Reporting origin and spacing

Todo:
Why not keys[itkey] == MetadataKey::MetadataKey ?

Definition at line 1408 of file otbGDALImageIO.cxx.

References otb::ImageIOBase::CDOUBLE, otb::ImageIOBase::CFLOAT, otb::ImageIOBase::CHAR, otb::ImageIOBase::CINT, otb::ImageIOBase::COMPLEX, otb::ImageKeywordlist::convertToGDALRPC(), otb::GDALDriverManagerWrapper::Create(), otb::ImageIOBase::CSHORT, otb::ImageIOBase::DOUBLE, FilenameToGdalDriverShortName(), otb::ImageIOBase::FLOAT, otb::MetaDataKey::GCPCountKey, otb::MetaDataKey::GCPParametersKey, otb::MetaDataKey::GCPProjectionKey, otb::ImageIOBase::GetComponentType(), itk::VariableLengthVector< TValue >::GetDataPointer(), GetGdalWriteImageFileName(), otb::GDALDriverManagerWrapper::GetInstance(), otb::ImageIOBase::GetNumberOfComponents(), otb::ImageIOBase::GetPixelType(), otb::ImageIOBase::GetPixelTypeAsString(), otb::ImageKeywordlist::GetSize(), otb::ImageIOBase::INT, itk::SmartPointer< TObjectType >::IsNull(), otb::ImageIOBase::LONG, m_BytePerPixel, m_CanStreamWrite, m_CreationOptions, m_Dataset, otb::ImageIOBase::m_Dimensions, otb::ImageIOBase::m_FileName, otb::OTB_GCP::m_GCPCol, otb::OTB_GCP::m_GCPRow, otb::OTB_GCP::m_GCPX, otb::OTB_GCP::m_GCPY, otb::OTB_GCP::m_GCPZ, otb::OTB_GCP::m_Id, otb::OTB_GCP::m_Info, m_NbBands, otb::ImageIOBase::m_Origin, m_PxType, otb::ImageIOBase::m_Spacing, otb::MetaDataKey::MetadataKey, NULL, otb::GDALDriverManagerWrapper::Open(), otb::MetaDataKey::OSSIMKeywordlistKey, otbMsgDevMacro, otb::GDALDataTypeWrapper::pixType, otb::MetaDataKey::ProjectionRefKey, otb::ImageIOBase::SetFileTypeToBinary(), otb::ImageIOBase::SHORT, otb::ogr::StringListConverter::to_ogr(), otb::ImageIOBase::UCHAR, otb::ImageIOBase::UINT, uintptr_t, otb::ImageIOBase::ULONG, and otb::ImageIOBase::USHORT.

Referenced by Write().

static Pointer otb::GDALImageIO::New ( )
static

Method for creation through the object factory.

Referenced by otb::TileMapImageIO::CanReadFromCache(), otb::TileMapImageIO::InternalWrite(), and otb::TileMapImageIO::ReadTile().

void otb::GDALImageIO::operator= ( const Self )
private
void otb::GDALImageIO::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual
void otb::GDALImageIO::Read ( void *  buffer)
virtual
void otb::GDALImageIO::ReadImageInformation ( )
virtual

Set the spacing and dimention information for the set filename.

Implements otb::ImageIOBase.

Definition at line 484 of file otbGDALImageIO.cxx.

References InternalReadImageInformation().

void otb::GDALImageIO::ReadVolume ( void *  buffer)
virtual

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

Definition at line 193 of file otbGDALImageIO.cxx.

virtual void otb::GDALImageIO::SetCompressionLevel ( int  _arg)
virtual

Set/Get the level of compression for the output images. 0-9; 0 = none, 9 = maximum.

virtual void otb::GDALImageIO::SetDatasetNumber ( unsigned int  _arg)
virtual

Set/Get the dataset index to extract (starting at 0)

virtual void otb::GDALImageIO::SetIsComplex ( bool  _arg)
virtual

Set/Get whether the pixel type (otb side) is complex

virtual void otb::GDALImageIO::SetIsVectorImage ( bool  _arg)
virtual

Set/Get whether the pixel type (otb side) is Vector or Scalar

void otb::GDALImageIO::SetOptions ( const GDALCreationOptionsType opts)
inline

Set/Get the options

Definition at line 105 of file otbGDALImageIO.h.

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

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

TODO : Methode WriteImageInformation non implementee

Implements otb::ImageIOBase.

Definition at line 1404 of file otbGDALImageIO.cxx.

Member Data Documentation

int otb::GDALImageIO::m_BytePerPixel
private

Nombre d'octets par pixel

Definition at line 218 of file otbGDALImageIO.h.

Referenced by InternalReadImageInformation(), InternalWriteImageInformation(), PrintSelf(), Read(), and Write().

bool otb::GDALImageIO::m_CanStreamWrite
private
int otb::GDALImageIO::m_CompressionLevel
protected

Buffer Determines the level of compression for written files. Range 0-9; 0 = none, 9 = maximum , default = 4

Definition at line 188 of file otbGDALImageIO.h.

Referenced by GDALImageIO(), and PrintSelf().

GDALCreationOptionsType otb::GDALImageIO::m_CreationOptions
private

Creation Options

Definition at line 236 of file otbGDALImageIO.h.

Referenced by CreationOptionContains(), InternalWriteImageInformation(), and Write().

GDALDatasetWrapperPointer otb::GDALImageIO::m_Dataset
private
unsigned int otb::GDALImageIO::m_DatasetNumber
protected

Dataset index to extract (starting at 0)

Definition at line 193 of file otbGDALImageIO.h.

Referenced by GDALImageIO(), and InternalReadImageInformation().

bool otb::GDALImageIO::m_FlagWriteImageInformation
private

Definition at line 223 of file otbGDALImageIO.h.

Referenced by GDALImageIO(), and Write().

bool otb::GDALImageIO::m_IsComplex
private

Whether the pixel type (otb side, not gdal side) is complex this information has to be provided by the reader

Definition at line 228 of file otbGDALImageIO.h.

Referenced by GDALImageIO(), InternalReadImageInformation(), PrintSelf(), and Read().

bool otb::GDALImageIO::m_IsIndexed
protected

Definition at line 190 of file otbGDALImageIO.h.

Referenced by GDALImageIO(), InternalReadImageInformation(), and Read().

bool otb::GDALImageIO::m_IsVectorImage
private

Whether the pixel type (otb side, not gdal side) is Vector this information has to be provided by the reader

Definition at line 232 of file otbGDALImageIO.h.

Referenced by GDALImageIO(), InternalReadImageInformation(), and Read().

int otb::GDALImageIO::m_NbBands
protected

Number of bands of the image

Definition at line 182 of file otbGDALImageIO.h.

Referenced by GDALImageIO(), InternalReadImageInformation(), InternalWriteImageInformation(), Read(), and Write().

unsigned int otb::GDALImageIO::m_NumberOfOverviews
private

Number of Overviews in the file

Definition at line 240 of file otbGDALImageIO.h.

Referenced by GDALImageIO(), GetAvailableResolutions(), and InternalReadImageInformation().

std::vector<unsigned int> otb::GDALImageIO::m_OriginalDimensions
private

Original dimension of the input image

Definition at line 253 of file otbGDALImageIO.h.

Referenced by GetResolutionInfo(), InternalReadImageInformation(), and Read().

std::vector<std::pair<unsigned int, unsigned int> > otb::GDALImageIO::m_OverviewsSize
private

Size of the different overviews of the file

Definition at line 244 of file otbGDALImageIO.h.

Referenced by InternalReadImageInformation().

GDALDataTypeWrapper* otb::GDALImageIO::m_PxType
private
unsigned int otb::GDALImageIO::m_ResolutionFactor
private

Resolution factor

Definition at line 248 of file otbGDALImageIO.h.

Referenced by GDALImageIO(), InternalReadImageInformation(), and Read().


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