本文整理匯總了Python中XSDataCommon.XSDataImage.parseString方法的典型用法代碼示例。如果您正苦於以下問題:Python XSDataImage.parseString方法的具體用法?Python XSDataImage.parseString怎麽用?Python XSDataImage.parseString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XSDataCommon.XSDataImage
的用法示例。
在下文中一共展示了XSDataImage.parseString方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: doSuccessGeneratePrediction
# 需要導入模塊: from XSDataCommon import XSDataImage [as 別名]
# 或者: from XSDataCommon.XSDataImage import parseString [as 別名]
def doSuccessGeneratePrediction(self, _edPlugin=None):
self.DEBUG("EDPluginControlGeneratePredictionv10.doSuccessGeneratePrediction")
self.retrieveSuccessMessages(_edPlugin, "EDPluginControlGeneratePredictionv10.doSuccessGeneratePrediction")
if (self.__xsDataGeneratePredictionResult is None):
self.__xsDataGeneratePredictionResult = XSDataGeneratePredictionResult()
xsDataMOSFLMOutputGeneratePrediction = _edPlugin.getDataOutput()
xsDataImage = xsDataMOSFLMOutputGeneratePrediction.getPredictionImage()
self.__xsDataGeneratePredictionResult.addPredictionImage(XSDataImage.parseString(xsDataImage.marshal()))
示例2: preProcess
# 需要導入模塊: from XSDataCommon import XSDataImage [as 別名]
# 或者: from XSDataCommon.XSDataImage import parseString [as 別名]
def preProcess(self, _edObject=None):
"""
Gets the Configuration Parameters, if found, overrides default parameters
"""
EDPluginControl.preProcess(self, _edObject)
self.DEBUG("EDPluginControlGeneratePredictionv10.preProcess...")
xsDataGeneratePredictionInput = self.getDataInput()
xsDataSelectedIndexingSolution = xsDataGeneratePredictionInput.getSelectedIndexingSolution()
xsDataExperimentalConditionRefined = xsDataSelectedIndexingSolution.getExperimentalConditionRefined()
xsDataCollection = xsDataGeneratePredictionInput.getDataCollection()
xsDataSubWedgeList = xsDataCollection.getSubWedge()
# List containing instances of all the generate prediction plugins
self.__listPluginGeneratePrediction = []
# Loop through all subwedges
iIndex = 0
for xsDataSubWedge in xsDataSubWedgeList:
xsDataImageList = xsDataSubWedge.getImage()
# First find the lowest image number
iLowestImageNumber = None
for xsDataImage in xsDataImageList:
iImageNumber = xsDataImage.getNumber().getValue()
if (iLowestImageNumber is None):
iLowestImageNumber = iImageNumber
elif (iImageNumber < iLowestImageNumber):
iLowestImageNumber = iImageNumber
# Then loop through all images in a sub wedge
for xsDataImage in xsDataImageList:
iIndex += 1
edPluginGeneratePrediction = self.loadPlugin(self.__strPluginGeneratePredictionName,
"%s-%02d" % (self.__strPluginGeneratePredictionName, iIndex))
xsDataGeneratePredictionInput = XSDataGeneratePredictionInput()
xsDataGeneratePredictionInput.setSelectedIndexingSolution(XSDataIndexingSolutionSelected.parseString(xsDataSelectedIndexingSolution.marshal()))
xsDataCollectionNew = XSDataCollection()
xsDataSubWedgeNew = XSDataSubWedge()
xsDataSubWedgeNew.addImage(XSDataImage.parseString(xsDataImage.marshal()))
xsDataSubWedgeNew.setExperimentalCondition(XSDataExperimentalCondition.parseString(xsDataSubWedge.getExperimentalCondition().marshal()))
# We must modify the rotationOscillationStart for the new subwedge
xsDataGoniostatNew = xsDataSubWedgeNew.getExperimentalCondition().getGoniostat()
fGoniostatRotationAxisStart = xsDataGoniostatNew.getRotationAxisStart().getValue()
fGonioStatOscillationRange = xsDataGoniostatNew.getOscillationWidth().getValue()
iImageNumber = xsDataImage.getNumber().getValue()
fGoniostatRotationAxisStartNew = fGoniostatRotationAxisStart + (iImageNumber - iLowestImageNumber) * fGonioStatOscillationRange
xsDataGoniostatNew.setRotationAxisStart(XSDataAngle(fGoniostatRotationAxisStartNew))
#
xsDataCollectionNew.addSubWedge(xsDataSubWedgeNew)
xsDataGeneratePredictionInput.setDataCollection(xsDataCollectionNew)
from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10
xsDataMOSFLMInputGeneratePrediction = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputGeneratePrediction(xsDataGeneratePredictionInput)
edPluginGeneratePrediction.setDataInput(xsDataMOSFLMInputGeneratePrediction)
self.__listPluginGeneratePrediction.append(edPluginGeneratePrediction)
示例3: generateListXSDataImageReference
# 需要導入模塊: from XSDataCommon import XSDataImage [as 別名]
# 或者: from XSDataCommon.XSDataImage import parseString [as 別名]
def generateListXSDataImageReference(_xsDataIndexingInput):
listXSDataImageReference = []
xsDataCollection = _xsDataIndexingInput.getDataCollection()
xsDataSubWedgeList = xsDataCollection.getSubWedge()
xsDataImageFirst = xsDataSubWedgeList[0].getImage()[0]
listXSDataImageReference.append(XSDataImage.parseString(xsDataImageFirst.marshal()))
fPhiStartFirst = xsDataSubWedgeList[0].getExperimentalCondition().getGoniostat().getRotationAxisStart().getValue()
if (len(xsDataSubWedgeList) > 1):
xsDataImageSecond = xsDataSubWedgeList[-1].getImage()[0]
fPhiStartSecond = xsDataSubWedgeList[-1].getExperimentalCondition().getGoniostat().getRotationAxisStart().getValue()
# Add modulus!
if (abs(fPhiStartSecond - fPhiStartFirst) > 4):
listXSDataImageReference.append(XSDataImage.parseString(xsDataImageSecond.marshal()))
return listXSDataImageReference
示例4: generateImageList
# 需要導入模塊: from XSDataCommon import XSDataImage [as 別名]
# 或者: from XSDataCommon.XSDataImage import parseString [as 別名]
def generateImageList(self, _xsDataCollection):
"""
Make a list of all images in the subwedges
"""
self.verboseDebug("EDPluginControlIndexingIndicatorsv1_1.generateImageList")
listImage = None
if (_xsDataCollection is not None):
listImage = []
xsDataSubWedgeList = _xsDataCollection.getSubWedge()
for xsDataSubWedge in xsDataSubWedgeList:
xsDataImageList = xsDataSubWedge.getImage()
for xsDataImage in xsDataImageList:
listImage.append(XSDataImage.parseString(xsDataImage.marshal()))
return listImage
示例5: testParseLabelitDistlOutput
# 需要導入模塊: from XSDataCommon import XSDataImage [as 別名]
# 或者: from XSDataCommon.XSDataImage import parseString [as 別名]
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")
strLabelitDistlOutputXML = self.readAndParseFile(strLabelitDistlOutputFile)
from XSDataLabelitv1_1 import XSDataImageQualityIndicators
xsDataImageQualityIndicatorsReference = XSDataImageQualityIndicators.parseString(strLabelitDistlOutputXML)
EDAssert.equal(xsDataImageQualityIndicatorsReference.marshal(), xsDataImageQualityIndicators.marshal())