Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef ITKLINEHISTOGRAMBASEDMASSIMAGEFILTER_H
18 #define ITKLINEHISTOGRAMBASEDMASSIMAGEFILTER_H
19 
20 #include <itkImageToImageFilter.h>
21 
22 namespace itk
23 {
24  template< class TInputImageType, class TOutputImageType = TInputImageType, class TMaskImageType = itk::Image<short,3> >
26  : public itk::ImageToImageFilter<TInputImageType, TOutputImageType>
27  {
28  public:
29 
33  typedef ImageToImageFilter< TInputImageType, TOutputImageType > Superclass;
34 
35  itkFactorylessNewMacro(Self);
36  itkCloneMacro(Self);
37 
38  void SetImageMask(TMaskImageType * maskimage);
39  void SetBinaryContour(TMaskImageType * contouriamge);
40 
41  private:
42 
43  typename TMaskImageType::Pointer m_ImageMask;
44  typename TMaskImageType::Pointer m_BinaryContour;
45  vnl_vector<double> m_CenterOfMask;
46 
47  void ThreadedGenerateData(const typename Superclass::OutputImageRegionType &outputRegionForThread, ThreadIdType threadId);
48  void BeforeThreadedGenerateData();
49  // void GenerateOutputInformation();
50 
51  vnl_vector<double> GetCenterOfMass(const TMaskImageType * maskImage);
52 
55  };
56 }
57 
58 #ifndef ITK_MANUAL_INSTANTIATION
59 #include "../src/Features/itkLineHistogramBasedMassImageFilter.cpp"
60 #endif
61 
62 #endif
itk::SmartPointer< Self > Pointer
LineHistogramBasedMassImageFilter< TInputImageType, TOutputImageType > Self
ImageToImageFilter< TInputImageType, TOutputImageType > Superclass