Exemple #1
0
 def _computeRightPreview(self):
     """ This function should compute the right preview
     using the self.lastObj that was selected
     """
     xmipp.fastEstimateEnhancedPSD(self.rightImage,
                                   self.lastObj.getFileName(),
                                   self.getDownsample(), self.dim, 2)
Exemple #2
0
def get_image_psd(request):
    """
    Function to get the computing psd image
    """
    imagePath = request.GET.get('image', None)
    downsample = request.GET.get('downsample', None)
    dim = request.GET.get('dim', None)
    
    # create a xmipp image empty
    imgXmipp = xmipp.Image()

    #    ** DEBUG **
#    print str(imagePath)
#    print float(downsample) 
#    print int(dim)

    # compute the PSD image
    xmipp.fastEstimateEnhancedPSD(imgXmipp, str(imagePath), 
                                  float(downsample), int(dim), 2)
    
    # from PIL import Image
    img = getPILImage(imgXmipp, dim)
       
    response = HttpResponse(mimetype="image/png")
    img.save(response, "PNG")
    return response
Exemple #3
0
 def _computeRightPreview(self):
     """ This function should compute the right preview
     using the self.lastObj that was selected
     """
     xmipp.fastEstimateEnhancedPSD(self.rightImage,
                                   self.lastObj.getFileName(),
                                   self.getDownsample(), self.dim, 2)