Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkBinaryImageToLabelSetImageFilter.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 mitkBinaryImageToLabelSetImageFilter_h
14 #define mitkBinaryImageToLabelSetImageFilter_h
15 
16 #include <mitkImageToImageFilter.h>
17 
18 #include "mitkCommon.h"
19 
20 #include "MitkModelFitExports.h"
21 
22 namespace mitk
23 {
27  {
28  public:
30  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
31 
32  void SetInput(const InputImageType* image) override;
33  void SetInput(unsigned int index, const InputImageType* image) override;
34 
35  itkSetMacro(FullyConnected, bool);
36  itkGetConstMacro(FullyConnected, bool);
37 
38  itkSetMacro(ForegroundValue, unsigned int);
39  itkGetConstMacro(ForegroundValue, unsigned int);
40 
41  itkSetMacro(OutputIsLabelSetImage, bool);
42  itkGetConstMacro(OutputIsLabelSetImage, bool);
43 
44  private:
45  using Superclass::SetInput;
46 
48  ~BinaryImageToLabelSetImageFilter() override = default;
49 
50  template <typename TPixel, unsigned int VImageDimension>
51  void ApplyBinaryImageToLabelMapFilter(const itk::Image<TPixel, VImageDimension>* inputImage);
52 
53  void GenerateData() override;
54  void VerifyInputInformation() override;
55  void VerifyInputImage(const mitk::Image* inputImage);
56 
57  bool m_FullyConnected = true;
58  unsigned int m_ForegroundValue = 1;
59  bool m_OutputIsLabelSetImage = false;
60  };
61 }
62 
63 #endif
Superclass of all classes generating some kind of mitk::BaseData.
Converts an binary image to a LabelSetImage. The amount of labels equals the connected components...
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKMODELFIT_EXPORT
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image class for storing images.
Definition: mitkImage.h:72
Superclass of all classes having one or more Images as input and generating Images as output...
mitk::Image::Pointer image