Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
itkLocalVariationImageFilter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef __itkLocalVariationImageFilter_h
14 #define __itkLocalVariationImageFilter_h
15 
16 #include "itkImage.h"
17 #include "itkImageToImageFilter.h"
18 
19 namespace itk
20 {
21  template <class TPixelType>
23  {
24  public:
25  static double Calc(TPixelType p);
26  };
27 
40  template <class TInputImage, class TOutputImage>
41  class LocalVariationImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
42  {
43  public:
45  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
46  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
47 
49  typedef TInputImage InputImageType;
50  typedef TOutputImage OutputImageType;
51 
54  typedef ImageToImageFilter<InputImageType, OutputImageType> Superclass;
57 
59  itkFactorylessNewMacro(Self);
60  itkCloneMacro(Self);
61 
63  itkTypeMacro(LocalVariationImageFilter, ImageToImageFilter);
64 
66  typedef typename InputImageType::PixelType InputPixelType;
67  typedef typename OutputImageType::PixelType OutputPixelType;
68 
69  typedef typename InputImageType::RegionType InputImageRegionType;
70  typedef typename OutputImageType::RegionType OutputImageRegionType;
71 
72  typedef typename InputImageType::SizeType InputSizeType;
73 
80  void GenerateInputRequestedRegion() override;
81 
82  protected:
85  void PrintSelf(std::ostream &os, Indent indent) const override;
86 
97  void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override;
98 
99  private:
100  LocalVariationImageFilter(const Self &); // purposely not implemented
101  void operator=(const Self &); // purposely not implemented
102  };
103 
104 } // end namespace itk
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 #include "itkLocalVariationImageFilter.txx"
108 #endif
109 
110 #endif // LocalVariationImageFilter
itk::LocalVariationImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: itkLocalVariationImageFilter.h:67
itk::LocalVariationImageFilter::itkStaticConstMacro
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
itk::LocalVariationImageFilter
Calculates the local variation in each pixel.
Definition: itkLocalVariationImageFilter.h:41
itk::LocalVariationImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: itkLocalVariationImageFilter.h:69
itk::LocalVariationImageFilter::GenerateInputRequestedRegion
void GenerateInputRequestedRegion() override
itk::LocalVariationImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: itkLocalVariationImageFilter.h:70
itk::LocalVariationImageFilter::~LocalVariationImageFilter
~LocalVariationImageFilter() override
Definition: itkLocalVariationImageFilter.h:84
itk::SmartPointer< Self >
itk::LocalVariationImageFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: itkLocalVariationImageFilter.h:63
itk::LocalVariationImageFilter::LocalVariationImageFilter
LocalVariationImageFilter()
itk::LocalVariationImageFilter::Superclass
ImageToImageFilter< InputImageType, OutputImageType > Superclass
Definition: itkLocalVariationImageFilter.h:54
itk::LocalVariationImageFilter::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::LocalVariationImageFilter::InputSizeType
InputImageType::SizeType InputSizeType
Definition: itkLocalVariationImageFilter.h:72
itk::LocalVariationImageFilter::Self
LocalVariationImageFilter Self
Definition: itkLocalVariationImageFilter.h:53
itk::LocalVariationImageFilter::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkLocalVariationImageFilter.h:56
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
itk::LocalVariationImageFilter::ThreadedGenerateData
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
itk::LocalVariationImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: itkLocalVariationImageFilter.h:50
itk::SquaredEuclideanMetric::Calc
static double Calc(TPixelType p)
itk::SquaredEuclideanMetric
Definition: itkLocalVariationImageFilter.h:22
itk::LocalVariationImageFilter::Pointer
SmartPointer< Self > Pointer
Definition: itkLocalVariationImageFilter.h:55
itk::LocalVariationImageFilter::InputImageType
TInputImage InputImageType
Definition: itkLocalVariationImageFilter.h:49