Skip to content
Snippets Groups Projects
Commit 1fb5e37b authored by Julien Michel's avatar Julien Michel
Browse files

Ajout du support de l'écriture des métadonnées (doit encore être amelioré).

parent 7016e234
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "otbGDALImageIO.h" #include "otbGDALImageIO.h"
#include "otbMacro.h" #include "otbMacro.h"
#include "otbSystem.h" #include "otbSystem.h"
#include "otbImageBase.h"
#include "itkMetaDataObject.h" #include "itkMetaDataObject.h"
#include "itkPNGImageIO.h" #include "itkPNGImageIO.h"
...@@ -498,7 +499,7 @@ void GDALImageIO::InternalReadImageInformation() ...@@ -498,7 +499,7 @@ void GDALImageIO::InternalReadImageInformation()
char** papszMetadata; char** papszMetadata;
papszMetadata = m_poDataset->GetMetadata( NULL ); papszMetadata = m_poDataset->GetMetadata( NULL );
const char *pszValue; const char *pszValue;
pszValue = CSLFetchNameValue( papszMetadata, "CEOS_LINE_SPACING_METERS" ); pszValue = CSLFetchNameValue( papszMetadata, "CEOS_LINE_SPACING_METERS" );
...@@ -962,13 +963,117 @@ void GDALImageIO::InternalWriteImageInformation() ...@@ -962,13 +963,117 @@ void GDALImageIO::InternalWriteImageInformation()
m_poBands[i] = m_poDataset->GetRasterBand(i+1); m_poBands[i] = m_poDataset->GetRasterBand(i+1);
} }
otbMsgDebugMacro( <<"Driver to write: GDAL - "<<extGDAL); otbMsgDebugMacro( <<"Driver to write: GDAL - "<<extGDAL);
otbMsgDebugMacro( <<" Write file : "<< m_FileName); otbMsgDebugMacro( <<" Write file : "<< m_FileName);
otbMsgDebugMacro( <<" GDAL file name : "<< realFileName); otbMsgDebugMacro( <<" GDAL file name : "<< realFileName);
otbMsgDebugMacro( <<" Size : "<<m_Dimensions[0]<<","<<m_Dimensions[1]); otbMsgDebugMacro( <<" Size : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
otbMsgDebugMacro( <<" ComponentType : "<<this->GetComponentType() ); otbMsgDebugMacro( <<" ComponentType : "<<this->GetComponentType() );
otbMsgDebugMacro( <<" NumberOfComponents : "<<this->GetNumberOfComponents()); otbMsgDebugMacro( <<" NumberOfComponents : "<<this->GetNumberOfComponents());
// JULIEN: ADDING SUPPORT FOR METADATA WRITING.
/*----------------------------------------------------------------------*/
/*-------------------------- METADATA ----------------------------------*/
/*----------------------------------------------------------------------*/
// Now initialize the itk dictionary
itk::MetaDataDictionary & dico = this->GetMetaDataDictionary();
/* -------------------------------------------------------------------- */
/* Set Spacing */
/* -------------------------------------------------------------------- */
char** papszMetadata;
papszMetadata = m_poDataset->GetMetadata( NULL );
itk::OStringStream oss;
oss.str("");
oss<<m_Spacing[0];
CSLSetNameValue( papszMetadata, "CEOS_LINE_SPACING_METERS",oss.str().c_str());
oss.str("");
oss<<m_Spacing[1];
CSLSetNameValue( papszMetadata, "CEOS_PIXEL_SPACING_METERS",oss.str().c_str());
oss.str("");
/* -------------------------------------------------------------------- */
/* Set the projection coordinate system of the image : ProjectionRef */
/* -------------------------------------------------------------------- */
if(ImageBase::GetProjectionRef(dico)!="")
{
m_poDataset->SetProjection(ImageBase::GetProjectionRef(dico).c_str());
}
/* -------------------------------------------------------------------- */
/* Set the GCPs */
/* -------------------------------------------------------------------- */
if(ImageBase::GetGCPCount(dico)>0)
{
unsigned int gcpCount = ImageBase::GetGCPCount(dico);
GDAL_GCP * gdalGcps = new GDAL_GCP[gcpCount];
for(unsigned int gcpIndex = 0; gcpIndex < gcpCount;++gcpIndex)
{
gdalGcps[gcpIndex].pszId = const_cast<char *>(ImageBase::GetGCPId(dico,gcpIndex).c_str());
gdalGcps[gcpIndex].pszInfo = const_cast<char *>(ImageBase::GetGCPInfo(dico,gcpIndex).c_str());
gdalGcps[gcpIndex].dfGCPPixel = ImageBase::GetGCPCol(dico,gcpIndex);
gdalGcps[gcpIndex].dfGCPLine = ImageBase::GetGCPRow(dico,gcpIndex);
gdalGcps[gcpIndex].dfGCPX = ImageBase::GetGCPX(dico,gcpIndex);
gdalGcps[gcpIndex].dfGCPY = ImageBase::GetGCPY(dico,gcpIndex);
gdalGcps[gcpIndex].dfGCPZ = ImageBase::GetGCPZ(dico,gcpIndex);
}
m_poDataset->SetGCPs(gcpCount,gdalGcps,ImageBase::GetGCPProjection(dico).c_str());
delete [] gdalGcps;
}
/* -------------------------------------------------------------------- */
/* Set the six coefficients of affine geoTtransform */
/* -------------------------------------------------------------------- */
if(!ImageBase::GetGeoTransform(dico).empty())
{
double * geoTransform = new double[6];
std::vector<double> transformVector = ImageBase::GetGeoTransform(dico);
for(unsigned int i=0; i<6;++i)
{
geoTransform[i]=transformVector[i];
}
m_poDataset->SetGeoTransform(geoTransform);
delete [] geoTransform;
}
/* -------------------------------------------------------------------- */
/* Report metadata. */
/* -------------------------------------------------------------------- */
std::string svalue="";
std::vector<std::string> keys = dico.GetKeys();
MetaDataKey key;
for (unsigned int itkey=0; itkey<keys.size(); itkey++)
{
if(keys[itkey].compare(0,key.m_MetadataKey.length(),key.m_MetadataKey)==0)
{
itk::ExposeMetaData<std::string>(dico,keys[itkey],svalue);
unsigned int equalityPos = svalue.find_first_of('=');
std::string tag = svalue.substr(0,equalityPos);
std::string value = svalue.substr(equalityPos+1);
otbMsgDevMacro(<<"Metadata: "<<tag<<"="<<value);
m_poDataset->SetMetadataItem(tag.c_str(),value.c_str(),NULL);
}
}
// END
} }
std::string GDALImageIO::TypeConversion(std::string name) std::string GDALImageIO::TypeConversion(std::string name)
......
...@@ -35,97 +35,97 @@ Image<TPixel,VImageDimension, foo>::Image() ...@@ -35,97 +35,97 @@ Image<TPixel,VImageDimension, foo>::Image()
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
std::string Image<TPixel, VImageDimension, foo>::GetProjectionRef( void ) std::string Image<TPixel, VImageDimension, foo>::GetProjectionRef( void )
{ {
return ( this->ImageBase::GetProjectionRef( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetProjectionRef( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
std::string Image<TPixel, VImageDimension, foo>::GetGCPProjection( void ) std::string Image<TPixel, VImageDimension, foo>::GetGCPProjection( void )
{ {
return ( this->ImageBase::GetGCPProjection( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetGCPProjection( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
unsigned int Image<TPixel, VImageDimension, foo>::GetGCPCount( void ) unsigned int Image<TPixel, VImageDimension, foo>::GetGCPCount( void )
{ {
return ( this->ImageBase::GetGCPCount( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetGCPCount( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
OTB_GCP & Image<TPixel, VImageDimension, foo>::GetGCPs ( unsigned int GCPnum ) OTB_GCP & Image<TPixel, VImageDimension, foo>::GetGCPs ( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPs( this->GetMetaDataDictionary(), GCPnum ) ); return (this->ImageBase::GetGCPs( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
std::string Image<TPixel, VImageDimension, foo>::GetGCPId( unsigned int GCPnum ) std::string Image<TPixel, VImageDimension, foo>::GetGCPId( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPId( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPId( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
std::string Image<TPixel, VImageDimension, foo>::GetGCPInfo( unsigned int GCPnum ) std::string Image<TPixel, VImageDimension, foo>::GetGCPInfo( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPInfo( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPInfo( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double Image<TPixel, VImageDimension, foo>::GetGCPRow( unsigned int GCPnum ) double Image<TPixel, VImageDimension, foo>::GetGCPRow( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPRow( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPRow( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double Image<TPixel, VImageDimension, foo>::GetGCPCol( unsigned int GCPnum ) double Image<TPixel, VImageDimension, foo>::GetGCPCol( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPCol( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPCol( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double Image<TPixel, VImageDimension, foo>::GetGCPX( unsigned int GCPnum ) double Image<TPixel, VImageDimension, foo>::GetGCPX( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPX( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPX( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double Image<TPixel, VImageDimension, foo>::GetGCPY( unsigned int GCPnum ) double Image<TPixel, VImageDimension, foo>::GetGCPY( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPY( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPY( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double Image<TPixel, VImageDimension, foo>::GetGCPZ( unsigned int GCPnum ) double Image<TPixel, VImageDimension, foo>::GetGCPZ( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPZ( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPZ( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetGeoTransform( void ) ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetGeoTransform( void )
{ {
return ( this->ImageBase::GetGeoTransform( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetGeoTransform( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetUpperLeftCorner( void ) ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetUpperLeftCorner( void )
{ {
return ( this->ImageBase::GetUpperLeftCorner( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetUpperLeftCorner( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetUpperRightCorner( void ) ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetUpperRightCorner( void )
{ {
return ( this->ImageBase::GetUpperRightCorner( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetUpperRightCorner( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetLowerLeftCorner( void ) ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetLowerLeftCorner( void )
{ {
return ( this->ImageBase::GetLowerLeftCorner( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetLowerLeftCorner( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetLowerRightCorner( void ) ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetLowerRightCorner( void )
{ {
return ( this->ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
......
...@@ -86,7 +86,8 @@ OTB_GCP & ImageBase::GetGCPs(MetaDataDictionaryType & dict, unsigned int GCPnum ...@@ -86,7 +86,8 @@ OTB_GCP & ImageBase::GetGCPs(MetaDataDictionaryType & dict, unsigned int GCPnum
if(dict.HasKey(key)) if(dict.HasKey(key))
{ {
itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP);
itk::ExposeMetaData<OTB_GCP>(dict, key,m_GCP);
} }
return ( m_GCP ); return ( m_GCP );
...@@ -102,8 +103,9 @@ std::string ImageBase::GetGCPId(MetaDataDictionaryType & dict, unsigned int GCPn ...@@ -102,8 +103,9 @@ std::string ImageBase::GetGCPId(MetaDataDictionaryType & dict, unsigned int GCPn
if(dict.HasKey(key)) if(dict.HasKey(key))
{ {
itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP); OTB_GCP gcp;
return ( m_GCP.m_Id ); itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
return ( gcp.m_Id );
} }
else else
return (""); return ("");
...@@ -119,8 +121,9 @@ std::string ImageBase::GetGCPInfo(MetaDataDictionaryType & dict, unsigned int GC ...@@ -119,8 +121,9 @@ std::string ImageBase::GetGCPInfo(MetaDataDictionaryType & dict, unsigned int GC
if(dict.HasKey(key)) if(dict.HasKey(key))
{ {
itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP); OTB_GCP gcp;
return ( m_GCP.m_Info ); itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
return ( gcp.m_Info );
} }
else else
return (""); return ("");
...@@ -137,8 +140,9 @@ double ImageBase::GetGCPRow(MetaDataDictionaryType & dict, unsigned int GCPnum ) ...@@ -137,8 +140,9 @@ double ImageBase::GetGCPRow(MetaDataDictionaryType & dict, unsigned int GCPnum )
if(dict.HasKey(key)) if(dict.HasKey(key))
{ {
itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP); OTB_GCP gcp;
return ( m_GCP.m_GCPRow ); itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
return ( gcp.m_GCPRow );
} }
else else
return (0); return (0);
...@@ -155,8 +159,9 @@ double ImageBase::GetGCPCol(MetaDataDictionaryType & dict, unsigned int GCPnum ) ...@@ -155,8 +159,9 @@ double ImageBase::GetGCPCol(MetaDataDictionaryType & dict, unsigned int GCPnum )
if(dict.HasKey(key)) if(dict.HasKey(key))
{ {
itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP); OTB_GCP gcp;
return ( m_GCP.m_GCPCol ); itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
return ( gcp.m_GCPCol );
} }
else else
return (0); return (0);
...@@ -172,8 +177,9 @@ double ImageBase::GetGCPX(MetaDataDictionaryType & dict, unsigned int GCPnum ) ...@@ -172,8 +177,9 @@ double ImageBase::GetGCPX(MetaDataDictionaryType & dict, unsigned int GCPnum )
if(dict.HasKey(key)) if(dict.HasKey(key))
{ {
itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP); OTB_GCP gcp;
return ( m_GCP.m_GCPX ); itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
return ( gcp.m_GCPX );
} }
else else
return (0); return (0);
...@@ -189,8 +195,9 @@ double ImageBase::GetGCPY(MetaDataDictionaryType & dict, unsigned int GCPnum ) ...@@ -189,8 +195,9 @@ double ImageBase::GetGCPY(MetaDataDictionaryType & dict, unsigned int GCPnum )
if(dict.HasKey(key)) if(dict.HasKey(key))
{ {
itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP); OTB_GCP gcp;
return ( m_GCP.m_GCPY ); itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
return ( gcp.m_GCPY );
} }
else else
return (0); return (0);
...@@ -206,8 +213,9 @@ double ImageBase::GetGCPZ(MetaDataDictionaryType & dict, unsigned int GCPnum ) ...@@ -206,8 +213,9 @@ double ImageBase::GetGCPZ(MetaDataDictionaryType & dict, unsigned int GCPnum )
if(dict.HasKey(key)) if(dict.HasKey(key))
{ {
itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP); OTB_GCP gcp;
return ( m_GCP.m_GCPZ ); itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
return ( gcp.m_GCPZ );
} }
else else
return (0); return (0);
......
...@@ -48,58 +48,58 @@ public: ...@@ -48,58 +48,58 @@ public:
/** Get the projection coordinate system of the image. */ /** Get the projection coordinate system of the image. */
std::string GetProjectionRef( MetaDataDictionaryType & dict ); static std::string GetProjectionRef( MetaDataDictionaryType & dict );
virtual std::string GetProjectionRef( void ) = 0; virtual std::string GetProjectionRef( void ) = 0;
/** Get the GCP projection coordinates of the image. */ /** Get the GCP projection coordinates of the image. */
std::string GetGCPProjection( MetaDataDictionaryType & dict ); static std::string GetGCPProjection( MetaDataDictionaryType & dict );
virtual std::string GetGCPProjection( void ) = 0; virtual std::string GetGCPProjection( void ) = 0;
unsigned int GetGCPCount( MetaDataDictionaryType & dict ); static unsigned int GetGCPCount( MetaDataDictionaryType & dict );
virtual unsigned int GetGCPCount( void ) = 0; virtual unsigned int GetGCPCount( void ) = 0;
OTB_GCP & GetGCPs(MetaDataDictionaryType & dict, unsigned int GCPnum ); OTB_GCP & GetGCPs(MetaDataDictionaryType & dict, unsigned int GCPnum );
virtual OTB_GCP & GetGCPs( unsigned int GCPnum ) = 0; virtual OTB_GCP & GetGCPs( unsigned int GCPnum ) = 0;
std::string GetGCPId( MetaDataDictionaryType & dict, unsigned int GCPnum ); static std::string GetGCPId( MetaDataDictionaryType & dict, unsigned int GCPnum );
virtual std::string GetGCPId( unsigned int GCPnum ) = 0; virtual std::string GetGCPId( unsigned int GCPnum ) = 0;
std::string GetGCPInfo( MetaDataDictionaryType & dict, unsigned int GCPnum ); static std::string GetGCPInfo( MetaDataDictionaryType & dict, unsigned int GCPnum );
virtual std::string GetGCPInfo( unsigned int GCPnum ) = 0; virtual std::string GetGCPInfo( unsigned int GCPnum ) = 0;
double GetGCPRow( MetaDataDictionaryType & dict, unsigned int GCPnum ); static double GetGCPRow( MetaDataDictionaryType & dict, unsigned int GCPnum );
virtual double GetGCPRow( unsigned int GCPnum ) = 0; virtual double GetGCPRow( unsigned int GCPnum ) = 0;
double GetGCPCol( MetaDataDictionaryType & dict, unsigned int GCPnum ); static double GetGCPCol( MetaDataDictionaryType & dict, unsigned int GCPnum );
virtual double GetGCPCol( unsigned int GCPnum ) = 0; virtual double GetGCPCol( unsigned int GCPnum ) = 0;
double GetGCPX( MetaDataDictionaryType & dict, unsigned int GCPnum ); static double GetGCPX( MetaDataDictionaryType & dict, unsigned int GCPnum );
virtual double GetGCPX( unsigned int GCPnum ) = 0; virtual double GetGCPX( unsigned int GCPnum ) = 0;
double GetGCPY( MetaDataDictionaryType & dict, unsigned int GCPnum ); static double GetGCPY( MetaDataDictionaryType & dict, unsigned int GCPnum );
virtual double GetGCPY( unsigned int GCPnum ) = 0; virtual double GetGCPY( unsigned int GCPnum ) = 0;
double GetGCPZ( MetaDataDictionaryType & dict, unsigned int GCPnum ); static double GetGCPZ( MetaDataDictionaryType & dict, unsigned int GCPnum );
virtual double GetGCPZ( unsigned int GCPnum ) = 0; virtual double GetGCPZ( unsigned int GCPnum ) = 0;
/** Get the six coefficients of affine geoTtransform. */ /** Get the six coefficients of affine geoTtransform. */
VectorType GetGeoTransform( MetaDataDictionaryType & dict ); static VectorType GetGeoTransform( MetaDataDictionaryType & dict );
virtual VectorType GetGeoTransform( void ) = 0; virtual VectorType GetGeoTransform( void ) = 0;
/** Get image corners. */ /** Get image corners. */
VectorType GetUpperLeftCorner( MetaDataDictionaryType & dict ); static VectorType GetUpperLeftCorner( MetaDataDictionaryType & dict );
virtual VectorType GetUpperLeftCorner() = 0; virtual VectorType GetUpperLeftCorner() = 0;
VectorType GetUpperRightCorner( MetaDataDictionaryType & dict ); static VectorType GetUpperRightCorner( MetaDataDictionaryType & dict );
virtual VectorType GetUpperRightCorner() = 0; virtual VectorType GetUpperRightCorner() = 0;
VectorType GetLowerLeftCorner( MetaDataDictionaryType & dict ); static VectorType GetLowerLeftCorner( MetaDataDictionaryType & dict );
virtual VectorType GetLowerLeftCorner() = 0; virtual VectorType GetLowerLeftCorner() = 0;
VectorType GetLowerRightCorner( MetaDataDictionaryType & dict ); static VectorType GetLowerRightCorner( MetaDataDictionaryType & dict );
virtual VectorType GetLowerRightCorner() = 0; virtual VectorType GetLowerRightCorner() = 0;
void PrintSelf(std::ostream& os, itk::Indent indent, const MetaDataDictionaryType & dict) const; void PrintSelf(std::ostream& os, itk::Indent indent, const MetaDataDictionaryType & dict) const;
......
...@@ -36,19 +36,19 @@ VectorImage<TPixel,VImageDimension, foo>::VectorImage() ...@@ -36,19 +36,19 @@ VectorImage<TPixel,VImageDimension, foo>::VectorImage()
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
std::string VectorImage<TPixel, VImageDimension, foo>::GetProjectionRef( void ) std::string VectorImage<TPixel, VImageDimension, foo>::GetProjectionRef( void )
{ {
return ( this->ImageBase::GetProjectionRef( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetProjectionRef( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
std::string VectorImage<TPixel, VImageDimension, foo>::GetGCPProjection( void ) std::string VectorImage<TPixel, VImageDimension, foo>::GetGCPProjection( void )
{ {
return ( this->ImageBase::GetGCPProjection( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetGCPProjection( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
unsigned int VectorImage<TPixel, VImageDimension, foo>::GetGCPCount( void ) unsigned int VectorImage<TPixel, VImageDimension, foo>::GetGCPCount( void )
{ {
return ( this->ImageBase::GetGCPCount( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetGCPCount( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
...@@ -60,73 +60,73 @@ OTB_GCP & VectorImage<TPixel, VImageDimension, foo>::GetGCPs ( unsigned int GCPn ...@@ -60,73 +60,73 @@ OTB_GCP & VectorImage<TPixel, VImageDimension, foo>::GetGCPs ( unsigned int GCPn
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
std::string VectorImage<TPixel, VImageDimension, foo>::GetGCPId( unsigned int GCPnum ) std::string VectorImage<TPixel, VImageDimension, foo>::GetGCPId( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPId( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPId( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
std::string VectorImage<TPixel, VImageDimension, foo>::GetGCPInfo( unsigned int GCPnum ) std::string VectorImage<TPixel, VImageDimension, foo>::GetGCPInfo( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPInfo( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPInfo( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double VectorImage<TPixel, VImageDimension, foo>::GetGCPRow( unsigned int GCPnum ) double VectorImage<TPixel, VImageDimension, foo>::GetGCPRow( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPRow( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPRow( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double VectorImage<TPixel, VImageDimension, foo>::GetGCPCol( unsigned int GCPnum ) double VectorImage<TPixel, VImageDimension, foo>::GetGCPCol( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPCol( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPCol( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double VectorImage<TPixel, VImageDimension, foo>::GetGCPX( unsigned int GCPnum ) double VectorImage<TPixel, VImageDimension, foo>::GetGCPX( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPX( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPX( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double VectorImage<TPixel, VImageDimension, foo>::GetGCPY( unsigned int GCPnum ) double VectorImage<TPixel, VImageDimension, foo>::GetGCPY( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPY( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPY( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
double VectorImage<TPixel, VImageDimension, foo>::GetGCPZ( unsigned int GCPnum ) double VectorImage<TPixel, VImageDimension, foo>::GetGCPZ( unsigned int GCPnum )
{ {
return ( this->ImageBase::GetGCPZ( this->GetMetaDataDictionary(), GCPnum ) ); return ( ImageBase::GetGCPZ( this->GetMetaDataDictionary(), GCPnum ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetGeoTransform( void ) ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetGeoTransform( void )
{ {
return ( this->ImageBase::GetGeoTransform( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetGeoTransform( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetUpperLeftCorner( void ) ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetUpperLeftCorner( void )
{ {
return ( this->ImageBase::GetUpperLeftCorner( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetUpperLeftCorner( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetUpperRightCorner( void ) ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetUpperRightCorner( void )
{ {
return ( this->ImageBase::GetUpperRightCorner( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetUpperRightCorner( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetLowerLeftCorner( void ) ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetLowerLeftCorner( void )
{ {
return ( this->ImageBase::GetLowerLeftCorner( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetLowerLeftCorner( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetLowerRightCorner( void ) ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetLowerRightCorner( void )
{ {
return ( this->ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) ); return ( ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) );
} }
template <class TPixel, unsigned int VImageDimension, unsigned int foo> template <class TPixel, unsigned int VImageDimension, unsigned int foo>
......
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