PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusVirtualVolumeReconstructor.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 __vtkPlusVirtualVolumeReconstructor_h
8 #define __vtkPlusVirtualVolumeReconstructor_h
9 
10 #include "vtkPlusDataCollectionExport.h"
11 
12 #include "vtkPlusDevice.h"
13 #include <string>
14 
16 
23 class vtkPlusDataCollectionExport vtkPlusVirtualVolumeReconstructor : public vtkPlusDevice
24 {
25 public:
28  void PrintSelf(ostream& os, vtkIndent indent);
29 
33  virtual PlusStatus GetReconstructedVolumeFromFile(const std::string& inputSeqFilename, vtkImageData* reconstructedVolume, std::string& errorMessage);
34 
39  PlusStatus GetReconstructedVolume(vtkImageData* reconstructedVolume, std::string& outErrorMessage, bool applyHoleFilling = true);
40 
46  PlusStatus UpdateTransformRepository(vtkIGSIOTransformRepository* sharedTransformRepository);
47 
52  vtkGetMacro(EnableReconstruction, bool);
57  void SetEnableReconstruction(bool aValue);
58 
63  virtual PlusStatus Reset();
64 
66  vtkSetStdStringMacro(OutputVolFilename);
67  vtkGetStdStringMacro(OutputVolFilename);
68 
70  vtkSetStdStringMacro(OutputVolDeviceName);
71  vtkGetStdStringMacro(OutputVolDeviceName);
72 
74  void SetOutputOrigin(double* origin);
75 
77  void SetOutputSpacing(double* spacing);
78 
80  void SetOutputExtent(int* extent);
81 
82  vtkGetMacro(TotalFramesRecorded, long int);
83 
84 protected:
85 
87  virtual PlusStatus ReadConfiguration(vtkXMLDataElement*);
88 
90  virtual PlusStatus WriteConfiguration(vtkXMLDataElement*);
91 
92  virtual PlusStatus InternalUpdate();
93 
94  virtual PlusStatus NotifyConfigured();
95 
96  virtual double GetAcquisitionRate() const;
97 
98  virtual int OutputChannelCount() const;
99 
103  virtual void InternalWriteOutputChannels(vtkXMLDataElement* rootXMLElement);
104 
105  void SetRequestedFrameRate(double aValue);
106  vtkGetMacro(RequestedFrameRate, double);
107 
109 
110  virtual bool IsTracker() const { return false; }
111  virtual bool IsVirtual() const { return true; }
112 
113  virtual PlusStatus InternalConnect();
114  virtual PlusStatus InternalDisconnect();
115 
116  PlusStatus AddFrames(vtkIGSIOTrackedFrameList* trackedFrameList);
117 
119  double GetSamplingPeriodSec();
120 
123 
124 protected:
127 
130 
133 
136 
137  /* Time waited in update */
138  double m_TimeWaited;
140 
143 
145  long int TotalFramesRecorded; // hard drive will probably fill up before a regular int is hit, but still...
146 
147  vtkSmartPointer<vtkPlusVolumeReconstructor> VolumeReconstructor;
148  vtkSmartPointer<vtkIGSIOTransformRepository> TransformRepository;
149 
151 
152  std::string OutputVolFilename;
153  std::string OutputVolDeviceName;
154 
156  vtkSmartPointer<vtkIGSIORecursiveCriticalSection> VolumeReconstructorAccessMutex;
157 
158 private:
160  void operator=(const vtkPlusVirtualVolumeReconstructor&); // Not implemented.
161 };
162 
163 #endif
vtkSmartPointer< vtkPlusVolumeReconstructor > VolumeReconstructor
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkPlusDataCollector * DataCollector
virtual void InternalWriteOutputChannels(vtkXMLDataElement *rootXMLElement)
virtual vtkPlusDataCollector * GetDataCollector()
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
virtual PlusStatus InternalConnect()
igsioStatus PlusStatus
Definition: PlusCommon.h:40
virtual double GetAcquisitionRate() const
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
virtual PlusStatus Reset()
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
Manages devices that record image or positional data.
Reconstructs a volume from tracked frames.
vtkSmartPointer< vtkIGSIORecursiveCriticalSection > VolumeReconstructorAccessMutex
virtual PlusStatus NotifyConfigured()
virtual PlusStatus InternalDisconnect()
vtkSmartPointer< vtkIGSIOTransformRepository > TransformRepository
virtual int OutputChannelCount() const
virtual PlusStatus InternalUpdate()
static vtkPlusDevice * New()