Example #1
0
 def _computeRightPreview(self):
     """ This function should compute the right preview
     using the self.lastObj that was selected
     """
     from pyworkflow.em.packages.xmipp3.convert import getImageLocation
     xmipp.gaussianFilter(self.rightImage, getImageLocation(self.lastObj),
                          self.getFreqSigma(), self.dim)
Example #2
0
 def _computeRightPreview(self):
     """ This function should compute the right preview
     using the self.lastObj that was selected
     """
     from pyworkflow.em.packages.xmipp3.convert import getImageLocation
     xmipp.gaussianFilter(self.rightImage, getImageLocation(self.lastObj),
                          self.getFreqSigma(), self.dim)
Example #3
0
def get_image_gaussian(request):
    """
    Function to get the computing image with a gaussian filter applied
    """
    imagePath = request.GET.get('image', None)
    freqSigma = request.GET.get('sigmaFreq', None)
    dim = request.GET.get('dim', None)
    
    # create a xmipp image empty
    imgXmipp = xmipp.Image()
    
    # compute the Gaussian Filter in the image
    xmipp.gaussianFilter(imgXmipp, str(imagePath), float(freqSigma), int(dim))
    # from PIL import Image
    img = getPILImage(imgXmipp, dim)
        
    response = HttpResponse(mimetype="image/png")
    img.save(response, "PNG")
    return response