21 #ifndef otbImportGeoInformationImageFilter_hxx
22 #define otbImportGeoInformationImageFilter_hxx
25 #include "itkMetaDataObject.h"
33 template <
class TImage,
class TSourceImage>
37 this->SetNumberOfRequiredInputs(2);
41 template <
class TImage,
class TSourceImage>
44 this->SetNthInput(1,
const_cast<TSourceImage*
>(source));
46 template <
class TImage,
class TSourceImage>
49 return static_cast<const TSourceImage*
>(this->itk::ProcessObject::GetInput(1));
52 template <
class TImage,
class TSourceImage>
55 Superclass::GenerateInputRequestedRegion();
57 typename SourceImageType::RegionType region;
58 typename SourceImageType::SizeType size;
59 typename SourceImageType::IndexType index;
64 region.SetIndex(index);
66 SourceImageType* sourcePtr =
const_cast<SourceImageType*
>(this->GetSource());
67 sourcePtr->SetRequestedRegion(region);
70 template <
class TImage,
class TSourceImage>
73 Superclass::GenerateOutputInformation();
75 ImagePointerType outputPtr = this->GetOutput();
76 SourceImageType* sourcePtr =
const_cast<SourceImageType*
>(this->GetSource());
78 outputPtr->CopyInformation(sourcePtr);
80 outputPtr->SetLargestPossibleRegion(this->GetInput()->GetLargestPossibleRegion());
82 outputPtr->SetNumberOfComponentsPerPixel(this->GetInput()->GetNumberOfComponentsPerPixel());