7 #include "PlusConfigure.h" 11 #include "vtkObjectFactory.h" 46 this->Superclass::PrintSelf(os, indent);
48 os << indent <<
"OutputImageExtent: (" 57 LOG_TRACE(
"vtkPlusUsScanConvert::ReadConfiguration");
58 XML_VERIFY_ELEMENT(scanConversionElement,
"ScanConversion");
60 const char* transducerGeometry = scanConversionElement->GetAttribute(
"TransducerGeometry");
61 if (transducerGeometry == NULL)
63 LOG_ERROR(
"Cannot read vtkPlusUsScanConvert configuration: TransducerGeometry is unknown");
68 LOG_ERROR(
"Cannot read vtkPlusUsScanConvert configuration: TransducerGeometry is expected to be " << this->
GetTransducerGeometry()
69 <<
", but found " << transducerGeometry <<
" instead");
73 XML_READ_CSTRING_ATTRIBUTE_OPTIONAL(
TransducerName, scanConversionElement);
75 double outputImageSpacing[2] = {0};
76 if (scanConversionElement->GetVectorAttribute(
"OutputImageSpacingMmPerPixel", 2, outputImageSpacing))
83 int outputImageSize[2] = {0};
84 if (scanConversionElement->GetVectorAttribute(
"OutputImageSizePixel", 2, outputImageSize))
94 double transducerCenterPixel[2] = {0};
95 if (scanConversionElement->GetVectorAttribute(
"TransducerCenterPixel", 2, transducerCenterPixel))
108 LOG_TRACE(
"vtkPlusUsScanConvert::WriteConfiguration");
110 XML_VERIFY_ELEMENT(scanConversionElement,
"ScanConversion");
113 scanConversionElement->SetAttribute(
"TransducerName", this->
TransducerName);
114 scanConversionElement->SetVectorAttribute(
"OutputImageSpacingMmPerPixel", 2, this->
OutputImageSpacing);
116 int outputImageSize[2] =
119 this->OutputImageExtent[3] - this->OutputImageExtent[2] + 1
121 scanConversionElement->SetVectorAttribute(
"OutputImageSizePixel", 2, outputImageSize);
double TransducerCenterPixel[2]
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *scanConversionElement)
bool TransducerCenterPixelSpecified
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual ~vtkPlusUsScanConvert()
double OutputImageSpacing[3]
virtual const char * GetTransducerGeometry()=0
virtual void SetTransducerName(const char *)
virtual FrameSizeType GetOutputImageSizePixel()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *scanConversionElement)