def testCheckParameters(self): xsDataInput = XSDataInputMedianFilterImage() xsDataInput.setInputImage(XSDataImage()) xsDataInput.setFilterWidth(XSDataInteger(5)) edPluginExecMedianFilterImage = self.createPlugin() edPluginExecMedianFilterImage.setDataInput(xsDataInput) edPluginExecMedianFilterImage.checkParameters()
def fileName2xml(filename): """Here we create the XML string to be passed to the EDNA plugin from the input filename This can / should be modified by the final user @param filename: full path of the input file @type filename: python string representing the path @rtype: XML string @return: python string """ if not filename.endswith(".edf"): return basename = os.path.basename(filename) upperDir = os.path.dirname(os.path.dirname(filename)) if not os.path.isdir(os.path.join(upperDir, "MedianFiltered")): os.makedirs(os.path.join(upperDir, "MedianFiltered"), int("775", 8)) destinationPath = os.path.join(upperDir, "MedianFiltered", basename) xsd = XSDataInputMedianFilterImage() xsd.setFilterWidth(XSDataInteger(FilterWidth)) xsd.setInputImage(XSDataImage(XSDataString(filename))) xsd.setMedianFilteredImage(XSDataImage(XSDataString(destinationPath))) return xsd.marshal()