10 #include "PlusConfigure.h" 16 #include <vtkImageData.h> 17 #include <vtkObjectFactory.h> 20 #include "i3system_TE.h" 31 this->RequireImageOrientationInConfiguration =
true;
32 this->StartThreadForInternalUpdates =
true;
44 this->Superclass::PrintSelf(os, indent);
46 os << indent <<
"InfraredTEQ1Cam: Pro Seek Camera" << std::endl;
53 LOG_DEBUG(
"Configure Thermal Expert Q1");
82 SCANINFO* pScan =
new SCANINFO[MAX_USB_NUM];
83 ScanTE(
nullptr, pScan);
85 for (
int i = 0;
i < MAX_USB_NUM;
i++)
95 if (this->device == -1)
97 LOG_ERROR(
"Thermal Expert Q1: camera not detected.");
101 this->pTE = OpenTE_B(
nullptr, I3_TE_Q1, this->device);
104 LOG_ERROR(
"Thermal Expert Q1: Failed to open.");
108 if (this->pTE->ReadFlashData() == 1)
110 int width = this->pTE->GetImageWidth();
111 int height = this->pTE->GetImageHeight();
118 LOG_ERROR(
"Thermal Expert Q1: Fail to Read Flash Data.");
127 this->pTE->CloseTE();
128 this->pImgBuf =
nullptr;
137 LOG_ERROR(
"vtkInfraredTEQ1Cam::InternalUpdate Unable to read date");
141 if (!this->pTE->RecvImage(this->pImgBuf))
143 LOG_ERROR(
"vtkInfraredTEQ1Cam::InternalUpdate Unable to receive frame");
147 pTE->CalcEntireTemp(this->pImgBuf,
false);
150 if (this->GetFirstActiveOutputVideoSource(aSource) ==
PLUS_FAIL || aSource ==
nullptr)
152 LOG_ERROR(
"Unable to grab a video source. Skipping frame.");
166 FrameSizeType frameSize = { static_cast<unsigned int>(this->
width), static_cast<unsigned int>(this->
height), 1 };
180 if (this->OutputChannels.size() > 1)
182 LOG_WARNING(
"vtkInfraredTEQ1Cam is expecting one output channel and there are " << this->OutputChannels.size() <<
" channels. First output channel will be used.");
185 if (this->OutputChannels.empty())
187 LOG_ERROR(
"No output channels defined for vtkInfraredTEQ1Cam. Cannot proceed.");
188 this->CorrectlyConfigured =
false;
#define XML_FIND_DEVICE_ELEMENT_REQUIRED_FOR_WRITING(deviceConfig, rootConfigElement)
virtual PlusStatus InternalDisconnect() VTK_OVERRIDE
PlusStatus SetInputFrameSize(unsigned int x, unsigned int y, unsigned int z)
virtual PlusStatus AddItem(vtkImageData *frame, US_IMAGE_ORIENTATION usImageOrientation, US_IMAGE_TYPE imageType, long frameNumber, double unfilteredTimestamp=UNDEFINED_TIMESTAMP, double filteredTimestamp=UNDEFINED_TIMESTAMP, const igsioFieldMapType *customFields=NULL)
PlusStatus SetImageType(US_IMAGE_TYPE imageType)
virtual PlusStatus InternalConnect() VTK_OVERRIDE
PlusStatus SetPixelType(igsioCommon::VTKScalarPixelType pixelType)
PlusStatus InternalUpdate()
PlusStatus WriteConfiguration(vtkXMLDataElement *config)
PlusStatus FreezeDevice(bool freeze)
vtkStandardNewMacro(vtkInfraredTEQ1Cam)
#define XML_FIND_DEVICE_ELEMENT_REQUIRED_FOR_READING(deviceConfig, rootConfigElement)
PhidgetLCD_Font int * width
Class for interfacing an Infrared Seek capture device and recording frames into a Plus buffer.
virtual US_IMAGE_ORIENTATION GetInputImageOrientation()
PhidgetLCD_Font int int * height
PlusStatus SetNumberOfScalarComponents(unsigned int numberOfScalarComponents)
PlusStatus ReadConfiguration(vtkXMLDataElement *config)
virtual PlusStatus NotifyConfigured()
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual int GetNumberOfItems()
Interface to a 3D positioning tool, video source, or generalized data stream.