7 #include "PlusConfigure.h" 8 #include "vtkObjectFactory.h" 33 if (outputChannel != NULL && outputChannel->
GetRfProcessor() != NULL)
58 LOG_WARNING(
"vtkPlusVirtualMixer device " << this->
GetDeviceId() <<
" does not have any output channels");
59 vtkSmartPointer<vtkPlusChannel> aChannel = vtkSmartPointer<vtkPlusChannel>::New();
60 std::ostringstream ss;
61 ss <<
"aMixerId_" << vtkIGSIOAccurateTimer::GetSystemTime();
62 aChannel->SetChannelId(ss.str().c_str());
73 bool lowestRateKnown =
false;
74 double lowestRate = 30;
84 lowestRateKnown =
true;
90 lowestRateKnown =
true;
108 LOG_ERROR(
"No output channels defined");
115 outputChannel->
Clear();
137 if (anInputTool == anOutputTool)
140 LOG_ERROR(
"Tool already exists in the output stream. Somehow the same tool is part of two input streams. Consider using a virtual device to resolve them first.");
143 else if (anInputTool->GetId() == anOutputTool->GetId())
146 LOG_ERROR(
"Name collision! Two tools are outputting the same transform. Consider using a virtual device to resolve them first.");
153 outputChannel->
AddTool(anInputTool);
156 LOG_ERROR(
"Unable to add tool " << anInputTool->GetId() <<
" to device " << this->
GetDeviceId());
170 if (inputFieldSource == outputFieldSource)
173 LOG_ERROR(
"Field data source already exists in the output stream. Somehow the same data field is part of two input streams. Consider using a virtual device to resolve them first.");
176 else if (inputFieldSource->GetId() == outputFieldSource->GetId())
179 LOG_ERROR(
"Name collision! Two field sources are outputting the same data. Consider using a virtual device to resolve them first.");
189 LOG_ERROR(
"Unable to add field data source " << inputFieldSource->GetId() <<
" to device " << this->
GetDeviceId());
200 LOG_WARNING(
"Multiple RfProcessors defined in InputChannels to mixer: " << this->
GetDeviceId() <<
". Check input configuration.");
DataSourceContainer::const_iterator DataSourceContainerConstIterator
virtual vtkPlusRfProcessor * GetRfProcessor()
vtkStandardNewMacro(vtkPlusVirtualMixer)
static const int VIRTUAL_DEVICE_FRAME_RATE
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual double GetAcquisitionRate() const
PlusStatus AddVideoSource(vtkPlusDataSource *anImage)
bool HasVideoSource() const
Abstract interface for tracker and video devices.
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
DataSourceContainerConstIterator GetToolsEndConstIterator() const
ChannelContainer InputChannels
virtual std::string GetDeviceId() const
virtual bool IsTracker() const
PlusStatus AddTool(vtkPlusDataSource *tool, bool requireUniquePortName=true)
virtual PlusStatus Clear()
virtual ~vtkPlusVirtualMixer()
DataSourceContainerConstIterator GetFieldDataSourcesStartConstIterator() const
PlusStatus AddTool(vtkPlusDataSource *aTool)
virtual double GetAcquisitionRate() const
DataSourceContainerConstIterator GetFieldDataSourcesEndConstIterator() const
PlusStatus AddOutputChannel(vtkPlusChannel *aChannel)
DataSourceContainerConstIterator GetToolsStartConstIterator() const
virtual PlusStatus Reset()
PlusStatus AddFieldDataSource(vtkPlusDataSource *aSource)
virtual PlusStatus NotifyConfigured()
ChannelContainer::const_iterator ChannelContainerConstIterator
virtual void SetRfProcessor(vtkPlusRfProcessor *)
virtual bool IsTracker() const
#define XML_FIND_DEVICE_ELEMENT_REQUIRED_FOR_READING(deviceConfig, rootConfigElement)
vtkPlusChannel * GetChannel() const
PlusStatus RemoveFieldDataSources()
void SetVideoSource(vtkPlusDataSource *aSource)
virtual bool IsResettable()
Contains an optional timestamped circular buffer containing the video images and a number of timestam...
ChannelContainer OutputChannels
virtual PlusStatus Reset()
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
PlusStatus GetVideoSource(vtkPlusDataSource *&aVideoSource) const
ChannelContainer::iterator ChannelContainerIterator
vtkPlusDevice * GetOwnerDevice() const
PlusStatus AddFieldDataSource(vtkPlusDataSource *aSource)
virtual bool IsResettable()
Interface to a 3D positioning tool, video source, or generalized data stream.