15 #ifndef __vtkMRMLTransformNode_h 16 #define __vtkMRMLTransformNode_h 21 class vtkAbstractTransform;
22 class vtkGeneralTransform;
38 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
48 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
56 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "Transform";};
67 virtual int IsLinear();
71 virtual int IsComposite();
75 virtual vtkAbstractTransform* GetTransformToParent();
80 virtual int GetMatrixTransformToParent(vtkMatrix4x4* matrix);
85 virtual int GetMatrixTransformFromParent(vtkMatrix4x4* matrix);
92 virtual vtkMatrix4x4* GetMatrixTransformToParent();
99 virtual vtkMatrix4x4* GetMatrixTransformFromParent();
103 virtual const char* GetTransformToParentInfo();
107 virtual vtkAbstractTransform* GetTransformFromParent();
111 virtual const char* GetTransformFromParentInfo();
115 int IsTransformToWorldLinear();
124 void GetTransformToWorld(vtkGeneralTransform* transformToWorld);
129 void GetTransformFromWorld(vtkGeneralTransform* transformToWorld);
135 vtkGeneralTransform* transformToNode);
141 vtkGeneralTransform* transformFromNode);
153 virtual int GetMatrixTransformToWorld(vtkMatrix4x4* transformToWorld);
159 virtual int GetMatrixTransformFromWorld(vtkMatrix4x4* transformFromWorld);
166 vtkMatrix4x4* transformToNode);
173 vtkMatrix4x4* transformFromNode);
209 virtual int SetMatrixTransformToParent(vtkMatrix4x4 *matrix);
214 virtual int SetMatrixTransformFromParent(vtkMatrix4x4 *matrix);
231 virtual int SetAndObserveMatrixTransformToParent(vtkMatrix4x4 *matrix);
237 virtual int SetAndObserveMatrixTransformFromParent(vtkMatrix4x4 *matrix);
242 virtual
void ApplyTransform(vtkAbstractTransform* transform) VTK_OVERRIDE;
255 virtual
void CreateDefaultDisplayNodes() VTK_OVERRIDE;
264 vtkGetMacro(ReadAsTransformToParent,
int);
265 vtkSetMacro(ReadAsTransformToParent,
int);
266 vtkBooleanMacro(ReadAsTransformToParent,
int);
272 virtual
void TransformModified()
284 vtkAbstractTransform* GetTransformToParentAs(const
char* transformType,
bool logErrorIfFails = true,
bool modifiableOnly = false);
291 vtkAbstractTransform* GetTransformFromParentAs(const
char* transformType,
bool logErrorIfFails = true,
bool modifiableOnly = false);
298 void SetAndObserveTransformToParent(vtkAbstractTransform *transform);
305 void SetAndObserveTransformFromParent(vtkAbstractTransform *transform);
308 virtual
void ProcessMRMLEvents ( vtkObject * ,
310 void * ) VTK_OVERRIDE;
315 static
void FlattenGeneralTransform(vtkCollection* outputTransformList, vtkAbstractTransform* inputTransform);
320 static
bool AreTransformsEqual(vtkAbstractTransform* transform1, vtkAbstractTransform* transform2);
327 static
bool IsGeneralTransformLinear(vtkAbstractTransform* inputTransform, vtkTransform* concatenatedLinearTransform=NULL);
333 static
bool IsAbstractTransformComputedFromInverse(vtkAbstractTransform* abstractTransform);
339 static
int DeepCopyTransform(vtkAbstractTransform* dst, vtkAbstractTransform* src);
347 vtkMTimeType GetTransformToWorldMTime();
354 const
char* GetTransformInfo(vtkAbstractTransform* inputTransform);
366 virtual vtkAbstractTransform* GetAbstractTransformAs(vtkAbstractTransform* inputTransform, const
char* transformClassName,
bool logErrorIfFails);
370 virtual
void SetAndObserveTransform(vtkAbstractTransform** originalTransformPtr, vtkAbstractTransform** inverseTransformPtr, vtkAbstractTransform *transform);
379 vtkAbstractTransform* TransformToParent;
380 vtkAbstractTransform* TransformFromParent;
382 int ReadAsTransformToParent;
385 std::
string TransformInfo;
389 vtkMatrix4x4* CachedMatrixTransformToParent;
390 vtkMatrix4x4* CachedMatrixTransformFromParent;
virtual bool GetModifiedSinceRead()
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
A set of MRML Nodes that supports serialization and undo/redo.
A superclass for other storage nodes.
virtual void InvokeCustomModifiedEvent(int eventId, void *callData=NULL)
This method allows the node to compress events.
Abstract Superclass for all specific types of MRML nodes.
virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
MRMLNode methods.