PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusReconstructVolumeCommand.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 __vtkPlusReconstructVolumeCommand_h
8 #define __vtkPlusReconstructVolumeCommand_h
9 
10 #include "vtkPlusServerExport.h"
11 
12 #include "vtkPlusCommand.h"
13 
15 //class vtkIGSIOTrackedFrameList;
16 //class vtkIGSIOTransformRepository;
23 class vtkPlusServerExport vtkPlusReconstructVolumeCommand : public vtkPlusCommand
24 {
25 public:
26 
27  static vtkPlusReconstructVolumeCommand* New();
29  virtual void PrintSelf(ostream& os, vtkIndent indent);
30  virtual vtkPlusCommand* Clone() { return New(); }
31 
33  virtual PlusStatus Execute();
34 
36  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* aConfig);
37 
39  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* aConfig);
40 
42  virtual void GetCommandNames(std::list<std::string>& cmdNames);
43 
45  virtual std::string GetDescription(const std::string& commandName);
46 
48  vtkGetStdStringMacro(InputSeqFilename);
49  vtkSetStdStringMacro(InputSeqFilename);
50 
52  vtkGetStdStringMacro(OutputVolFilename);
53  vtkSetStdStringMacro(OutputVolFilename);
54 
56  vtkGetStdStringMacro(OutputVolDeviceName);
57  vtkSetStdStringMacro(OutputVolDeviceName);
58 
60  vtkGetStdStringMacro(VolumeReconstructorDeviceId);
61  vtkSetStdStringMacro(VolumeReconstructorDeviceId);
62 
67  vtkSetVector3Macro(OutputSpacing, double);
69  vtkGetVector3Macro(OutputSpacing, double);
70 
75  vtkSetVector3Macro(OutputOrigin, double);
77  vtkGetVector3Macro(OutputOrigin, double);
78 
83  vtkSetVector6Macro(OutputExtent, int);
85  vtkGetVector6Macro(OutputExtent, int);
86 
87  vtkGetMacro(ApplyHoleFilling, bool);
88  vtkSetMacro(ApplyHoleFilling, bool);
89 
90  void SetNameToReconstruct();
91  void SetNameToStart();
92  void SetNameToStop();
93  void SetNameToSuspend();
94  void SetNameToResume();
95  void SetNameToGetSnapshot();
96 
97 protected:
99  PlusStatus ProcessImageReply(vtkImageData* volumeToSend, const std::string& outputVolFilename, const std::string& outputVolDeviceName, std::string& resultMessage);
100 
101  vtkPlusVirtualVolumeReconstructor* GetVolumeReconstructorDevice();
102 
105 
106 protected:
107  std::string InputSeqFilename;
108  std::string OutputVolFilename;
109  std::string OutputVolDeviceName;
111 
112  // Output image position and size
113  double OutputOrigin[3];
114  double OutputSpacing[3];
115  int OutputExtent[6];
116 
118 
120  void operator=(const vtkPlusReconstructVolumeCommand&);
121 
122 };
123 
124 #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
Reconstructs a volume from tracked frames.
This command reconstructs a volume from an image sequence and saves it to disk or sends it to the cli...