Medical Imaging Interaction Toolkit  2018.4.99-c670e289
Medical Imaging Interaction Toolkit
mitkBinaryThresholdBaseTool.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 mitkBinaryThresholdBaseTool_h_Included
14 #define mitkBinaryThresholdBaseTool_h_Included
15 
17 #include "mitkCommon.h"
18 #include "mitkDataNode.h"
20 
21 #include <itkBinaryThresholdImageFilter.h>
22 #include <itkImage.h>
23 
24 namespace mitk
25 {
34  {
35  public:
38 
40 
41  virtual void SetThresholdValues(double lower, double upper);
42 
43  protected:
44  BinaryThresholdBaseTool(); // purposely hidden
45  ~BinaryThresholdBaseTool() override;
46 
47  itkSetMacro(LockedUpperThreshold, bool);
48  itkGetMacro(LockedUpperThreshold, bool);
49  itkBooleanMacro(LockedUpperThreshold);
50 
51  itkGetMacro(SensibleMinimumThresholdValue, ScalarType);
52  itkGetMacro(SensibleMaximumThresholdValue, ScalarType);
53 
54  void InitiateToolByInput() override;
55  void DoUpdatePreview(const Image* inputAtTimeStep, Image* previewImage, TimeStepType timeStep) override;
56 
57  private:
58  ScalarType m_SensibleMinimumThresholdValue;
59  ScalarType m_SensibleMaximumThresholdValue;
60  ScalarType m_CurrentLowerThresholdValue;
61  ScalarType m_CurrentUpperThresholdValue;
62 
65  bool m_LockedUpperThreshold = false;
66  };
67 
68 } // namespace
69 
70 #endif
Message3< double, double, bool > IntervalBordersChanged
double ScalarType
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image class for storing images.
Definition: mitkImage.h:73
std::vcl_size_t TimeStepType
Message2< mitk::ScalarType, mitk::ScalarType > ThresholdingValuesChanged
Base class for any auto segmentation tool that provides a preview of the new segmentation.
Base class for binary threshold tools.