Commit d967b2f5 authored by Romain Garrigues's avatar Romain Garrigues
Browse files

MàJ de la partie Projections, pour corriger l'Orthorectification.

Ajout de la prise en compte d'un DEM pour le filtre d'Orthorectification.
Mise en base d'images tests sur l'Orthorectification
parent 25744e68
......@@ -65,12 +65,11 @@ public:
typedef typename Superclass::InterpolatorType InterpolatorType;
typedef typename InterpolatorType::PointType PointType;
/** Set size of neighborhood needed to interpolate points */
itkSetMacro(InterpolatorNeighborhoodRadius,unsigned int);
/** Get size of neighborhood needed to interpolate points */
itkGetMacro(InterpolatorNeighborhoodRadius,unsigned int);
itkSetMacro(AddedRadius,unsigned int);
itkGetMacro(AddedRadius,unsigned int);
/** ResampleImageFilter needs a different input requested region than
* the output requested region. As such, ResampleImageFilter needs
......@@ -93,8 +92,8 @@ private:
// Determine size of pad needed for interpolators neighborhood
unsigned int m_InterpolatorNeighborhoodRadius;
// Determine if interpolator radius is determined by class user
// bool m_RadiusIsDeterminedByUser;
// Used to be sure that each final region will be contiguous
unsigned int m_AddedRadius;
};
......
......@@ -40,7 +40,7 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
// Default neighborhood interpolation radius is one pixel
m_InterpolatorNeighborhoodRadius = 1 ;
// m_RadiusIsDeterminedByUser = false;
m_AddedRadius = 2;
}
......@@ -53,7 +53,7 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
if ( this->GetInput() )
{
otbDebugMacro(<< "-------------- GenerateInputRequestedRegion ---------------" << std::endl);
otbMsgDebugMacro(<< "-------------- GenerateInputRequestedRegion ---------------" << std::endl);
InputImagePointer inputImage = const_cast< typename Superclass::InputImageType *>( this->GetInput() );
OutputImagePointer outputImage = const_cast< typename Superclass::OutputImageType *>( this->GetOutput() );
......@@ -66,27 +66,27 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
std::vector<IndexType> vPoints;
typename std::vector<IndexType>::iterator it;
otbDebugMacro(<< "Size : " << size[0] << " " << size[1]);
otbMsgDebugMacro(<< "Size : " << size[0] << " " << size[1]);
indexTmp[0]=index[0];
indexTmp[1]=index[1];
vPoints.push_back(indexTmp);
otbDebugMacro(<< "indexUL : (" << indexTmp[0] << "," << indexTmp[1] << ")");
//otbGenericMsgDebugMacro(<< "indexUL : (" << indexTmp[0] << "," << indexTmp[1] << ")");
indexTmp[0]=index[0]+size[0];
indexTmp[1]=index[1];
vPoints.push_back(indexTmp);
otbDebugMacro(<< "indexUR : (" << indexTmp[0] << "," << indexTmp[1] << ")");
//otbGenericMsgDebugMacro(<< "indexUR : (" << indexTmp[0] << "," << indexTmp[1] << ")");
indexTmp[0]=index[0]+size[0];
indexTmp[1]=index[1]+size[1];
vPoints.push_back(indexTmp);
otbDebugMacro(<< "indexLR : (" << indexTmp[0] << "," << indexTmp[1] << ")");
//otbGenericMsgDebugMacro(<< "indexLR : (" << indexTmp[0] << "," << indexTmp[1] << ")");
indexTmp[0]=index[0];
indexTmp[1]=index[1]+size[1];
vPoints.push_back(indexTmp);
otbDebugMacro(<< "indexLL : (" << indexTmp[0] << "," << indexTmp[1] << ")");
//otbGenericMsgDebugMacro(<< "indexLL : (" << indexTmp[0] << "," << indexTmp[1] << ")");
typedef itk::ContinuousIndex<TInterpolatorPrecisionType, 2> ContinuousIndexType;
typename ContinuousIndexType::ValueType minX = itk::NumericTraits<typename ContinuousIndexType::ValueType>::max();
......@@ -106,24 +106,32 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
// Calculate transformed points needed for previous filter in the pipeline
outputImage->TransformIndexToPhysicalPoint( *it, outputPoint );
otbMsgDebugMacro(<< "Pour l'Index Ncurrent:(" << (*it)[0]<<","<< (*it)[1] << ")"<< std::endl
<< "Le point physique correspondant est: ("<< outputPoint[0]<< ","<< outputPoint[1]<< ")");
// Compute corresponding input pixel continuous index
inputPoint = this->GetTransform()->TransformPoint(outputPoint);
inputImage->TransformPhysicalPointToContinuousIndex(inputPoint, indexTmpTr);
inputImage->TransformPhysicalPointToContinuousIndex(inputPoint, indexTmpTr);
otbMsgDebugMacro(<< "L'index correspondant a ce point est:" << std::endl
<< indexTmpTr[0] << ","<< indexTmpTr[1] );
if (indexTmpTr[0]>maxX)
maxX = indexTmpTr[0];
else if (indexTmpTr[0]<minX)
if (indexTmpTr[0]<minX)
minX = indexTmpTr[0];
if (indexTmpTr[1]>maxY)
maxY = indexTmpTr[1];
else if (indexTmpTr[1]<minY)
if (indexTmpTr[1]<minY)
minY = indexTmpTr[1];
otbDebugMacro(<< "indexTr : (" << indexTmpTr[0] << "," << indexTmpTr[1] << ")");
//otbGenericMsgDebugMacro(<< "indexTr : (" << indexTmpTr[0] << "," << indexTmpTr[1] << ")");
}
otbDebugMacro(<< "MinX : " << minX << " MinY : " << minY << " MaxX : " << maxX << " MaxY " << maxY);
otbMsgDebugMacro(<< "MinX : " << minX << " MinY : " << minY << " MaxX : " << maxX << " MaxY " << maxY);
// Create region needed in previous filter in the pipeline, which is the bounding box of previous transformed points
InputImageRegionType region;
......@@ -132,7 +140,7 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
size[0] = static_cast<long unsigned int>(maxX - minX);
size[1] = static_cast<long unsigned int>(maxY - minY);
otbDebugMacro(<< "Index : (" << index[0] << "," << index[1] << ") Size : (" << size[0] << "," << size[1] << ")");
otbMsgDebugMacro(<< "Index : (" << index[0] << "," << index[1] << ") Size : (" << size[0] << "," << size[1] << ")");
region.SetSize(size);
region.SetIndex(index);
......@@ -146,13 +154,13 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
neededRadius = m_InterpolatorNeighborhoodRadius;
}
otbDebugMacro(<< "Interpolation needed radius : " << neededRadius);
region.PadByRadius(neededRadius);
otbMsgDebugMacro(<< "Interpolation needed radius : " << neededRadius);
region.PadByRadius(neededRadius+m_AddedRadius);
otbDebugMacro(<< "Initial Region : Index(" << inputImage->GetLargestPossibleRegion().GetIndex()[0] << "," << inputImage->GetLargestPossibleRegion().GetIndex()[1] << ") Size(" << inputImage->GetLargestPossibleRegion().GetSize()[0] << "," << inputImage->GetLargestPossibleRegion().GetSize()[1] << ")");
otbMsgDebugMacro(<< "Initial Region : Index(" << inputImage->GetLargestPossibleRegion().GetIndex()[0] << "," << inputImage->GetLargestPossibleRegion().GetIndex()[1] << ") Size(" << inputImage->GetLargestPossibleRegion().GetSize()[0] << "," << inputImage->GetLargestPossibleRegion().GetSize()[1] << ")");
// To be sure that requested region in pipeline is not largest than real input image
otbDebugMacro(<< "Final Region (Before Crop) : Index(" << region.GetIndex()[0] << "," << region.GetIndex()[1] << ") Size(" << region.GetSize()[0] << "," << region.GetSize()[1] << ")");
otbMsgDebugMacro(<< "Final Region (Before Crop) : Index(" << region.GetIndex()[0] << "," << region.GetIndex()[1] << ") Size(" << region.GetSize()[0] << "," << region.GetSize()[1] << ")");
// If requested region is not contained in input image, then result region is null
if (!region.Crop(inputImage->GetLargestPossibleRegion()))
......@@ -167,7 +175,7 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
inputImage->SetRequestedRegion(region);
otbDebugMacro(<< "Final Region (After Crop) : Index(" << region.GetIndex()[0] << "," << region.GetIndex()[1] << ") Size(" << region.GetSize()[0] << "," << region.GetSize()[1] << ")");
otbMsgDebugMacro(<< "Final Region (After Crop) : Index(" << region.GetIndex()[0] << "," << region.GetIndex()[1] << ") Size(" << region.GetSize()[0] << "," << region.GetSize()[1] << ")");
}
}
......
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbDEMReader_cxx
#define __otbDEMReader_cxx
#include "otbDEMReader.h"
#include "otbMacro.h"
namespace otb
{
DEMReader
::DEMReader()
{
m_ElevManager=ossimElevManager::instance();
}
DEMReader
::~DEMReader()
{
// not needed, m_ElevManager created with instance() method
// delete m_ElevManager;
}
bool
DEMReader
::OpenDEMDirectory(const char* DEMDirectory)
{
ossimFilename ossimDEMDir;
ossimDEMDir=ossimFilename(DEMDirectory);
bool result= false;
if (m_ElevManager->openDirectory(ossimDEMDir))
{
result= true;
}
return result;
}
double
DEMReader
::GetHeightAboveMSL(const PointType& geoPoint)
{
float height;
ossimGpt ossimWorldPoint;
ossimWorldPoint.lat=geoPoint[0];
ossimWorldPoint.lon=geoPoint[1];
height=m_ElevManager->getHeightAboveMSL(ossimWorldPoint);
return height;
}
void
DEMReader
::PrintSelf(std::ostream& os, Indent indent) const
{
Superclass::PrintSelf(os,indent);
os << indent << "DEMReader" << std::endl;
}
} // namespace otb
#endif
......@@ -39,77 +39,43 @@ namespace otb
* \ingroup Images
*
*/
template <class TDEMImage>
class ITK_EXPORT DEMReader:
public itk::ImageSource<Image<typename TDEMImage::PixelType,2, 0> >
class ITK_EXPORT DEMReader: public itk::Object
{
public :
/** Standard class typedefs. */
typedef itk::Indent Indent;
typedef TDEMImage DEMImageType;
typedef typename DEMImageType::Pointer DEMImagePointerType;
typedef typename DEMImageType::PixelType PixelType;
typedef DEMReader Self;
typedef itk::ImageSource<Image<typename DEMImageType::PixelType,2, 0> > Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
typedef Image<PixelType,2> OutputImageType;
typedef typename Superclass::Pointer OutputImagePointer;
typedef typename OutputImageType::SpacingType SpacingType;
typedef typename OutputImageType::SizeType SizeType;
typedef typename OutputImageType::PointType PointType;
typedef typename OutputImageType::IndexType IndexType;
typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
typedef itk::ImageRegionIteratorWithIndex< Image<PixelType,2, 0> > ImageIteratorType;
typedef DEMReader Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
typedef itk::Point<double, 2> PointType;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(DEMReader,ImageSource);
itkTypeMacro(DEMReader,Object);
/** Set the spacing. */
itkSetMacro(Spacing,SpacingType);
itkGetConstReferenceMacro(Spacing,SpacingType);
/** Set the Upper Left coordinates. */
itkSetMacro(Ul,PointType);
itkGetConstReferenceMacro(Ul,PointType);
/** Set the Lower Right coordinates. */
itkSetMacro(Lr,PointType);
itkGetConstReferenceMacro(Lr,PointType);
/** Set the spacing. */
void SetSpacing(const double* spacing);
/** Try to open the DEM directory. */
bool OpenDEMDirectory(char* &DEMDirectory);
bool OpenDEMDirectory(const char* DEMDirectory);
/** Compute the height above MSL(Mean Sea Level) of the point. */
virtual double GetHeightAboveMSL(const PointType& worldPoint);
/** Compute the height above MSL(Mean Sea Level) of a geographic point. */
virtual double GetHeightAboveMSL(const PointType& geoPoint);
protected:
DEMReader();
~DEMReader();
void PrintSelf(std::ostream& os, Indent indent) const;
void GenerateData();
virtual void GenerateOutputInformation();
ossimElevManager* m_ElevManager;
//DEMImagePointerType m_DEMImage;
SpacingType m_Spacing;
PointType m_Ul;
PointType m_Lr;
};
} // namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbDEMReader.txx"
#endif
#endif
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbDEMReader_txx
#define __otbDEMReader_txx
#include "otbDEMReader.h"
#include "otbMacro.h"
namespace otb
{
template<class TDEMImage> DEMReader<TDEMImage>::DEMReader()
{
m_ElevManager=ossimElevManager::instance();
//m_DEMImage = DEMImageType::New();
m_Spacing[0]=0;
m_Spacing[1]=0;
m_Ul[0]=0;
m_Ul[1]=0;
m_Lr[0]=0;
m_Lr[1]=0;
}
template<class TDEMImage>
DEMReader<TDEMImage>::~DEMReader()
{
delete m_ElevManager;
}
///Methode pour specifier un dossier contenant des DEM
template<class TDEMImage> bool DEMReader<TDEMImage>::OpenDEMDirectory(char* &DEMDirectory)
{
ossimFilename ossimDEMDir;
ossimDEMDir=ossimFilename(DEMDirectory);
bool result= false;
if (m_ElevManager->openDirectory(ossimDEMDir))
{
result= true;
}
return result;
}
///Methode pour calculer l'altitude d'un point geographique
template<class TDEMImage> double DEMReader<TDEMImage>::GetHeightAboveMSL(const PointType& worldPoint)
{
float height;
ossimGpt ossimWorldPoint;
ossimWorldPoint.lat=worldPoint[0];
ossimWorldPoint.lon=worldPoint[1];
height=m_ElevManager->getHeightAboveMSL(ossimWorldPoint);
return height;
}
///Methode SetSpacing
template<class TDEMImage> void DEMReader<TDEMImage>::SetSpacing( const double* spacing)
{
SpacingType s(spacing);
this->SetSpacing(s);
}
///Methode GenerateOutputInformation
template <class TDEMImage> void DEMReader<TDEMImage>::GenerateOutputInformation()
{
DEMImageType *output;
IndexType start;
start[0]=0;
start[1]=0;
PointType origin;
origin[0]=m_Ul[0]; //latitude de l'origine.
origin[1]=m_Ul[1]; //longitude de l'origine.
output = this->GetOutput(0);
// Calcul de la taille de l'image:
SizeType size;
size[0]=int (abs(((m_Lr[0]-m_Ul[0])/m_Spacing[0]))+1.5);
size[1]=int (abs(((m_Lr[1]-m_Ul[1])/m_Spacing[1]))+1.5);
// On specifie les parametres de la region
OutputImageRegionType largestPossibleRegion;
largestPossibleRegion.SetSize( size );
largestPossibleRegion.SetIndex( start );
output->SetLargestPossibleRegion( largestPossibleRegion );
output->SetSpacing(m_Spacing);
output->SetOrigin(m_Ul);
}
///Methode GenerateData
template <class TDEMImage> void DEMReader<TDEMImage>::GenerateData()
{
DEMImagePointerType m_DEMImage = this->GetOutput();
// allocate the output buffer
m_DEMImage->SetBufferedRegion( m_DEMImage->GetRequestedRegion() );
m_DEMImage->Allocate();
// Create an iterator that will walk the output region
ImageIteratorType outIt = ImageIteratorType(m_DEMImage,m_DEMImage->GetRequestedRegion());
// Walk the output image, evaluating the height at each pixel
IndexType currentindex;
PointType phyPoint;
double height;
for (outIt.GoToBegin(); !outIt.IsAtEnd(); ++outIt)
{
currentindex=outIt.GetIndex();
m_DEMImage->TransformIndexToPhysicalPoint(currentindex, phyPoint);
ossimGpt ossimWorldPoint;
ossimWorldPoint.lat=phyPoint[0];
ossimWorldPoint.lon=phyPoint[1];
height=m_ElevManager->getHeightAboveMSL(ossimWorldPoint); //Calcul de l'altitude
otbMsgDebugMacro(<<" HeightAboveMSL: "<<height);
if (height>-static_cast<double>(32768)) //On teste si les fichiers MNT recouvre la zone g�ographique demand�e (-32768 = theNullHeightValue)
{
m_DEMImage->SetPixel(currentindex, static_cast<PixelType>(height) );
} //On remplit l'image
else
{
m_DEMImage->SetPixel(currentindex, static_cast<PixelType>(0) );
}
}
}
template <class TDEMImage> void DEMReader<TDEMImage>::PrintSelf(std::ostream& os, Indent indent) const
{
Superclass::PrintSelf(os,indent);
os << indent << "Spacing:"<< m_Spacing[0] << ","<< m_Spacing[1] << std::endl;
os << indent << "Lr:"<< m_Lr[0] << ","<< m_Lr[1] << std::endl;
os << indent << "Ul:"<< m_Ul[0] << ","<< m_Ul[1] << std::endl;
}
} // namespace otb
#endif
......@@ -593,8 +593,8 @@ void GDALImageIO::InternalReadImageInformation()
}
m_Origin[0] = minGCPX;
m_Origin[1] = minGCPY;
m_Origin[0] = minGCPX;
m_Origin[1] = minGCPY;
}
......@@ -996,27 +996,41 @@ void GDALImageIO::InternalWriteImageInformation()
/* 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);
}
unsigned int gcpCount = ImageBase::GetGCPCount(dico);
GDAL_GCP * gdalGcps = new GDAL_GCP[gcpCount+1];
bool gcpHasOrigin = false;
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);
gcpHasOrigin = ImageBase::GetGCPCol(dico,gcpIndex)==0 && ImageBase::GetGCPRow(dico,gcpIndex)==0;
}
gdalGcps[gcpCount].pszId = "Origin";
gdalGcps[gcpCount].pszInfo = "Origin gcp added by OTB";
gdalGcps[gcpCount].dfGCPPixel = 0;
gdalGcps[gcpCount].dfGCPLine = 0;
gdalGcps[gcpCount].dfGCPX = m_Origin[0];
gdalGcps[gcpCount].dfGCPY = m_Origin[1];
gdalGcps[gcpCount].dfGCPZ = 0;
if(gcpHasOrigin)
{
m_poDataset->SetGCPs(gcpCount,gdalGcps,ImageBase::GetGCPProjection(dico).c_str());
delete [] gdalGcps;
}
else
{
std::cout<<"GCPs do not contain origin."<<std::endl;
m_poDataset->SetGCPs(gcpCount+1,gdalGcps,ImageBase::GetGCPProjection(dico).c_str());
}
delete [] gdalGcps;
/* -------------------------------------------------------------------- */
/* Set the six coefficients of affine geoTtransform */
......
......@@ -467,6 +467,8 @@ StreamingImageFileWriter<TInputImage>
* Loop over the number of pieces, execute the upstream pipeline on each
* piece, and copy the results into the output image.
*/
otbGenericMsgDebugMacro(<< "Number Of Stream Divisions : " << numDivisionsFromSplitter);
unsigned int piece;
for (piece = 0;
piece < numDivisionsFromSplitter && !this->GetAbortGenerateData();
......
......@@ -62,20 +62,24 @@ public :
typedef typename TSecondTransform::Pointer SecondTransformPointerType;
/** Standard vector type for this class. */
typedef typename Superclass::InputVectorType InputVectorType;
typedef typename Superclass::OutputVectorType OutputVectorType;
// typedef typename TFirstTransform::InputVectorType FirstTransformInputVectorType;
// typedef typename TFirstTransform::OutputVectorType FirstTransformOutputVectorType;
/** Standard covariant vector type for this class */
typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
// typedef typename TFirstTransform::InputCovariantVectorType FirstTransformInputCovariantVectorType;
// typedef typename TFirstTransform::OutputCovariantVectorType FirstTransformOutputCovariantVectorType;
/** Standard vnl_vector type for this class. */
typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
// typedef typename TFirstTransform::InputVnlVectorType FirstTransformInputVnlVectorType;
// typedef typename TFirstTransform::OutputVnlVectorType FirstTransformOutputVnlVectorType;
/** Standard coordinate point type for this class */
typedef typename Superclass::InputPointType InputPointType;
typedef typename Superclass::OutputPointType OutputPointType;
typedef typename Superclass::InputPointType FirstTransformInputPointType;
typedef typename TFirstTransform::OutputPointType FirstTransformOutputPointType;
/** TSecondTransform::InputPointType is purposely not defined
* It contrains user to choose First Transform Output compatible
* with Second Transform Input */
typedef typename Superclass::OutputPointType SecondTransformOutputPointType;
/** Method for creation through the object factory. */
itkNewMacro( Self );
......@@ -96,22 +100,16 @@ public :
/** Method to transform a point. */
virtual OutputPointType TransformPoint(const InputPointType & ) const;
virtual SecondTransformOutputPointType TransformPoint(const FirstTransformInputPointType & ) const;
/** Method to transform a vector. */
virtual OutputVectorType TransformVector(const InputVectorType &) const;
// virtual OutputVectorType TransformVector(const InputVectorType &) const;
/** Method to transform a vnl_vector. */
virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const;
// virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const;
/** Method to transform a CovariantVector. */
virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const;
/** Compute MapProjection1 coordinates to MapProjection2 coordinates. */
OutputPointType ComputeProjection1ToProjection2(const InputPointType &point1);
/** Compute MapProjection1 coordinates to MapProjection2 coordinates. */
InputPointType ComputeProjection2ToProjection1(const OutputPointType &point2);
// virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const;
protected:
CompositeTransform();
......