22 #ifndef otbStreamingMatrixTransposeMatrixImageFilter_h
23 #define otbStreamingMatrixTransposeMatrixImageFilter_h
26 #include "itkSimpleDataObjectDecorator.h"
28 #include "itkVariableSizeMatrix.h"
29 #include "itkVariableLengthVector.h"
54 template <
class TInputImage,
class TInputImage2>
75 typedef typename TInputImage::SizeType
SizeType;
84 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
86 itkSetMacro(UsePadFirstInput,
bool);
87 itkGetMacro(UsePadFirstInput,
bool);
88 itkSetMacro(UsePadSecondInput,
bool);
89 itkGetMacro(UsePadSecondInput,
bool);
92 itkStaticConstMacro(ImageDimension,
unsigned int, TInputImage::ImageDimension);
105 typedef typename itk::VariableSizeMatrix<RealType>
MatrixType;
116 return this->GetResultOutput()->Get();
118 MatrixObjectType* GetResultOutput();
119 const MatrixObjectType* GetResultOutput()
const;
125 DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
override;
126 using Superclass::MakeOutput;
131 void AllocateOutputs()
override;
132 void GenerateOutputInformation()
override;
134 void GenerateInputRequestedRegion()
override;
135 void Reset(
void)
override;
136 void Synthetize(
void)
override;
142 this->SetInput(0, input1);
146 this->SetInput(1, input2);
152 if (this->GetNumberOfInputs() < 1)
157 return (
static_cast<const TInputImage*
>(this->itk::ProcessObject::GetInput(0)));
162 if (this->GetNumberOfInputs() < 2)
167 return (
static_cast<const TInputImage2*
>(this->itk::ProcessObject::GetInput(1)));
175 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
177 void ThreadedGenerateData(
const RegionType& outputRegionForThread, itk::ThreadIdType threadId)
override;
215 template <
class TInputImage1,
class TInputImage2>
242 this->GetFilter()->SetFirstInput(input1);
246 this->GetFilter()->SetSecondInput(input2);
250 this->GetFilter()->SetUsePadFirstInput(pad);
254 this->GetFilter()->SetUsePadSecondInput(pad);
258 return this->GetFilter()->GetUsePadFirstInput();
262 return this->GetFilter()->GetUsePadSecondInput();
268 return this->GetResultOutput()->Get();
272 return this->GetFilter()->GetResultOutput();
276 return this->GetFilter()->GetResultOutput();
296 #ifndef OTB_MANUAL_INSTANTIATION
This filter link a persistent filter with a StreamingImageVirtualWriter.
This filter is the base class for all filter persisting data through multiple update....
itk::SimpleDataObjectDecorator< MatrixType > MatrixObjectType
~PersistentMatrixTransposeMatrixImageFilter() override
itk::VariableSizeMatrix< RealType > MatrixType
TInputImage::RegionType RegionType
void SetFirstInput(const TInputImage *input1)
ArrayMatrixType m_ThreadSum
itk::SmartPointer< const Self > ConstPointer
std::vector< MatrixType > ArrayMatrixType
unsigned int m_NumberOfComponents1
const TInputImage2 * GetSecondInput()
TInputImage::PixelType PixelType
unsigned int m_NumberOfComponents2
TInputImage::IndexType IndexType
itk::VariableLengthVector< RealType > RealPixelType
itk::SmartPointer< Self > Pointer
MatrixType GetResult() const
std::vector< PixelType > ArrayPixelType
itk::Array< long > ArrayLongPixelType
TInputImage2::IndexType IndexType2
TInputImage::InternalPixelType InternalPixelType
TInputImage::SizeType SizeType
TInputImage2::InternalPixelType InternalPixelType2
PersistentMatrixTransposeMatrixImageFilter(const Self &)=delete
const TInputImage * GetFirstInput()
void operator=(const Self &)=delete
itk::SimpleDataObjectDecorator< RealPixelType > RealPixelObjectType
TInputImage::Pointer InputImagePointer
itk::DataObject::Pointer DataObjectPointer
itk::SimpleDataObjectDecorator< PixelType > PixelObjectType
std::vector< RealPixelType > ArrayRealPixelType
void SetSecondInput(const TInputImage2 *input2)
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
PersistentImageFilter< TInputImage, TInputImage > Superclass
TInputImage2::PixelType PixelType2
PersistentMatrixTransposeMatrixImageFilter Self
This class streams the whole input image through the PersistentMatrixTransposeMatrixImageFilter.
void SetUsePadFirstInput(bool pad)
void operator=(const Self &)=delete
bool GetUsePadSecondInput(void)
MatrixType GetResult(void) const
itk::SmartPointer< Self > Pointer
StreamingMatrixTransposeMatrixImageFilter()
void SetFirstInput(InputImage1Type *input1)
StreamingMatrixTransposeMatrixImageFilter(const Self &)=delete
bool GetUsePadFirstInput(void)
StreamingMatrixTransposeMatrixImageFilter Self
Superclass::FilterType MatrixToTransposeMatrixFilterType
itk::SmartPointer< const Self > ConstPointer
void SetSecondInput(InputImage2Type *input2)
MatrixToTransposeMatrixFilterType::MatrixType MatrixType
~StreamingMatrixTransposeMatrixImageFilter() override
itk::SimpleDataObjectDecorator< MatrixType > MatrixObjectType
void SetUsePadSecondInput(bool pad)
TInputImage2 InputImage2Type
TInputImage1 InputImage1Type
MatrixObjectType * GetResultOutput(void)
const MatrixObjectType * GetResultOutput() const
PersistentFilterStreamingDecorator< PersistentMatrixTransposeMatrixImageFilter< TInputImage1, TInputImage2 > > Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.