NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkCoordinateAxesData.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkCoordinateAxesData_h
16 #define niftkCoordinateAxesData_h
17 
18 #include "niftkCoreExports.h"
19 #include <itkImageRegion.h>
20 #include <mitkBaseData.h>
21 #include <vtkMatrix4x4.h>
22 #include <mitkVector.h>
23 
24 namespace niftk
25 {
26 
33 class NIFTKCORE_EXPORT CoordinateAxesData : public mitk::BaseData
34 {
35 
36 public:
37 
38  typedef itk::ImageRegion<5> RegionType;
41 
42  mitkClassMacro(CoordinateAxesData, mitk::BaseData)
43  itkNewMacro(Self)
44 
45  static const char* FILE_NAME;
46  static const char* FILE_EXTENSION;
47  static const char* FILE_EXTENSION_WITH_ASTERISK;
48  static const char* FILE_DIALOG_PATTERN;
49  static const char* FILE_DIALOG_NAME;
50 
51  void SetRequestedRegionToLargestPossibleRegion() override;
52  bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
53  virtual bool VerifyRequestedRegion() override;
54  virtual void SetRequestedRegion(const itk::DataObject *data) override;
55  const RegionType& GetLargestPossibleRegion() const;
56  virtual const RegionType& GetRequestedRegion() const;
57  virtual void UpdateOutputInformation() override;
58 
59  void GetVtkMatrix(vtkMatrix4x4& matrixToWriteTo) const;
60  void SetVtkMatrix(const vtkMatrix4x4& matrix);
61 
62  bool SaveToFile(const std::string& fileName) const;
63 
65  mitk::Point3D MultiplyPoint(const mitk::Point3D& point) const;
66 
68  void SetTranslation(const mitk::Point3D& translation);
69 
71  void SetTranslation(double tx, double ty, double tz);
72 
73 protected:
75  ~CoordinateAxesData();
76 
77 private:
78  CoordinateAxesData(const CoordinateAxesData&); // Purposefully not implemented.
79  CoordinateAxesData& operator=(const CoordinateAxesData&); // Purposefully not implemented.
80 
81  mutable RegionType m_LargestPossibleRegion;
82  RegionType m_RequestedRegion;
83 };
84 
85 }
86 
87 #endif
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
Definition: niftkMeshSmoother.cxx:19
Definition: ReceptorMemberCommandTest.cxx:25
Definition: niftkITKAffineResampleImage.cxx:74
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
Definition: glew.h:1363
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
Class to enable the data to represent coordinate axes to be added as a mitk::BaseData to the mitk::Da...
Definition: niftkCoordinateAxesData.h:33
itk::ImageRegion< 5 > RegionType
Definition: niftkCoordinateAxesData.h:38
GLuint GLenum matrix
Definition: glew.h:12775
RegionType::SizeType SizeType
Definition: niftkCoordinateAxesData.h:40
RegionType::IndexType IndexType
Definition: niftkCoordinateAxesData.h:39
Definition: niftkExceptionObject.h:21