Ejemplo n.º 1
0
 def _loadInputInfo(self):
     from pyworkflow.em.packages.xmipp3 import getImageLocation
     
     reference = self.input3DReferences.get() # Input can be either a single volume or a set of volumes.
     
     if isinstance(reference, Volume): # Treat the case of a single volume
         self.referenceFileNames = [getImageLocation(reference)]
     else:
         self.referenceFileNames = [getImageLocation(vol) for vol in reference]
         
     self.numberOfReferences = len(self.referenceFileNames)
     self.resolSam = reference.getSamplingRate()
Ejemplo n.º 2
0
 def _loadInputInfo(self):
     from pyworkflow.em.packages.xmipp3 import getImageLocation
     
     reference = self.input3DReferences.get() # Input can be either a single volume or a set of volumes.
     
     if isinstance(reference, Volume): # Treat the case of a single volume
         self.referenceFileNames = [getImageLocation(reference)]
     else:
         self.referenceFileNames = [getImageLocation(vol) for vol in reference]
         
     self.numberOfReferences = len(self.referenceFileNames)
     self.resolSam = reference.getSamplingRate()
Ejemplo n.º 3
0
 def createCircularMask(self, radius, refImage, outputFile):
     """ Create a circular mask with the given radius (pixels)
     and with the same dimensions of the refImage.
     The radius should be less or equal dim(refImage)/2
     The mask will be stored in 'outputFile'
     """
     #TODO: right now we need to call an xmipp program to create 
     # the spherical mask, it would be nicer to have such utility in the binding
     import pyworkflow.em.packages.xmipp3 as xmipp3
     inputRef = xmipp3.getImageLocation(refImage)
     self.__runXmippProgram('xmipp_transform_mask', 
                            '-i %s --create_mask  %s --mask circular -%d' % (inputRef, outputFile, radius))