22 #ifndef otbStreamingCompareImageFilter_h
23 #define otbStreamingCompareImageFilter_h
26 #include "itkNumericTraits.h"
28 #include "itkSimpleDataObjectDecorator.h"
50 template <
class TInputImage>
71 typedef typename TInputImage::SizeType
SizeType;
76 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
79 itkStaticConstMacro(ImageDimension,
unsigned int, TInputImage::ImageDimension);
82 typedef typename itk::NumericTraits<PixelType>::RealType
RealType;
92 const TInputImage* GetInput1();
93 const TInputImage* GetInput2();
97 void SetInput1(
const TInputImage* image);
100 void SetInput2(
const TInputImage* image);
105 return this->GetPSNROutput()->Get();
107 RealObjectType* GetPSNROutput();
108 const RealObjectType* GetPSNROutput()
const;
114 return this->GetMSEOutput()->Get();
116 RealObjectType* GetMSEOutput();
117 const RealObjectType* GetMSEOutput()
const;
123 return this->GetMAEOutput()->Get();
125 RealObjectType* GetMAEOutput();
126 const RealObjectType* GetMAEOutput()
const;
132 return this->GetDiffCountOutput()->Get();
134 RealObjectType* GetDiffCountOutput();
135 const RealObjectType* GetDiffCountOutput()
const;
138 itkGetMacro(PhysicalSpaceCheck,
bool);
139 itkSetMacro(PhysicalSpaceCheck,
bool);
144 using Superclass::MakeOutput;
149 void AllocateOutputs()
override;
150 void GenerateOutputInformation()
override;
151 void Synthetize(
void)
override;
152 void Reset(
void)
override;
160 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
163 void ThreadedGenerateData(
const RegionType& outputRegionForThread, itk::ThreadIdType threadId)
override;
168 void VerifyInputInformation()
const override;
214 template <
class TInputImage>
242 this->GetFilter()->SetInput1(input);
248 this->GetFilter()->SetInput2(input);
254 return this->GetFilter()->GetPSNROutput()->Get();
258 return this->GetFilter()->GetPSNROutput();
262 return this->GetFilter()->GetPSNROutput();
269 return this->GetMSEOutput()->Get();
273 return this->GetFilter()->GetMSEOutput();
277 return this->GetFilter()->GetMSEOutput();
284 return this->GetFilter()->GetMAEOutput()->Get();
288 return this->GetFilter()->GetMAEOutput();
292 return this->GetFilter()->GetMAEOutput();
299 return this->GetFilter()->GetDiffCountOutput()->Get();
303 return this->GetFilter()->GetDiffCountOutput();
307 return this->GetFilter()->GetDiffCountOutput();
314 this->GetFilter()->SetPhysicalSpaceCheck(flag);
320 return this->GetFilter()->GetPhysicalSpaceCheck();
339 #ifndef OTB_MANUAL_INSTANTIATION
Compute mean squared error, mean absolute error and PSNR of two imagee using the output requested reg...
itk::Array< RealType > m_SquareOfDifferences
itk::Array< long > m_Count
itk::SmartPointer< const Self > ConstPointer
~PersistentCompareImageFilter() override
void operator=(const Self &)=delete
itk::SimpleDataObjectDecorator< PixelType > PixelObjectType
PersistentImageFilter< TInputImage, TInputImage > Superclass
itk::Array< long > m_DiffCount
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
TInputImage::Pointer InputImagePointer
itk::NumericTraits< PixelType >::RealType RealType
RealType GetDiffCount() const
itk::Array< PixelType > m_ThreadMaxRef
TInputImage::RegionType RegionType
itk::SmartPointer< Self > Pointer
PersistentCompareImageFilter(const Self &)=delete
TInputImage::IndexType IndexType
itk::Array< RealType > m_AbsoluteValueOfDifferences
itk::SimpleDataObjectDecorator< RealType > RealObjectType
itk::DataObject::Pointer DataObjectPointer
TInputImage::PixelType PixelType
PersistentCompareImageFilter Self
bool m_PhysicalSpaceCheck
itk::Array< PixelType > m_ThreadMinRef
TInputImage::SizeType SizeType
This filter link a persistent filter with a StreamingImageVirtualWriter.
This filter is the base class for all filter persisting data through multiple update....
This class streams the whole input image through the PersistentCompareImageFilter.
void operator=(const Self &)=delete
PersistentFilterStreamingDecorator< PersistentCompareImageFilter< TInputImage > > Superclass
RealObjectType * GetDiffCountOutput()
StreamingCompareImageFilter(const Self &)=delete
void SetInput1(InputImageType *input)
void SetInput2(InputImageType *input)
~StreamingCompareImageFilter() override
const RealObjectType * GetMAEOutput() const
itk::SimpleDataObjectDecorator< RealType > RealObjectType
void SetPhysicalSpaceCheck(bool flag)
RealObjectType * GetMSEOutput()
StreamingCompareImageFilter Self
const RealObjectType * GetPSNROutput() const
CompareFilterType::PixelType PixelType
itk::SimpleDataObjectDecorator< PixelType > PixelObjectType
itk::SmartPointer< Self > Pointer
TInputImage InputImageType
bool GetPhysicalSpaceCheck()
StreamingCompareImageFilter()
const RealObjectType * GetMSEOutput() const
const RealObjectType * GetDiffCountOutput() const
Superclass::FilterType CompareFilterType
CompareFilterType::RealType RealType
RealObjectType * GetPSNROutput()
itk::SmartPointer< const Self > ConstPointer
RealObjectType * GetMAEOutput()
RealType GetDiffCount() const
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.