Commit 2549defd authored by Julien Michel's avatar Julien Michel

Merge branch 'grid-resampling' into develop

parents 1f8e5995 8668075c
......@@ -19,6 +19,7 @@
#include "otbMultiToMonoChannelExtractROI.h"
#include "otbGenericRSResampleImageFilter.h"
#include "otbGridResampleImageFilter.h"
#include "otbImportGeoInformationImageFilter.h"
#include "otbBCOInterpolateImageFunction.h"
#include "otbSimpleRcsPanSharpeningFusionImageFilter.h"
......@@ -133,7 +134,7 @@ private:
typedef otb::BCOInterpolateImageFunction<FloatVectorImageType> InterpolatorType;
typedef otb::GenericRSResampleImageFilter<FloatVectorImageType, FloatVectorImageType> ResamplerType;
typedef otb::StreamingResampleImageFilter<FloatVectorImageType, FloatVectorImageType> BasicResamplerType;
typedef otb::GridResampleImageFilter<FloatVectorImageType, FloatVectorImageType> BasicResamplerType;
typedef otb::ImportGeoInformationImageFilter<FloatVectorImageType,InternalImageType> ImportGeoInformationFilterType;
typedef otb::SimpleRcsPanSharpeningFusionImageFilter<InternalImageType, FloatVectorImageType, FloatVectorImageType> FusionFilterType;
......@@ -204,13 +205,22 @@ private:
{
otbAppLogINFO("Using the PHR mode");
otb::PleiadesPToXSAffineTransformCalculator::TransformType::Pointer transform
= otb::PleiadesPToXSAffineTransformCalculator::Compute(panchro, xs);
otb::PleiadesPToXSAffineTransformCalculator::TransformType::OffsetType offset
= otb::PleiadesPToXSAffineTransformCalculator::ComputeOffset(GetParameterImage("inp"),
GetParameterImage("inxs"));
origin+=offset;
origin[0]=origin[0]/4;
origin[1]=origin[1]/4;
basicResampler->SetOutputOrigin(origin);
basicResampler->SetInput(xs);
basicResampler->SetTransform(transform);
basicResampler->SetOutputOrigin(origin);
basicResampler->SetOutputSpacing(spacing);
FloatVectorImageType::SpacingType xsSpacing = GetParameterImage("inxs")->GetSpacing();
xsSpacing*=0.25;
basicResampler->SetOutputSpacing(xsSpacing);
basicResampler->SetOutputSize(size);
basicResampler->SetOutputStartIndex(start);
basicResampler->SetEdgePaddingValue(defaultValue);
......
......@@ -25,11 +25,11 @@
#include "otbCompositeTransform.h"
#include "itkScalableAffineTransform.h"
#include "itkTranslationTransform.h"
#include "itkIdentityTransform.h"
#include "itkScaleTransform.h"
#include "itkCenteredRigid2DTransform.h"
#include "otbStreamingResampleImageFilter.h"
#include "otbGridResampleImageFilter.h"
namespace otb
{
......@@ -64,8 +64,7 @@ public:
typedef itk::TranslationTransform<double, FloatVectorImageType::ImageDimension> TransformType;
typedef otb::StreamingResampleImageFilter<FloatVectorImageType, FloatVectorImageType, double> ResampleFilterType;
typedef itk::IdentityTransform<double, FloatVectorImageType::ImageDimension> IdentityTransformType;
typedef otb::GridResampleImageFilter<FloatVectorImageType,FloatVectorImageType> GridResampleFilterType;
typedef itk::ScalableAffineTransform<double, FloatVectorImageType::ImageDimension> ScalableTransformType;
typedef ScalableTransformType::OutputVectorType OutputVectorType;
......@@ -182,7 +181,9 @@ private:
FloatVectorImageType* inputImage = GetParameterImage("in");
m_Resampler = ResampleFilterType::New();
m_GridResampler = GridResampleFilterType::New();
m_Resampler->SetInput(inputImage);
m_GridResampler->SetInput(inputImage);
// Get Interpolator
switch ( GetParameterInt("interpolator") )
......@@ -218,9 +219,7 @@ private:
{
case Transform_Identity:
{
IdentityTransformType::Pointer transform = IdentityTransformType::New();
m_Resampler->SetOutputParametersFromImage( inputImage );
m_GridResampler->SetOutputParametersFromImage( inputImage );
// Scale Transform
OutputVectorType scale;
scale[0] = 1.0 / GetParameterFloat("transform.type.id.scalex");
......@@ -232,23 +231,21 @@ private:
OutputSpacing[0] = spacing[0] * scale[0];
OutputSpacing[1] = spacing[1] * scale[1];
m_Resampler->SetOutputSpacing(OutputSpacing);
m_GridResampler->SetOutputSpacing(OutputSpacing);
FloatVectorImageType::PointType origin = inputImage->GetOrigin();
FloatVectorImageType::PointType outputOrigin;
outputOrigin[0] = origin[0] + 0.5 * spacing[0] * (scale[0] - 1.0);
outputOrigin[1] = origin[1] + 0.5 * spacing[1] * (scale[1] - 1.0);
m_Resampler->SetOutputOrigin(outputOrigin);
m_Resampler->SetTransform(transform);
m_GridResampler->SetOutputOrigin(outputOrigin);
// Evaluate size
ResampleFilterType::SizeType recomputedSize;
recomputedSize[0] = inputImage->GetLargestPossibleRegion().GetSize()[0] / scale[0];
recomputedSize[1] = inputImage->GetLargestPossibleRegion().GetSize()[1] / scale[1];
m_Resampler->SetOutputSize(recomputedSize);
m_GridResampler->SetOutputSize(recomputedSize);
otbAppLogINFO( << "Output image size : " << recomputedSize );
}
break;
......@@ -437,6 +434,8 @@ private:
}
ResampleFilterType::Pointer m_Resampler;
GridResampleFilterType::Pointer m_GridResampler;
}; //class
......
......@@ -18,6 +18,7 @@
#include "otbWrapperApplicationFactory.h"
#include "otbGenericRSResampleImageFilter.h"
#include "otbGridResampleImageFilter.h"
#include "otbImportGeoInformationImageFilter.h"
#include "otbBCOInterpolateImageFunction.h"
......@@ -72,7 +73,7 @@ public:
typedef itk::ScalableAffineTransform<double, 2> TransformType;
typedef otb::StreamingResampleImageFilter
typedef otb::GridResampleImageFilter
<FloatVectorImageType,
FloatVectorImageType> BasicResamplerType;
......@@ -251,19 +252,23 @@ private:
{
otbAppLogINFO("Using the PHR mode");
otb::PleiadesPToXSAffineTransformCalculator::TransformType::Pointer transform
= otb::PleiadesPToXSAffineTransformCalculator::Compute(GetParameterImage("inr"),
GetParameterImage("inm"));
m_BasicResampler->SetTransform(transform);
otb::PleiadesPToXSAffineTransformCalculator::TransformType::OffsetType offset
= otb::PleiadesPToXSAffineTransformCalculator::ComputeOffset(GetParameterImage("inr"),
GetParameterImage("inm"));
m_BasicResampler->SetInput(movingImage);
origin+=offset;
origin[0]=origin[0]/4;
origin[1]=origin[1]/4;
m_BasicResampler->SetOutputOrigin(origin);
m_BasicResampler->SetOutputSpacing(spacing);
m_BasicResampler->SetOutputSize(size);
m_BasicResampler->SetOutputStartIndex(start);
FloatVectorImageType::SpacingType xsSpacing = GetParameterImage("inm")->GetSpacing();
xsSpacing*=0.25;
m_BasicResampler->SetOutputSpacing(xsSpacing);
m_BasicResampler->SetOutputSize(size);
m_Resampler->SetOutputStartIndex(start);
m_BasicResampler->SetEdgePaddingValue(defaultValue);
m_GeoImport->SetInput(m_BasicResampler->GetOutput());
......
/*=========================================================================
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 __otbGridResampleImageFilter_h
#define __otbGridResampleImageFilter_h
#include "itkImageToImageFilter.h"
#include "itkLinearInterpolateImageFunction.h"
#include "itkDefaultConvertPixelTraits.h"
#include "otbMacro.h"
namespace otb
{
/** \class GridResampleImageFilter
* \brief Resample input image on a new origin/spacing/size grid
*
* This filter resample the input image on a new grid defined by
* OutputOrigin, OutputSpacing and OutputSize, using the provided
* interpolator.
*
* This is equivalent to a itk::ResampleImageFilter using an
* itk::IdentityTransform, except that it is slightly more efficient
* and that in this simplified case it is possible to explicitely
* compute the input requested region. The GridResampleImageFilter
* therefore supports streaming, contrary to the
* itk::ResampleImageFilter.
*
* When grid position is outside of the input image domain, the
* default EdgePaddingValue is used.
*
* If CheckOutputBounds flag is set to true (default value), the
* interpolated value will be checked for output pixel type range
* prior to casting.
*
* \ingroup OTBImageManipulation
* \ingroup Streamed
* \ingroup Threaded
**/
template <typename TInputImage, typename TOutputImage,
typename TInterpolatorPrecision = double>
class ITK_EXPORT GridResampleImageFilter :
public itk::ImageToImageFilter<TInputImage, TOutputImage>
{
public:
/** Standard class typedefs. */
typedef GridResampleImageFilter Self;
typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(GridResampleImageFilter, itk::ImageToImageFilter);
/** Number of dimensions. */
itkStaticConstMacro(ImageDimension, unsigned int,
TOutputImage::ImageDimension);
itkStaticConstMacro(InputImageDimension, unsigned int,
TInputImage::ImageDimension);
/** Typedef parameters*/
typedef TInputImage InputImageType;
typedef TOutputImage OutputImageType;
typedef typename OutputImageType::RegionType OutputImageRegionType;
typedef typename TOutputImage::PixelType OutputPixelType;
typedef itk::DefaultConvertPixelTraits<OutputPixelType> OutputPixelConvertType;
typedef typename OutputPixelConvertType::ComponentType OutputPixelComponentType;
/** Interpolator type */
typedef itk::InterpolateImageFunction<InputImageType,
TInterpolatorPrecision> InterpolatorType;
typedef typename InterpolatorType::Pointer InterpolatorPointerType;
typedef itk::LinearInterpolateImageFunction<InputImageType,
TInterpolatorPrecision> DefaultInterpolatorType;
typedef typename InterpolatorType::OutputType InterpolatorOutputType;
typedef itk::DefaultConvertPixelTraits< InterpolatorOutputType > InterpolatorConvertType;
typedef typename InterpolatorConvertType::ComponentType InterpolatorComponentType;
/** Input pixel continuous index typdef */
typedef typename itk::ContinuousIndex<double,InputImageDimension > ContinuousInputIndexType;
/** ImageBase typedef */
typedef itk::ImageBase<OutputImageType::ImageDimension> ImageBaseType;
typedef typename ImageBaseType::SpacingType SpacingType;
typedef typename ImageBaseType::SizeType SizeType;
typedef typename ImageBaseType::PointType PointType;
typedef typename ImageBaseType::IndexType IndexType;
itkSetMacro(OutputStartIndex,IndexType);
itkGetConstReferenceMacro(OutputStartIndex,IndexType);
itkSetMacro(OutputSize,SizeType);
itkGetConstReferenceMacro(OutputSize,SizeType);
itkSetMacro(OutputOrigin,PointType);
itkGetConstReferenceMacro(OutputOrigin,PointType);
itkSetMacro(OutputSpacing,SpacingType);
itkGetConstReferenceMacro(OutputSpacing,SpacingType);
itkSetMacro(EdgePaddingValue,OutputPixelType);
itkGetConstReferenceMacro(EdgePaddingValue,OutputPixelType);
itkSetMacro(CheckOutputBounds,bool);
itkGetMacro(CheckOutputBounds,bool);
itkBooleanMacro(CheckOutputBounds);
itkSetObjectMacro(Interpolator,InterpolatorType);
itkGetObjectMacro(Interpolator,InterpolatorType);
/** Import output parameters from a given image */
void SetOutputParametersFromImage(const ImageBaseType * image);
/** Method Compute the Modified Time based on changed to the components. */
itk::ModifiedTimeType GetMTime(void) const;
protected:
GridResampleImageFilter();
/** Destructor */
virtual ~GridResampleImageFilter() {};
virtual void GenerateOutputInformation();
virtual void GenerateInputRequestedRegion();
virtual void BeforeThreadedGenerateData();
virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId);
virtual void AfterThreadedGenerateData();
inline void CastPixelWithBoundsChecking( const InterpolatorOutputType& value,
const InterpolatorComponentType& minComponent,
const InterpolatorComponentType& maxComponent,
OutputPixelType& outputValue ) const
{
// Method imported from itk::ResampleImageFilter
const unsigned int nComponents = InterpolatorConvertType::GetNumberOfComponents(value);
itk::NumericTraits<OutputPixelType>::SetLength( outputValue, nComponents );
for (unsigned int n=0; n<nComponents; n++)
{
InterpolatorComponentType component = InterpolatorConvertType::GetNthComponent( n, value );
if ( m_CheckOutputBounds && component < minComponent )
{
OutputPixelConvertType::SetNthComponent( n, outputValue, static_cast<OutputPixelComponentType>( minComponent ) );
}
else if ( m_CheckOutputBounds && component > maxComponent )
{
OutputPixelConvertType::SetNthComponent( n, outputValue, static_cast<OutputPixelComponentType>( maxComponent ) );
}
else
{
OutputPixelConvertType::SetNthComponent(n, outputValue,
static_cast<OutputPixelComponentType>( component ) );
}
}
}
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
GridResampleImageFilter(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
IndexType m_OutputStartIndex; // output image start index
SizeType m_OutputSize; // output image size
PointType m_OutputOrigin; // output image origin
SpacingType m_OutputSpacing; // output image spacing
OutputPixelType m_EdgePaddingValue; // Default pixel value
bool m_CheckOutputBounds; // Shall we check
// output bounds when
// casting?
InterpolatorPointerType m_Interpolator; // Interpolator used
// for resampling
OutputImageRegionType m_ReachableOutputRegion; // Internal
// variable for
// speed-up. Computed
// in BeforeThreadedGenerateData
};
} // namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbGridResampleImageFilter.txx"
#endif
#endif
......@@ -76,6 +76,7 @@ otbTwoNRIBandsImageToNComplexBandsImage.cxx
otbChangeNoDataValueFilter.cxx
otbImageToNoDataMaskFilter.cxx
otbChangeInformationImageFilter.cxx
otbGridResampleImageFilter.cxx
otbMaskedIteratorDecorator.cxx
)
......@@ -718,6 +719,8 @@ otb_add_test(NAME bfTvChangeInformationImageFilter COMMAND otbImageManipulation
${INPUTDATA}/WV2_PAN_ROI_1000_100.tif
)
otb_add_test(NAME otbGridResampleImageFilter
COMMAND otbImageManipulationTestDriver otbGridResampleImageFilter)
otb_add_test(NAME bfTuMaskedIteratorDecoratorNew COMMAND otbImageManipulationTestDriver
otbMaskedIteratorDecoratorNew
)
......
/*=========================================================================
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.
=========================================================================*/
#include "otbImage.h"
#include "otbVectorImage.h"
#include "otbGridResampleImageFilter.h"
#include "itkResampleImageFilter.h"
#include "itkGaussianImageSource.h"
#include "itkMersenneTwisterRandomVariateGenerator.h"
#include "itkIdentityTransform.h"
#include "otbDifferenceImageFilter.h"
#include "itkStreamingImageFilter.h"
#include "otbImageFileWriter.h"
int otbGridResampleImageFilter(int itkNotUsed(argc), char * itkNotUsed(argv)[])
{
// This test is only to check that filter builds with VectorImage
// too
typedef otb::VectorImage<double> VectorImageType;
typedef otb::GridResampleImageFilter<VectorImageType,VectorImageType> VectorFilterType;
VectorFilterType::Pointer vectorFilter = VectorFilterType::New();
typedef otb::Image<double> ImageType;
typedef otb::GridResampleImageFilter<ImageType,ImageType> FilterType;
FilterType::Pointer filter = FilterType::New();
typedef itk::ResampleImageFilter<ImageType,ImageType> RefFilterType;
RefFilterType::Pointer refFilter = RefFilterType::New();
// We will resample a random image with GridResampleImageFilter and
// ResampleImageFilter, and check that outputs are the same
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType;
RandomGeneratorType::Pointer randomGenerator = RandomGeneratorType::GetInstance();
ImageType::SizeType size;
size.Fill(1000);
ImageType::RegionType region;
region.SetSize(size);
ImageType::Pointer randomImage = ImageType::New();
randomImage->SetRegions(region);
randomImage->Allocate();
typedef itk::ImageRegionIterator<ImageType> IteratorType;
IteratorType iter(randomImage,region);
for (iter.GoToBegin() ; !iter.IsAtEnd() ; ++iter)
{
iter.Set(randomGenerator->GetUniformVariate(0.0, 1.0) * 1000);
}
filter->SetInput(randomImage);
refFilter->SetInput(randomImage);
typedef itk::IdentityTransform<double,2> IdentityTransformType;
IdentityTransformType::Pointer idTransform = IdentityTransformType::New();
refFilter->SetTransform(idTransform);
ImageType::SpacingType spacing;
spacing[0]=0.12;
spacing[1]=-0.19;
ImageType::PointType origin;
origin[0]=11;
origin[1]=17;
ImageType::SizeType outSize;
outSize.Fill(103);
filter->SetOutputSize(outSize);
filter->SetOutputOrigin(origin);
filter->SetOutputSpacing(spacing);
refFilter->SetSize(outSize);
refFilter->SetOutputOrigin(origin);
refFilter->SetOutputSpacing(spacing);
typedef otb::DifferenceImageFilter<ImageType,ImageType> ComparisonFilterType;
typedef itk::StreamingImageFilter<ImageType,ImageType> StreamingFilterType;
StreamingFilterType::Pointer streamingRef = StreamingFilterType::New();
streamingRef->SetInput(refFilter->GetOutput());
streamingRef->SetNumberOfStreamDivisions(10);
StreamingFilterType::Pointer streaming = StreamingFilterType::New();
streaming->SetInput(filter->GetOutput());
streaming->SetNumberOfStreamDivisions(10);
ComparisonFilterType::Pointer comparisonFilter = ComparisonFilterType::New();
comparisonFilter->SetValidInput(streamingRef->GetOutput());
comparisonFilter->SetTestInput(streaming->GetOutput());
comparisonFilter->SetDifferenceThreshold(1e-9);
comparisonFilter->Update();
unsigned int nbPixelsWithDiff = comparisonFilter->GetNumberOfPixelsWithDifferences();
std::cout<<"Number of pixels with differences: "<<nbPixelsWithDiff<<std::endl;
if(nbPixelsWithDiff)
{
std::cerr<<"Output of itk::GridResampleImageFilter does not match output of itk::ResampleImageFilter with same parameters"<<std::endl;
typedef otb::ImageFileWriter<ImageType> WriterType;
WriterType::Pointer writer = WriterType::New();
writer->SetInput(comparisonFilter->GetOutput());
writer->SetFileName("otbGridResampleImageFilterTestOutput.tif");
writer->Update();
writer = WriterType::New();
writer->SetInput(streamingRef->GetOutput());
writer->SetFileName("otbGridResampleImageFilterTestOutput1.tif");
writer->Update();
writer = WriterType::New();
writer->SetInput(streaming->GetOutput());
writer->SetFileName("otbGridResampleImageFilterTestOutput2.tif");
writer->Update();
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
......@@ -82,6 +82,7 @@ void RegisterTests()
REGISTER_TEST(otbChangeNoDataValueFilter);
REGISTER_TEST(otbImageToNoDataMaskFilter);
REGISTER_TEST(otbChangeInformationImageFilter);
REGISTER_TEST(otbGridResampleImageFilter);
REGISTER_TEST(otbMaskedIteratorDecoratorNew);
REGISTER_TEST(otbMaskedIteratorDecoratorNominal);
REGISTER_TEST(otbMaskedIteratorDecoratorDegenerate);
......
......@@ -57,7 +57,9 @@ public:
itkTypeMacro(PleiadesPToXSAffineTransformCalculator,itk::LightObject);
typedef itk::ScalableAffineTransform<double,2> TransformType;
typedef itk::ScalableAffineTransform<double,2> TransformType;
typedef TransformType::OutputVectorType OffsetType;
/**
* This function checks if the transform calculation applies to the
......@@ -69,7 +71,16 @@ public:
*/
static bool CanCompute(const itk::ImageBase<2> * panchromaticImage, const itk::ImageBase<2> * xsImage);
/**
* This function computes the offset in pan pixels for a pair of
* image. Note that the CanCompute() method is first called, and
* that an exception will be raised if computation can not be done.
*
* \return The computed transform
*/
static OffsetType ComputeOffset(const itk::ImageBase<2> * panchromaticImage, const itk::ImageBase<2> * xsImage);
/**
* This function computes the transform for a pair of image. Note
* that the CanCompute() method is first called, and that an
......
......@@ -79,10 +79,11 @@ PleiadesPToXSAffineTransformCalculator
return false;
}
PleiadesPToXSAffineTransformCalculator
::TransformType::Pointer
::OffsetType
PleiadesPToXSAffineTransformCalculator
::Compute(const itk::ImageBase<2> * panchromaticImage, const itk::ImageBase<2> * xsImage)
::ComputeOffset(const itk::ImageBase<2> * panchromaticImage, const itk::ImageBase<2> * xsImage)
{
if(!CanCompute(panchromaticImage,xsImage))
{
......@@ -166,23 +167,36 @@ PleiadesPToXSAffineTransformCalculator
double lineShift_MS_P = -vcl_floor((timeDelta/(linePeriodPan/1000)+0.5))+1.5;
double colShift_MS_P = -((colStartXS-1)*4 - colStartPan + 1)+1.5;
// Apply the scaling
typedef itk::ScalableAffineTransform<double, 2> TransformType;
TransformType::Pointer transform = TransformType::New();
transform->SetIdentity();
// Apply the offset
TransformType::OutputVectorType offset;
OffsetType offset;
offset[0] = colShift_MS_P;
offset[1] = lineShift_MS_P;
transform->Translate(offset);
// Apply the scaling
transform->Scale(0.25);
return offset;
}
return transform;
}
PleiadesPToXSAffineTransformCalculator
::TransformType::Pointer
PleiadesPToXSAffineTransformCalculator
::Compute(const itk::ImageBase<2> * panchromaticImage, const itk::ImageBase<2> * xsImage)
{
// Compute the offset
OffsetType offset = ComputeOffset(panchromaticImage,xsImage);
// Apply the scaling
typedef itk::ScalableAffineTransform<double, 2> TransformType;
TransformType::Pointer transform = TransformType::New();
transform->SetIdentity();
// Apply the offset
transform->Translate(offset);
// Apply the scaling
transform->Scale(0.25);
return transform;
}
} // End namespace otb
......
......@@ -45,7 +45,8 @@ public:
typedef typename OutputImageType::RegionType OutputImageRegionType;
typedef typename itk::NumericTraits<OutputPixelType>::RealType RealType;
typedef typename itk::NumericTraits<RealType>::AccumulateType AccumulateType;
typedef typename RealType::RealValueType ScalarRealType;
typedef typename itk::NumericTraits<OutputPixelType>
::ScalarRealType ScalarRealType;
/** Set the valid image input. This will be input 0. */
virtual void SetValidInput(const InputImageType* validImage);
......@@ -65,7 +66,7 @@ public:
/** Get parameters of the difference image after execution. */
itkGetMacro(MeanDifference, RealType);
itkGetMacro(TotalDifference, RealType);
itkGetMacro(TotalDifference, AccumulateType);
itkGetMacro(NumberOfPixelsWithDifferences, unsigned long);
protected:
......@@ -94,12 +95,12 @@ protected:
ScalarRealType m_DifferenceThreshold;
RealType m_MeanDifference;
RealType m_TotalDifference;