Add transform matrix to Property.

This commit is contained in:
Krad
2022-05-05 15:54:10 +08:00
parent baaaa23056
commit be8a1c8994

View File

@@ -7,6 +7,8 @@
#include <vtkMedicalImageProperties.h>
#include <vector>
#include <vtkNew.h>
#include <vtkMatrix4x4.h>
class ExtendMedicalImageProperties: public vtkMedicalImageProperties{
public:
@@ -72,6 +74,12 @@ public:
void SetUniqueID(const std::string& id){
uniqueID = id;
}
vtkMatrix4x4* GetWorldToModelMatrix(){
return worldToModelMatrix.Get();
}
vtkMatrix4x4* GetModelToWorldMatrix(){
return modelToWorldMatrix.Get();
}
protected:
ExtendMedicalImageProperties();
@@ -84,6 +92,8 @@ protected:
unsigned short SamplePerPixel;
std::vector<std::string> FileNames;
std::string uniqueID;
vtkNew<vtkMatrix4x4> worldToModelMatrix;
vtkNew<vtkMatrix4x4> modelToWorldMatrix;
private:
ExtendMedicalImageProperties(const ExtendMedicalImageProperties&) = delete;
void operator=(const ExtendMedicalImageProperties&) = delete;