def testExecute(self): """ """ self.run() strExpectedOutput = self.readAndParseFile (self.getReferenceDataOutputFile()) strObtainedOutput = self.readAndParseFile (self.m_edObtainedOutputDataFile) EDVerbose.DEBUG("Checking obtained result...") xsDataResultReference = XSDataResultMedianFilter.parseString(strExpectedOutput) xsDataResultObtained = XSDataResultMedianFilter.parseString(strObtainedOutput) EDAssert.equal(xsDataResultReference.marshal(), xsDataResultObtained.marshal(), "Check if XSDataResult are exactly the same")
def postProcess(self, _edObject=None): EDPluginExec.postProcess(self) EDVerbose.DEBUG("EDPluginExecMedianFilterv1_0.postProcess") # Create some output data xsDataResult = XSDataResultMedianFilter() if self.outputImage is None: xsDataResult.setOutputArray(EDUtilsArray.arrayToXSData(self.outputArray)) else: edf = fabio.edfimage.edfimage(data=self.outputArray.astype("float32")) edf.write(self.outputImage) xsDataResult.setOutputImage(XSDataImage(XSDataString(self.outputImage))) self.setDataOutput(xsDataResult) self.outputArray = None
def testExecute(self): """ """ self.run() strExpectedOutput = self.readAndParseFile( self.getReferenceDataOutputFile()) strObtainedOutput = self.readAndParseFile( self.m_edObtainedOutputDataFile) EDVerbose.DEBUG("Checking obtained result...") xsDataResultReference = XSDataResultMedianFilter.parseString( strExpectedOutput) xsDataResultObtained = XSDataResultMedianFilter.parseString( strObtainedOutput) EDAssert.equal(xsDataResultReference.marshal(), xsDataResultObtained.marshal(), "Check if XSDataResult are exactly the same")