7 #include "PlusConfigure.h" 10 #include "vtkObjectFactory.h" 14 #include "vtkImageData.h" 40 this->Superclass::PrintSelf(os,indent);
63 LOG_ERROR(
"Scan converter is not defined, skipping scan conversion");
83 if (scanConverter!=NULL)
93 XML_VERIFY_ELEMENT(rfProcessingElement,
"RfProcessing");
97 vtkXMLDataElement* brightnessConversionElement = rfProcessingElement->FindNestedElementWithName(
"RfToBrightnessConversion");
98 if (brightnessConversionElement)
107 vtkXMLDataElement* scanConversionElement = rfProcessingElement->FindNestedElementWithName(
"ScanConversion");
108 if (scanConversionElement != NULL)
110 const char* transducerGeometryStr = scanConversionElement->GetAttribute(
"TransducerGeometry");
111 if ( transducerGeometryStr != NULL)
120 vtkSmartPointer<vtkPlusUsScanConvertLinear> scanConvertLinear=vtkSmartPointer<vtkPlusUsScanConvertLinear>::New();
121 vtkSmartPointer<vtkPlusUsScanConvertCurvilinear> scanConvertCurvilinear=vtkSmartPointer<vtkPlusUsScanConvertCurvilinear>::New();
122 if (STRCASECMP(transducerGeometryStr, scanConvertLinear->GetTransducerGeometry())==0)
126 else if (STRCASECMP(transducerGeometryStr, scanConvertCurvilinear->GetTransducerGeometry())==0)
132 LOG_ERROR(
"Failed to create scan converter for geometry: "<<transducerGeometryStr);
144 LOG_ERROR(
"TransducerGeometry attribute of scan conversion is missing, no scan conversion will be performed");
151 LOG_WARNING(
"ScanConversion element is missing, no scan conversion will be performed");
165 XML_VERIFY_ELEMENT(rfElement,
"RfProcessing");
166 XML_FIND_NESTED_ELEMENT_CREATE_IF_MISSING(brightnessConversionElement, rfElement,
"RfToBrightnessConversion");
167 XML_FIND_NESTED_ELEMENT_CREATE_IF_MISSING(scanConversionElement, rfElement,
"ScanConversion");
185 scanConversionElement->SetAttribute(
"TransducerGeometry",
"UNKNOWN");
186 LOG_ERROR(
"Unknown transducer geometry");
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *rfElement)
vtkPlusRfToBrightnessConvert * RfToBrightnessConverter
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *scanConversionElement)
virtual void SetScanConverter(vtkPlusUsScanConvert *scanConverter)
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *rfToBrightnessElement)
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *rfElement)
virtual vtkImageData * GetBrightnessScanConvertedImage()
static vtkPlusRfToBrightnessConvert * New()
virtual ~vtkPlusRfProcessor()
virtual PlusStatus SetRfFrame(vtkImageData *rfFrame, US_IMAGE_TYPE imageType)
vtkStandardNewMacro(vtkPlusRfProcessor)
virtual void SetImageType(US_IMAGE_TYPE)
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *rfToBrightnessElement)
Convenience class to combine multiple algorithms to compute a displayable B-mode frame from RF data.
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual const char * GetTransducerGeometry()=0
static const char * GetRfProcessorTagName()
static const char * RF_PROCESSOR_TAG_NAME
This is a base class for defining a common scan conversion algorithm interface for all kinds of probe...
virtual vtkImageData * GetOutput()=0
virtual vtkImageData * GetBrightnessConvertedImage()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *scanConversionElement)
vtkPlusUsScanConvert * ScanConverter