Medical Imaging Interaction Toolkit  2018.4.99-9a29ffc6
Medical Imaging Interaction Toolkit
itkMultiHistogramFilter.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 itkMultiHistogramFilter_h
14 #define itkMultiHistogramFilter_h
15 
16 #include "itkImageToImageFilter.h"
17 
18 namespace itk
19 {
20  template<typename TInputImageType, typename TOuputImageType >
21  class MultiHistogramFilter : 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(MultiHistogramFilter, ImageToImageFilter);
33 
34  itkSetMacro(Delta, double);
35  itkGetConstMacro(Delta, double);
36 
37  itkSetMacro(Offset, double);
38  itkGetConstMacro(Offset, double);
39 
40  itkSetMacro(Bins, int);
41  itkGetConstMacro(Bins, int);
42 
43  itkSetMacro(Size, int);
44  itkGetConstMacro(Size, int);
45 
46  itkSetMacro(UseImageIntensityRange, bool);
47  itkGetConstMacro(UseImageIntensityRange, bool);
48 
49  protected:
51  ~MultiHistogramFilter() override{};
52 
53  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override;
54  void BeforeThreadedGenerateData(void) override;
55 
56 
57  using itk::ProcessObject::MakeOutput;
58  itk::ProcessObject::DataObjectPointer MakeOutput(itk::ProcessObject::DataObjectPointerArraySizeType /*idx*/) override;
59 
60  void CreateOutputImage(InputImagePointer input, OutputImagePointer output);
61 
62  private:
63  MultiHistogramFilter(const Self &); // purposely not implemented
64  void operator=(const Self &); // purposely not implemented
65 
66  double m_Delta;
67  double m_Offset;
68  int m_Bins;
69  int m_Size;
70  bool m_UseImageIntensityRange;
71  };
72 }
73 
74 #ifndef ITK_MANUAL_INSTANTIATION
76 #endif
77 
78 #endif // itkMultiHistogramFilter_h
void CreateOutputImage(InputImagePointer input, OutputImagePointer output)
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
ImageToImageFilter< TInputImageType, TOuputImageType > Superclass
TInputImageType::ConstPointer InputImagePointer
void BeforeThreadedGenerateData(void) override
itk::ProcessObject::DataObjectPointer MakeOutput(itk::ProcessObject::DataObjectPointerArraySizeType) override
TOuputImageType::Pointer OutputImagePointer
TOuputImageType::RegionType OutputImageRegionType