Exemplo n.º 1
0
    def _insertAllSteps(self):
        importFrom = self.importFrom.get()
        ci = self.getImportClass()

        if ci is None:
            ProtImportImages._insertAllSteps(self)
        else:
            self._insertFunctionStep('importParticlesStep', importFrom,
                                     self.importFilePath)
Exemplo n.º 2
0
 def _insertAllSteps(self):
     importFrom = self.importFrom.get()
     ci = self.getImportClass()
     
     if ci is None:
         ProtImportImages._insertAllSteps(self)
     else:
         self._insertFunctionStep('importParticlesStep', importFrom,
                                  self.importFilePath)
Exemplo n.º 3
0
 def _getImportChoices(self):
     """ Return a list of possible choices
     from which the import can be done.
     (usually packages formas such as: xmipp3, eman2, relion...etc.
     """
     choices = ProtImportImages._getImportChoices(self)
     return choices + ['emx', 'xmipp3', 'scipion']
Exemplo n.º 4
0
 def _getImportChoices(self):
     """ Return a list of possible choices
     from which the import can be done.
     (usually packages formas such as: xmipp3, eman2, relion...etc.
     """
     choices = ProtImportImages._getImportChoices(self)
     return choices
Exemplo n.º 5
0
    def _defineAcquisitionParams(self, form):
        group = ProtImportImages._defineAcquisitionParams(self, form)

        group.addParam(
            'samplingRateMode',
            params.EnumParam,
            choices=[Message.LABEL_SAMP_MODE_1, Message.LABEL_SAMP_MODE_2],
            default=SAMPLING_FROM_IMAGE,
            label=Message.LABEL_SAMP_MODE,
            help=Message.TEXT_SAMP_MODE)

        group.addParam('samplingRate',
                       params.FloatParam,
                       default=1.0,
                       condition='samplingRateMode==%d' % SAMPLING_FROM_IMAGE,
                       label=Message.LABEL_SAMP_RATE,
                       help=Message.TEXT_SAMP_RATE)

        group.addParam('scannedPixelSize',
                       params.FloatParam,
                       default=7.0,
                       condition='samplingRateMode==%d' %
                       SAMPLING_FROM_SCANNER,
                       label=Message.LABEL_SCANNED,
                       help='')
        return group
Exemplo n.º 6
0
 def _getImportChoices(self):
     """ Return a list of possible choices
     from which the import can be done.
     (usually packages formas such as: xmipp3, eman2, relion...etc.
     """
     choices = ProtImportImages._getImportChoices(self)
     return choices + ['emx', 'xmipp3', 'relion', 'scipion', 'frealign']#the order of this list is related to the constants defined
Exemplo n.º 7
0
 def _defineAcquisitionParams(self, form):
     form.addParam('samplingRate',
                   params.FloatParam,
                   default=1.,
                   label=Message.LABEL_SAMP_RATE)
     group = ProtImportImages._defineAcquisitionParams(self, form)
     group.expertLevel.set(LEVEL_ADVANCED)
Exemplo n.º 8
0
 def _defineAcquisitionParams(self, form):
     form.addParam('samplingRate', params.FloatParam, default=1.,
                label=Message.LABEL_SAMP_RATE)
     group = ProtImportImages._defineAcquisitionParams(self, form)
     group.expertLevel.set(LEVEL_ADVANCED)
     
     # Change some params properties
     patternParam = form.getParam('filesPattern')
     patternParam.condition.set('0')
Exemplo n.º 9
0
 def _getImportChoices(self):
     """ Return a list of possible choices
     from which the import can be done.
     (usually packages formas such as: xmipp3, eman2, relion...etc.
     """
     choices = ProtImportImages._getImportChoices(self)
     # Do not change the order of this list since
     # it is related to the constants defined
     return choices + self.importFormats
Exemplo n.º 10
0
 def _getImportChoices(self):
     """ Return a list of possible choices
     from which the import can be done.
     (usually packages formas such as: xmipp3, eman2, relion...etc.
     """
     choices = ProtImportImages._getImportChoices(self)
     return choices + [
         'emx', 'xmipp3', 'relion', 'scipion', 'frealign'
     ]  #the order of this list is related to the constants defined
Exemplo n.º 11
0
 def _getImportChoices(self):
     """ Return a list of possible choices
     from which the import can be done.
     (usually packages formas such as: xmipp3, eman2, relion...etc.
     """
     choices = ProtImportImages._getImportChoices(self)
     # Do not change the order of this list since
     # it is related to the constants defined
     return choices + self.importFormats
Exemplo n.º 12
0
 def _validate(self):
     ci = self.getImportClass()
     if ci is None:
         return ProtImportImages._validate(self)
     else:
         errors = self._validateFileExtension()
         if errors:
             return errors
         else:
             return ci.validateParticles()
