Medical Imaging Interaction Toolkit  2026.06.00
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 {
30  template< class TInputImageType, class TOutputImageType = TInputImageType, class TMaskImageType = itk::Image<short,3> >
32  : public itk::ImageToImageFilter<TInputImageType, TOutputImageType>
33  {
34  public:
35 
39  typedef ImageToImageFilter< TInputImageType, TOutputImageType > Superclass;
40 
41  itkFactorylessNewMacro(Self);
42  itkCloneMacro(Self);
43 
48  void SetImageMask(TMaskImageType * maskimage);
49 
54  void SetBinaryContour(TMaskImageType * contouriamge);
55 
56  private:
57 
58  typename TMaskImageType::Pointer m_ImageMask;
59  typename TMaskImageType::Pointer m_BinaryContour;
60  vnl_vector<double> m_CenterOfMask;
61 
62  void ThreadedGenerateData(const typename Superclass::OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override;
63  void BeforeThreadedGenerateData() override;
64  // void GenerateOutputInformation();
65 
66  vnl_vector<double> GetCenterOfMass(const TMaskImageType * maskImage);
67 
70  };
71 }
72 
73 #ifndef ITK_MANUAL_INSTANTIATION
74 #include "../src/Features/itkLineHistogramBasedMassImageFilter.cpp"
75 #endif
76 
77 #endif
Computes line-histogram-based mass features for each voxel in an image.
LineHistogramBasedMassImageFilter< TInputImageType, TOutputImageType > Self
ImageToImageFilter< TInputImageType, TOutputImageType > Superclass
void SetBinaryContour(TMaskImageType *contouriamge)
Set the binary contour image.
void SetImageMask(TMaskImageType *maskimage)
Set the mask image defining the region of interest.