Medical Imaging Interaction Toolkit  2018.4.99-08619e4f
Medical Imaging Interaction Toolkit
mitkPixelManipulationTool.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 #ifndef MITKPIXELMANIPULATIONTOOL_H
13 #define MITKPIXELMANIPULATIONTOOL_H
14 
15 #include "mitkTool.h"
17 
18 #include "itkImage.h"
19 
20 namespace mitk
21 {
22  class Image;
23 
25  {
26  public:
28  itkFactorylessNewMacro(Self);
29  itkCloneMacro(Self);
30 
31  void SetValue(int value);
32  int GetValue();
33 
34  void SetFixedValue(int value);
35  int GetFixedValue();
36 
37  const char *GetName() const override;
38  const char **GetXPM() const override;
39 
40  void Activated() override;
41  void Deactivated() override;
42 
43  virtual void CalculateImage();
44 
45  protected:
47  ~PixelManipulationTool() override;
48 
49  virtual void OnRoiDataChanged();
50  void AddImageToDataStorage(itk::SmartPointer<mitk::Image> image);
51 
52  template <typename TPixel, unsigned int VImageDimension>
53  void ITKPixelManipulation(itk::Image<TPixel, VImageDimension> *originalImage,
54  Image *maskImage,
55  Image *newImage,
56  int newValue);
57 
59  int m_Value;
61  }; // clas
62 } // namespace
63 #endif
Base class of all tools used by mitk::ToolManager.
Definition: mitkTool.h:86
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
mitk::DataNode::Pointer m_OriginalImageNode
class ITK_EXPORT Image
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image class for storing images.
Definition: mitkImage.h:72
mitk::Image::Pointer image
static std::string GetName(std::string fileName, std::string suffix)
Super-class that provides the functionality of a StateMachine to DataInteractors. ...