PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusUpdateTransformCommand.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2  Program: Plus
3  Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4  See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef __vtkPlusUpdateTransformCommand_h
8 #define __vtkPlusUpdateTransformCommand_h
9 
10 #include "vtkPlusServerExport.h"
11 #include "vtkPlusCommand.h"
12 
13 class vtkMatrix4x4;
14 
20 class vtkPlusServerExport vtkPlusUpdateTransformCommand : public vtkPlusCommand
21 {
22 public:
23 
24  static vtkPlusUpdateTransformCommand* New();
26  virtual void PrintSelf(ostream& os, vtkIndent indent);
27  virtual vtkPlusCommand* Clone() { return New(); }
28 
30  virtual PlusStatus Execute();
31 
33  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* aConfig);
34 
36  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* aConfig);
37 
39  virtual void GetCommandNames(std::list<std::string>& cmdNames);
40 
42  virtual std::string GetDescription(const std::string& commandName);
43 
44  vtkGetStdStringMacro(TransformName);
45  vtkSetStdStringMacro(TransformName);
46 
47  vtkGetObjectMacro(TransformValue, vtkMatrix4x4);
48  vtkSetObjectMacro(TransformValue, vtkMatrix4x4);
49  void SetTransformValue(double* matrixElements);
50 
51  vtkGetStdStringMacro(TransformDate);
52  vtkSetStdStringMacro(TransformDate);
53 
54  vtkGetMacro(TransformError, double);
55  void SetTransformError(double _arg) { this->TransformError = _arg; hasError = true; }
56 
57  vtkGetMacro(TransformPersistent, bool);
58  void SetTransformPersistent(bool _arg) { this->TransformPersistent = _arg; hasPersistent = true; }
59 
60  void SetNameToUpdateTransform();
61 
62 protected:
63 
66 
67 private:
68  std::string TransformName;
69  vtkMatrix4x4* TransformValue;
70  bool hasMatrix;
71  bool TransformPersistent;
72  bool hasPersistent;
73  double TransformError;
74  bool hasError;
75  std::string TransformDate;
76  bool hasDate;
77 
79  void operator=(const vtkPlusUpdateTransformCommand&);
80 };
81 
82 
83 #endif
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual std::string GetDescription(const std::string &commandName)=0
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *aConfig)
virtual PlusStatus Execute()=0
This is an abstract superclass for commands in the OpenIGTLink network interface for Plus.
igsioStatus PlusStatus
Definition: PlusCommon.h:40
vtkGetStdStringMacro(Name)
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *aConfig)
vtkSetStdStringMacro(Name)
virtual void GetCommandNames(std::list< std::string > &cmdNames)=0
This command updates the value of a transformation in the transform repository.