7 #include "PlusConfigure.h" 12 #include "vtkImageData.h" 13 #include "vtkDICOMImageReader.h" 14 #include "vtkObjectFactory.h" 17 #include "vtkIGSIOTrackedFrameList.h" 20 #include <vtkImageFlip.h> 21 #include <vtkPointData.h> 22 #include <vtkDirectory.h> 30 : CompressRawData(false)
31 , RawDataLastNSeconds(-1.0)
60 desc +=
": Acquire the raw data from the Clarius. The data will be saved in the output directory as a .tar";
99 std::string
string = ss.str();
100 aConfig->SetAttribute(
"RawDataLastNSeconds",
string.c_str());
107 LOG_DEBUG(
"vtkPlusClariusCommand::Execute: " << (!this->
Name.empty() ? this->
Name :
"(undefined)")
110 if (this->
Name.empty())
117 if (clariusDevice == NULL)
126 LOG_INFO(
"Acquiring the raw data from Clarius: Device ID: " << this->GetClariusDeviceId());
128 if (!this->GetOutputFilename().empty())
130 clariusDevice->SetRawDataOutputFilename(this->GetOutputFilename());
146 if (dataCollector == NULL)
148 LOG_ERROR(
"Data collector is invalid");
151 if (!GetClariusDeviceId().empty())
157 LOG_ERROR(
"No Clarius device has been found by the name " << this->GetClariusDeviceId());
162 if (ClariusDevice == NULL)
165 LOG_ERROR(
"The specified device " << GetClariusDeviceId() <<
" is not Clarius Device");
168 return ClariusDevice;
176 if (ClariusDevice != NULL)
180 return ClariusDevice;
183 LOG_ERROR(
"No Clarius Device has been found");
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual void PrintSelf(ostream &os, vtkIndent indent)
Abstract interface for tracker and video devices.
std::vector< vtkPlusDevice * >::const_iterator DeviceCollectionConstIterator
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *aConfig)
vtkStandardNewMacro(vtkPlusClariusCommand)
virtual void SetCompressRawData(bool)
std::string OutputFilename
virtual std::string GetDescription(const std::string &commandName)
PlusStatus GetDevice(vtkPlusDevice *&aDevice, const std::string &aDeviceId) const
virtual ~vtkPlusClariusCommand()
static vtkPlusClarius * SafeDownCast(vtkObject *o)
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *aConfig)
virtual std::string GetDeviceId() const
void SetNameToSaveRawData()
std::string ClariusDeviceId
static const std::string SAVE_CLARIUS_RAW_DATA_CMD
DeviceCollectionConstIterator GetDeviceConstIteratorBegin() const
virtual void GetCommandNames(std::list< std::string > &cmdNames)
DeviceCollectionConstIterator GetDeviceConstIteratorEnd() const
Manages devices that record image or positional data.
PlusStatus RequestLastNSecondsRawData(double lastNSeconds)
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *aConfig)
vtkPlusClarius * GetClariusDevice()
void QueueCommandResponse(PlusStatus status, const std::string &message, const std::string &error="", const igtl::MessageBase::MetaDataMap *metaData=nullptr)
virtual bool GetCompressRawData()
virtual vtkPlusDataCollector * GetDataCollector()
This command reconstructs a volume from an image sequence and saves it to disk or sends it to the cli...
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *aConfig)
virtual double GetRawDataLastNSeconds()
Interface to the Clarius ultrasound scans This class talks with a Clarius Scanner over the Clarius AP...
double RawDataLastNSeconds
virtual PlusStatus Execute()