| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#ifndef itkVarianceImageFilter_h |
| 19 |
#define itkVarianceImageFilter_h |
| 20 |
|
| 21 |
#include "itkBoxImageFilter.h" |
| 22 |
#include "itkImage.h" |
| 23 |
#include "itkNumericTraits.h" |
| 24 |
|
| 25 |
namespace itk |
| 26 |
{ |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
template <typename TInputImage, typename TOutputImage> |
| 38 |
class ITK_TEMPLATE_EXPORT VarianceImageFilter final : public BoxImageFilter<TInputImage, TOutputImage> |
| 39 |
{ |
| 40 |
public: |
| 41 |
ITK_DISALLOW_COPY_AND_MOVE(VarianceImageFilter); |
| 42 |
|
| 43 |
|
| 44 |
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension); |
| 45 |
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); |
| 46 |
|
| 47 |
|
| 48 |
typedef TInputImage InputImageType; |
| 49 |
typedef TOutputImage OutputImageType; |
| 50 |
|
| 51 |
|
| 52 |
typedef VarianceImageFilter Self; |
| 53 |
typedef BoxImageFilter<InputImageType, OutputImageType> Superclass; |
| 54 |
typedef SmartPointer<Self> Pointer; |
| 55 |
typedef SmartPointer<const Self> ConstPointer; |
| 56 |
|
| 57 |
|
| 58 |
itkNewMacro(Self); |
| 59 |
|
| 60 |
|
| 61 |
itkTypeMacro(VarianceImageFilter, BoxImageFilter); |
| 62 |
|
| 63 |
|
| 64 |
typedef typename InputImageType::PixelType InputPixelType; |
| 65 |
typedef typename OutputImageType::PixelType OutputPixelType; |
| 66 |
typedef typename NumericTraits<InputPixelType>::RealType InputRealType; |
| 67 |
|
| 68 |
typedef typename InputImageType::RegionType InputImageRegionType; |
| 69 |
typedef typename OutputImageType::RegionType OutputImageRegionType; |
| 70 |
|
| 71 |
typedef typename InputImageType::SizeType InputSizeType; |
| 72 |
|
| 73 |
#ifdef ITK_USE_CONCEPT_CHECKING |
| 74 |
|
| 75 |
itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputPixelType>)); |
| 76 |
|
| 77 |
#endif |
| 78 |
|
| 79 |
protected: |
| 80 |
VarianceImageFilter(); |
| 81 |
~VarianceImageFilter() override = default; |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
void |
| 94 |
ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; |
| 95 |
}; |
| 96 |
} |
| 97 |
|
| 98 |
#ifndef ITK_MANUAL_INSTANTIATION |
| 99 |
# include "itkVarianceImageFilter.hxx" |
| 100 |
#endif |
| 101 |
|
| 102 |
#endif |