14 #ifndef __vtkPlusDataSource_h 15 #define __vtkPlusDataSource_h 18 #include "vtkPlusDataCollectionExport.h" 23 #include <vtkObject.h> 44 typedef std::map< std::string, std::string > CustomPropertyMap;
45 typedef CustomPropertyMap::iterator CustomPropertyMapIterator;
46 typedef CustomPropertyMap::const_iterator CustomPropertyMapConstIterator;
56 virtual void PrintSelf(ostream& os, vtkIndent indent)
VTK_OVERRIDE;
59 virtual PlusStatus ReadConfiguration(vtkXMLDataElement* toolElement,
bool requirePortNameInSourceConfiguration =
false,
bool requireImageOrientationInChannelConfiguration =
false,
const std::string& aDescriptiveNameForBuffer = std::string(
""));
61 virtual PlusStatus WriteConfiguration(vtkXMLDataElement* toolElement);
63 virtual PlusStatus WriteCompactConfiguration(vtkXMLDataElement* toolElement);
68 PlusStatus SetId(
const std::string& aSourceId);
69 PlusStatus SetSourceId(
const std::string& aSourceId);
71 vtkGetStdStringMacro(Id);
72 std::string GetSourceId()
const;
75 PlusStatus SetReferenceCoordinateFrameName(
const char* referenceName);
76 PlusStatus SetReferenceCoordinateFrameName(
const std::string& referenceName);
78 vtkGetStdStringMacro(ReferenceCoordinateFrameName);
80 std::string GetTransformName()
const;
83 PlusStatus SetImageType(US_IMAGE_TYPE imageType);
85 US_IMAGE_TYPE GetImageType();
88 PlusStatus SetInputFrameSize(
unsigned int x,
unsigned int y,
unsigned int z);
90 PlusStatus SetInputFrameSize(
const FrameSizeType& frameSize);
92 FrameSizeType GetInputFrameSize()
const;
98 virtual FrameSizeType GetOutputFrameSize()
const;
99 virtual PlusStatus GetOutputFrameSize(
unsigned int& _arg1,
unsigned int& _arg2,
unsigned int& _arg3)
const;
102 virtual void SetStartTime(
double startTime);
104 virtual double GetStartTime();
107 virtual int GetNumberOfItems();
119 virtual double GetFrameRate(
bool ideal =
false,
double* framePeriodStdevSecPtr = NULL);
127 virtual bool GetLatestItemHasValidVideoData();
130 virtual bool GetLatestItemHasValidTransformData();
133 virtual bool GetLatestItemHasValidFieldData();
150 virtual void Clear();
153 virtual PlusStatus WriteToSequenceFile(
const char* filename,
bool useCompression =
false);
156 virtual PlusStatus GetTimeStampReportTable(vtkTable* timeStampReportTable);
159 void SetTimeStampReporting(
bool enable);
161 bool GetTimeStampReporting();
169 virtual int GetBufferSize();
172 virtual ItemStatus GetLatestTimeStamp(
double& latestTimestamp);
175 virtual ItemStatus GetOldestTimeStamp(
double& oldestTimestamp);
181 virtual void SetLocalTimeOffsetSec(
double offsetSec);
183 virtual double GetLocalTimeOffsetSec();
191 virtual PlusStatus AddItem(vtkImageData* frame,
192 US_IMAGE_ORIENTATION usImageOrientation,
193 US_IMAGE_TYPE imageType,
195 double unfilteredTimestamp = UNDEFINED_TIMESTAMP,
196 double filteredTimestamp = UNDEFINED_TIMESTAMP,
197 const igsioFieldMapType* customFields = NULL);
205 virtual PlusStatus AddItem(
const igsioVideoFrame* frame,
207 double unfilteredTimestamp = UNDEFINED_TIMESTAMP,
208 double filteredTimestamp = UNDEFINED_TIMESTAMP,
209 const igsioFieldMapType* customFields = NULL);
219 virtual PlusStatus AddItem(
void* imageDataPtr,
220 US_IMAGE_ORIENTATION usImageOrientation,
221 const FrameSizeType& frameSizeInPx,
223 unsigned int numberOfScalarComponents,
224 US_IMAGE_TYPE imageType,
225 int numberOfBytesToSkip,
227 double unfilteredTimestamp = UNDEFINED_TIMESTAMP,
228 double filteredTimestamp = UNDEFINED_TIMESTAMP,
229 const igsioFieldMapType* customFields = NULL);
239 virtual PlusStatus AddItem(
void* imageDataPtr,
240 const FrameSizeType& frameSize,
241 unsigned int frameSizeInBytes,
242 US_IMAGE_TYPE imageType,
244 double unfilteredTimestamp = UNDEFINED_TIMESTAMP,
245 double filteredTimestamp = UNDEFINED_TIMESTAMP,
246 const igsioFieldMapType* customFields = NULL);
254 virtual PlusStatus AddItem(
const igsioFieldMapType& customFields,
long frameNumber,
double unfilteredTimestamp = UNDEFINED_TIMESTAMP,
double filteredTimestamp = UNDEFINED_TIMESTAMP);
261 PlusStatus AddTimeStampedItem(vtkMatrix4x4* matrix, ToolStatus status,
unsigned long frameNumber,
double unfilteredTimestamp,
double filteredTimestamp = UNDEFINED_TIMESTAMP,
const igsioFieldMapType* customFields = NULL);
269 vtkGetStdStringMacro(PortName);
271 PlusStatus SetPortName(
const std::string& portName);
280 PlusStatus SetNumberOfScalarComponents(
unsigned int numberOfScalarComponents);
282 virtual unsigned int GetNumberOfScalarComponents();
288 int GetNumberOfBytesPerPixel();
297 virtual PlusStatus SetInputImageOrientation(US_IMAGE_ORIENTATION imageOrientation);
302 virtual US_IMAGE_ORIENTATION GetInputImageOrientation();
308 virtual PlusStatus SetOutputImageOrientation(US_IMAGE_ORIENTATION imageOrientation);
309 virtual US_IMAGE_ORIENTATION GetOutputImageOrientation();
316 vtkGetMacroConst(FrameNumber,
unsigned long);
317 vtkSetMacro(FrameNumber,
unsigned long);
323 std::string GetCustomProperty(
const std::string& propertyName);
329 void SetCustomProperty(
const std::string& propertyName,
const std::string& propertyValue);
338 std::array<int, 3> GetClipRectangleSize()
const;
344 std::array<int, 3> GetClipRectangleOrigin()
const;
351 void SetClipRectangleSize(
const std::array<int, 3> _arg);
357 void SetClipRectangleOrigin(
const std::array<int, 3> _arg);
DataItemTemporalInterpolationType
Abstract interface for tracker and video devices.
std::string ReferenceCoordinateFrameName
static std::string DATA_SOURCE_TYPE_FIELDDATA_TAG
static std::string DATA_SOURCE_TYPE_VIDEO_TAG
FrameSizeType InputFrameSize
CustomPropertyMap CustomProperties
std::array< int, 3 > ClipRectangleSize
US_IMAGE_ORIENTATION InputImageOrientation
void SetDevice(vtkPlusDevice *_arg)
unsigned long FrameNumber
const char const char * value
static std::string DATA_SOURCE_TYPE_TOOL_TAG
vtkPlusDevice * GetDevice()
Direction vectors of rods y
std::array< int, 3 > ClipRectangleOrigin
unsigned long long BufferItemUidType
Interface to a 3D positioning tool, video source, or generalized data stream.