Exemplo n.º 13
0
 def _validate(self):
     ci = self.getImportClass()
     if ci is None:
         return ProtImportImages._validate(self)
     else:
         errors = self._validateFileExtension()
         if errors:
             return errors
         else:
             return ci.validateParticles()
Exemplo n.º 14
0
 def _defineAcquisitionParams(self, form):
     group = ProtImportImages._defineAcquisitionParams(self, form)
     group.addParam('samplingRateMode', EnumParam, 
                    choices=[Message.LABEL_SAMP_MODE_1, Message.LABEL_SAMP_MODE_2],
                    default=SAMPLING_FROM_IMAGE,
                    label=Message.LABEL_SAMP_MODE,
                    help=Message.TEXT_SAMP_MODE)
     group.addParam('samplingRate', FloatParam,  default=1.0,
                    condition='samplingRateMode==%d' % SAMPLING_FROM_IMAGE, 
                    label=Message.LABEL_SAMP_RATE,
                    help=Message.TEXT_SAMP_RATE)
     group.addParam('scannedPixelSize', FloatParam, default=7.0,
                    condition='samplingRateMode==%d' % SAMPLING_FROM_SCANNER,
                    label=Message.LABEL_SCANNED,
                    help='')
     return group
Exemplo n.º 15
0
    def loadAcquisitionInfo(self):
        """ Return a proper acquistionInfo (dict)
        or an error message (str).
        """
        if self.importFrom != self.IMPORT_FROM_FILES:
            return ProtImportImages.loadAcquisitionInfo(self)

        result = "Could not find acquistion information"

        for fileName, fileId in self.iterFiles():
            baseName = pwutils.removeExt(fileName)
            xml1 = baseName.replace('_frames', '.xml')
            if os.path.exists(xml1):
                result = self._parseXML(xml1)
            else:
                xml2 = baseName + '.xml'
                result = self._parseXML(xml2)

        return result
Exemplo n.º 16
0
    def loadAcquisitionInfo(self):
        """ Return a proper acquistionInfo (dict)
        or an error message (str).
        """
        if self.importFrom != self.IMPORT_FROM_FILES:
            return ProtImportImages.loadAcquisitionInfo(self)

        result = "Could not find acquistion information"

        for fileName, fileId in self.iterFiles():
            baseName = pwutils.removeExt(fileName)
            xml1 = baseName.replace('_frames', '.xml')
            if os.path.exists(xml1):
                result = self._parseXML(xml1)
            else:
                xml2 = baseName + '.xml'
                result = self._parseXML(xml2)

        return result
Exemplo n.º 17
0
    def _validate(self):
        errors = ProtImportImages._validate(self)

        errors += self._validateBlacklist()

        return errors
Exemplo n.º 18
0
 def _summary(self):
     if self.importFrom == self.IMPORT_FROM_FILES:
         return ProtImportImages._summary(self)
     else:
         return [self.summaryVar.get('')]
Exemplo n.º 19
0
 def _defineParams(self, form):
     ProtImportImages._defineParams(self, form)
Exemplo n.º 20
0
 def _defineAcquisitionParams(self, form):
     group = ProtImportImages._defineAcquisitionParams(self, form)
     group.addParam('samplingRate',
                    params.FloatParam,
                    label=Message.LABEL_SAMP_RATE)
Exemplo n.º 21
0
 def _defineAcquisitionParams(self, form):
     form.addParam('samplingRate', params.FloatParam, default=1.,
                label=Message.LABEL_SAMP_RATE)
     group = ProtImportImages._defineAcquisitionParams(self, form)
     group.expertLevel.set(LEVEL_ADVANCED)
Exemplo n.º 22
0
 def _summary(self):
     if self.importFrom == self.IMPORT_FROM_FILES:
         return ProtImportImages._summary(self)
     else:
         return [self.summaryVar.get('')]
Exemplo n.º 23
0
 def __init__(self, **args):
     ProtImportImages.__init__(self, **args)         
Exemplo n.º 24
0
 def _defineAcquisitionParams(self, form):
     group = ProtImportImages._defineAcquisitionParams(self, form)
     group.addParam('samplingRate', params.FloatParam,
                label=Message.LABEL_SAMP_RATE)
Exemplo n.º 25
0
 def _validate(self):
     ci = self.getImportClass()
     if ci is None:
         return ProtImportImages._validate(self)
     else:
         return ci.validateParticles()
Exemplo n.º 26
0
 def _validate(self):
     ci = self.getImportClass()
     if ci is None:
         return ProtImportImages._validate(self)
     else:
         return ci.validateParticles()
Exemplo n.º 27
0
 def __init__(self, **args):
     ProtImportImages.__init__(self, **args)
Exemplo n.º 28
0
 def _defineParams(self, form):
     ProtImportImages._defineParams(self, form)