Skip to content
Snippets Groups Projects
Commit d03b516d authored by Caroline Ruffel's avatar Caroline Ruffel
Browse files

Mise en place des classes otb::Image et otb::VectorImage (lecture des Meta...

Mise en place des classes otb::Image et otb::VectorImage (lecture des Meta données des images GDAL).
parent c0cfd2c8
No related branches found
No related tags found
No related merge requests found
/*=========================================================================
Programme : OTB (ORFEO ToolBox)
Auteurs : CS - C.Ruffel
Language : C++
Date : 09 mai 2006
Version :
Role : Cration d'une otb::VectorImage
$Id$
=========================================================================*/
#ifndef __otbVectorImage_h
#define __otbVectorImage_h
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include "itkVectorImage.h"
#include "otbImageBase.h"
#include <iostream>
#include <string.h>
namespace otb
{
/** \class VectorImage
* \brief Creation of an "otb" vector image which contains metadata.
*
*/
template <class TPixel, unsigned int VImageDimension=2>
class ITK_EXPORT VectorImage : public itk::VectorImage<TPixel, VImageDimension>,
public otb::ImageBase
{
public:
typedef TPixel InputPixelType;
/** Standard class typedefs. */
typedef VectorImage Self;
typedef itk::VectorImage<InputPixelType, VImageDimension> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
typedef ImageBase::VectorType VectorType;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(VectorImage, itk::VectorImage);
/** Get the projection coordinate system of the image. */
virtual std::string GetProjectionRef( void );
/** Get the GCP projection coordinates of the image. */
virtual std::string GetGCPProjection( void );
virtual unsigned int GetGCPCount( void );
virtual OTB_GCP & GetGCPs ( unsigned int GCPnum );
virtual std::string GetGCPId( unsigned int GCPnum );
virtual std::string GetGCPInfo( unsigned int GCPnum );
virtual double GetGCPRow( unsigned int GCPnum );
virtual double GetGCPCol( unsigned int GCPnum );
virtual double GetGCPX( unsigned int GCPnum );
virtual double GetGCPY( unsigned int GCPnum );
virtual double GetGCPZ( unsigned int GCPnum );
/** Get the six coefficients of affine geoTtransform. */
virtual VectorType GetGeoTransform( void );
/** Get image corners. */
virtual VectorType GetUpperLeftCorner( void );
virtual VectorType GetUpperRightCorner( void );
virtual VectorType GetLowerLeftCorner( void );
virtual VectorType GetLowerRightCorner( void );
void PrintSelf(std::ostream& os, Indent indent) const;
protected:
VectorImage();
virtual ~VectorImage(){};
private:
VectorImage(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
};
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbVectorImage.txx"
#endif
#endif
/*=========================================================================
Programme : OTB (ORFEO ToolBox)
Auteurs : CS - C.Ruffel
Language : C++
Date : 09 mai 2006
Version :
Role : Cration d'une otb::VectorImage
$Id: $
=========================================================================*/
#ifndef __otbVectorImage_txx
#define __otbVectorImage_txx
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif
#include "otbVectorImage.h"
namespace otb
{
template <class TPixel, unsigned int VImageDimension>
VectorImage<TPixel,VImageDimension>::VectorImage()
{
}
template <class TPixel, unsigned int VImageDimension>
std::string VectorImage<TPixel, VImageDimension>::GetProjectionRef( void )
{
return ( this->ImageBase::GetProjectionRef( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension>
std::string VectorImage<TPixel, VImageDimension>::GetGCPProjection( void )
{
return ( this->ImageBase::GetGCPProjection( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension>
unsigned int VectorImage<TPixel, VImageDimension>::GetGCPCount( void )
{
return ( this->ImageBase::GetGCPCount( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension>
OTB_GCP & VectorImage<TPixel, VImageDimension>::GetGCPs ( unsigned int GCPnum )
{
return ( this->ImageBase::GetGCPs( this->GetMetaDataDictionary(), GCPnum ) );
}
template <class TPixel, unsigned int VImageDimension>
std::string VectorImage<TPixel, VImageDimension>::GetGCPId( unsigned int GCPnum )
{
return ( this->ImageBase::GetGCPId( this->GetMetaDataDictionary(), GCPnum ) );
}
template <class TPixel, unsigned int VImageDimension>
std::string VectorImage<TPixel, VImageDimension>::GetGCPInfo( unsigned int GCPnum )
{
return ( this->ImageBase::GetGCPInfo( this->GetMetaDataDictionary(), GCPnum ) );
}
template <class TPixel, unsigned int VImageDimension>
double VectorImage<TPixel, VImageDimension>::GetGCPRow( unsigned int GCPnum )
{
return ( this->ImageBase::GetGCPRow( this->GetMetaDataDictionary(), GCPnum ) );
}
template <class TPixel, unsigned int VImageDimension>
double VectorImage<TPixel, VImageDimension>::GetGCPCol( unsigned int GCPnum )
{
return ( this->ImageBase::GetGCPCol( this->GetMetaDataDictionary(), GCPnum ) );
}
template <class TPixel, unsigned int VImageDimension>
double VectorImage<TPixel, VImageDimension>::GetGCPX( unsigned int GCPnum )
{
return ( this->ImageBase::GetGCPX( this->GetMetaDataDictionary(), GCPnum ) );
}
template <class TPixel, unsigned int VImageDimension>
double VectorImage<TPixel, VImageDimension>::GetGCPY( unsigned int GCPnum )
{
return ( this->ImageBase::GetGCPY( this->GetMetaDataDictionary(), GCPnum ) );
}
template <class TPixel, unsigned int VImageDimension>
double VectorImage<TPixel, VImageDimension>::GetGCPZ( unsigned int GCPnum )
{
return ( this->ImageBase::GetGCPZ( this->GetMetaDataDictionary(), GCPnum ) );
}
template <class TPixel, unsigned int VImageDimension>
ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetGeoTransform( void )
{
return ( this->ImageBase::GetGeoTransform( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension>
ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetUpperLeftCorner( void )
{
return ( this->ImageBase::GetUpperLeftCorner( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension>
ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetUpperRightCorner( void )
{
return ( this->ImageBase::GetUpperRightCorner( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension>
ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetLowerLeftCorner( void )
{
return ( this->ImageBase::GetLowerLeftCorner( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension>
ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetLowerRightCorner( void )
{
return ( this->ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension>
void
VectorImage<TPixel, VImageDimension>::PrintSelf(std::ostream& os, Indent indent) const
{
Superclass::PrintSelf(os,indent);
this->ImageBase::PrintSelf( os, indent, this->GetMetaDataDictionary() );
}
} // end namespace otb
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment