Medical Imaging Interaction Toolkit  2018.4.99-08619e4f
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_HEADER_INCLUDED_
14 #define MITKUSProbe_H_HEADER_INCLUDED_
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) { };
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
double m_CurrentDepth
Definition: mitkUSProbe.h:118
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:72
DataCollection - Class to facilitate loading/accessing structured data.
std::map< int, Vector3D > m_DepthsAndSpacings
Definition: mitkUSProbe.h:121
USProbeCropping_(unsigned int top, unsigned int bottom, unsigned int left, unsigned int right)
Definition: mitkUSProbe.h:51
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
Right now, the US Probe is only a fancy name for a string. Later, it could handle probe specific para...
Definition: mitkUSProbe.h:30
USProbeCropping m_Cropping
Definition: mitkUSProbe.h:123
std::string m_Name
Definition: mitkUSProbe.h:117
#define MITKUS_EXPORT
Definition: MitkUSExports.h:15
Struct to define a probe specific ultrasound image cropping.
Definition: mitkUSProbe.h:41