Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitkUSProbe.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 mitkUSProbe_h
14 #define mitkUSProbe_h
15 
16 #include <MitkUSExports.h>
17 #include <mitkCommon.h>
18 #include <itkObject.h>
19 #include <itkObjectFactory.h>
20 #include <mitkVector.h>
21 
22 namespace mitk {
29  //Be sure to check the isEqualTo() method if you expand this class to see if it needs work!
30  class MITKUS_EXPORT USProbe : public itk::Object
31  {
32  public:
33  mitkClassMacroItkParent(USProbe, itk::Object);
34  itkFactorylessNewMacro(Self);
35  itkCloneMacro(Self)
36  mitkNewMacro1Param(Self, std::string);
37 
41  typedef struct USProbeCropping_
42  {
43  unsigned int top;
44  unsigned int bottom;
45  unsigned int left;
46  unsigned int right;
47 
49  : top(0), bottom(0), left(0), right(0) { };
50 
51  USProbeCropping_(unsigned int top, unsigned int bottom, unsigned int left, unsigned int right)
52  : top(top), bottom(bottom), left(left), right(right) { };
53  }USProbeCropping;
54 
58  void SetProbeCropping(unsigned int top, unsigned int bottom, unsigned int left, unsigned int right);
59  USProbeCropping GetProbeCropping();
60 
65  bool IsEqualToProbe(mitk::USProbe::Pointer probe);
66 
70  void SetDepthAndSpacing(int depth, Vector3D spacing);
71 
76  std::map<int, Vector3D> GetDepthsAndSpacing();
77 
81  void SetDepth(int depth);
82 
86  void RemoveDepth(int depthToRemove);
87 
91  void SetSpacingForGivenDepth(int givenDepth, Vector3D spacing);
92 
97  Vector3D GetSpacingForGivenDepth(int givenDepth);
98 
103  bool IsDepthAndSpacingEmpty();
104 
105  //## getter and setter ##
106 
107  itkGetMacro(Name, std::string);
108  itkSetMacro(Name, std::string);
109  itkGetMacro(CurrentDepth, double);
110  itkSetMacro(CurrentDepth, double);
111 
112  protected:
113  USProbe();
114  USProbe(std::string identifier);
115  ~USProbe() override;
116 
117  std::string m_Name;
119 
120  // Map containing the depths and the associated spacings as an std::vector with depth as key and spacing as value
121  std::map<int, Vector3D> m_DepthsAndSpacings;
122 
124  };
125 } // namespace mitk
126 #endif
mitk::USProbe::m_CurrentDepth
double m_CurrentDepth
Definition: mitkUSProbe.h:118
mitk::USProbe::USProbeCropping_::right
unsigned int right
Definition: mitkUSProbe.h:46
mitkNewMacro1Param
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:68
mitk::USProbe::USProbeCropping_
Struct to define a probe specific ultrasound image cropping.
Definition: mitkUSProbe.h:41
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::USProbe::USProbeCropping_::top
unsigned int top
Definition: mitkUSProbe.h:43
mitk::USProbe::USProbeCropping_::left
unsigned int left
Definition: mitkUSProbe.h:45
mitk::USProbe
Right now, the US Probe is only a fancy name for a string. Later, it could handle probe specific para...
Definition: mitkUSProbe.h:30
mitk::Vector< ScalarType, 3 >
mitk::USProbe::USProbeCropping_::bottom
unsigned int bottom
Definition: mitkUSProbe.h:44
mitk::USProbe::USProbeCropping_::USProbeCropping_
USProbeCropping_(unsigned int top, unsigned int bottom, unsigned int left, unsigned int right)
Definition: mitkUSProbe.h:51
mitk::USProbe::m_Cropping
USProbeCropping m_Cropping
Definition: mitkUSProbe.h:123
mitkCommon.h
mitk::USProbe::m_Name
std::string m_Name
Definition: mitkUSProbe.h:117
mitk::USProbe::USProbeCropping_::USProbeCropping_
USProbeCropping_()
Definition: mitkUSProbe.h:48
mitk::USProbe::m_DepthsAndSpacings
std::map< int, Vector3D > m_DepthsAndSpacings
Definition: mitkUSProbe.h:121
mitkVector.h