Medical Imaging Interaction Toolkit  2018.4.99-f51274ea
Medical Imaging Interaction Toolkit
itkLineHistogramBasedMassImageFilter.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 ITKLINEHISTOGRAMBASEDMASSIMAGEFILTER_H
14 #define ITKLINEHISTOGRAMBASEDMASSIMAGEFILTER_H
15 
16 #include <itkImageToImageFilter.h>
17 
18 namespace itk
19 {
20  template< class TInputImageType, class TOutputImageType = TInputImageType, class TMaskImageType = itk::Image<short,3> >
22  : public itk::ImageToImageFilter<TInputImageType, TOutputImageType>
23  {
24  public:
25 
29  typedef ImageToImageFilter< TInputImageType, TOutputImageType > Superclass;
30 
31  itkFactorylessNewMacro(Self);
32  itkCloneMacro(Self);
33 
34  void SetImageMask(TMaskImageType * maskimage);
35  void SetBinaryContour(TMaskImageType * contouriamge);
36 
37  private:
38 
39  typename TMaskImageType::Pointer m_ImageMask;
40  typename TMaskImageType::Pointer m_BinaryContour;
41  vnl_vector<double> m_CenterOfMask;
42 
43  void ThreadedGenerateData(const typename Superclass::OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override;
44  void BeforeThreadedGenerateData() override;
45  // void GenerateOutputInformation();
46 
47  vnl_vector<double> GetCenterOfMass(const TMaskImageType * maskImage);
48 
51  };
52 }
53 
54 #ifndef ITK_MANUAL_INSTANTIATION
55 #include "../src/Features/itkLineHistogramBasedMassImageFilter.cpp"
56 #endif
57 
58 #endif
LineHistogramBasedMassImageFilter< TInputImageType, TOutputImageType > Self
ImageToImageFilter< TInputImageType, TOutputImageType > Superclass