def testGenerateExecutiveSummary(self): """ This method tests the generateExecutiveSummary of the Labelit plugin. It contains no assert call so the contents of the executive summary is not tested. """ edPluginLabelitDistlv1_1 = self.createPlugin() xmlInput1 = self.readAndParseFile(self.__strReferenceInputFile1) edPluginLabelitDistlv1_1.setDataInput(xmlInput1, "referenceImage") strImageQualityIndicatorsFile = os.path.join(self.getPluginTestsDataHome(), "XSDataImageQualityIndicators_reference.xml") strImageQualityIndicatorsXML = self.readAndParseFile(strImageQualityIndicatorsFile) from XSDataPhenixv1_1 import XSDataImageQualityIndicators xsDataImageQualityIndicatorsReference = XSDataImageQualityIndicators.parseString(strImageQualityIndicatorsXML) edPluginLabelitDistlv1_1.setDataOutput(xsDataImageQualityIndicatorsReference, "imageQualityIndicators") edPluginLabelitDistlv1_1.generateExecutiveSummary(edPluginLabelitDistlv1_1)
def testParseLabelitDistlOutput(self): """ This method test the parsing of the Labelit results in the log file. """ edPluginLabelitDistlv1_1 = self.createPlugin() strPathToLabelitLogText = os.path.join(self.getPluginTestsDataHome(), "labelit.distl_v116.log") strLabelitLogText = self.readAndParseFile(strPathToLabelitLogText) xsDataImageQualityIndicators = edPluginLabelitDistlv1_1.parseLabelitDistlOutput(strLabelitLogText) xmlInput1 = self.readAndParseFile(self.__strReferenceInputFile1) xsDataImage1 = XSDataImage.parseString(xmlInput1) xsDataImageQualityIndicators.setImage(xsDataImage1) strLabelitDistlOutputFile = os.path.join(self.getPluginTestsDataHome(), "XSDataImageQualityIndicators_reference.xml") print strLabelitDistlOutputFile strLabelitDistlOutputXML = self.readAndParseFile(strLabelitDistlOutputFile) from XSDataPhenixv1_1 import XSDataImageQualityIndicators xsDataImageQualityIndicatorsReference = XSDataImageQualityIndicators.parseString(strLabelitDistlOutputXML) EDAssert.equal(xsDataImageQualityIndicatorsReference.marshal(), xsDataImageQualityIndicators.marshal())
def testGenerateExecutiveSummary(self): """ This method tests the generateExecutiveSummary of the Labelit plugin. It contains no assert call so the contents of the executive summary is not tested. """ edPluginLabelitDistlv1_1 = self.createPlugin() xmlInput1 = self.readAndParseFile(self.__strReferenceInputFile1) edPluginLabelitDistlv1_1.setDataInput(xmlInput1, "referenceImage") strImageQualityIndicatorsFile = os.path.join( self.getPluginTestsDataHome(), "XSDataImageQualityIndicators_reference.xml") strImageQualityIndicatorsXML = self.readAndParseFile( strImageQualityIndicatorsFile) from XSDataPhenixv1_1 import XSDataImageQualityIndicators xsDataImageQualityIndicatorsReference = XSDataImageQualityIndicators.parseString( strImageQualityIndicatorsXML) edPluginLabelitDistlv1_1.setDataOutput( xsDataImageQualityIndicatorsReference, "imageQualityIndicators") edPluginLabelitDistlv1_1.generateExecutiveSummary( edPluginLabelitDistlv1_1)
def testParseLabelitDistlOutput(self): """ This method test the parsing of the Labelit results in the log file. """ edPluginLabelitDistlv1_1 = self.createPlugin() strPathToLabelitLogText = os.path.join(self.getPluginTestsDataHome(), "labelit.distl_v116.log") strLabelitLogText = self.readAndParseFile(strPathToLabelitLogText) xsDataImageQualityIndicators = edPluginLabelitDistlv1_1.parseLabelitDistlOutput( strLabelitLogText) xmlInput1 = self.readAndParseFile(self.__strReferenceInputFile1) xsDataImage1 = XSDataImage.parseString(xmlInput1) xsDataImageQualityIndicators.setImage(xsDataImage1) strLabelitDistlOutputFile = os.path.join( self.getPluginTestsDataHome(), "XSDataImageQualityIndicators_reference.xml") print strLabelitDistlOutputFile strLabelitDistlOutputXML = self.readAndParseFile( strLabelitDistlOutputFile) from XSDataPhenixv1_1 import XSDataImageQualityIndicators xsDataImageQualityIndicatorsReference = XSDataImageQualityIndicators.parseString( strLabelitDistlOutputXML) EDAssert.equal(xsDataImageQualityIndicatorsReference.marshal(), xsDataImageQualityIndicators.marshal())