Medical Imaging Interaction Toolkit  2018.4.99-bd7b41ba
Medical Imaging Interaction Toolkit
itkLocalStatisticFilter.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 itkLocalStatisticFilter_h
14 #define itkLocalStatisticFilter_h
15 
16 #include "itkImageToImageFilter.h"
17 
18 namespace itk
19 {
20  template<typename TInputImageType, typename TOuputImageType >
21  class LocalStatisticFilter : public ImageToImageFilter< TInputImageType, TOuputImageType>
22  {
23  public:
25  typedef ImageToImageFilter< TInputImageType, TOuputImageType > Superclass;
27  typedef typename TInputImageType::ConstPointer InputImagePointer;
28  typedef typename TOuputImageType::Pointer OutputImagePointer;
29  typedef typename TOuputImageType::RegionType OutputImageRegionType;
30 
31  itkNewMacro (Self);
32  itkTypeMacro(LocalStatisticFilter, ImageToImageFilter);
33 
34  itkSetMacro(Size, int);
35  itkGetConstMacro(Size, int);
36 
37  protected:
39  ~LocalStatisticFilter() override{};
40 
41  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override;
42  void BeforeThreadedGenerateData(void) override;
43 
44 
45  using itk::ProcessObject::MakeOutput;
46  itk::ProcessObject::DataObjectPointer MakeOutput(itk::ProcessObject::DataObjectPointerArraySizeType /*idx*/) override;
47 
48  void CreateOutputImage(InputImagePointer input, OutputImagePointer output);
49 
50  private:
51  LocalStatisticFilter(const Self &); // purposely not implemented
52  void operator=(const Self &); // purposely not implemented
53 
54  int m_Size;
55  int m_Bins;
56  };
57 }
58 
59 #ifndef ITK_MANUAL_INSTANTIATION
60 #include "itkLocalStatisticFilter.hxx"
61 #endif
62 
63 #endif // itkLocalStatisticFilter_h
TOuputImageType::RegionType OutputImageRegionType
void BeforeThreadedGenerateData(void) override
itk::ProcessObject::DataObjectPointer MakeOutput(itk::ProcessObject::DataObjectPointerArraySizeType) override
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
void CreateOutputImage(InputImagePointer input, OutputImagePointer output)
TInputImageType::ConstPointer InputImagePointer
TOuputImageType::Pointer OutputImagePointer
ImageToImageFilter< TInputImageType, TOuputImageType > Superclass