コード例 #1
0
    def _run(self, protocol, request):
        params = self._getParameters(protocol)
        objs = params['input'].get()

        res = validateParticles(objs)

        if res is not 1:
            return HttpResponse(res)
        else:
            particles = self._getParticles(objs)

            if len(particles) == 0:
                return HttpResponse("errorIterate")
            removeExt
            xdim = getImageXdim(request, particles[0].text)

            params['value'] = validateMaskRadius(params['value'],
                                                 xdim,
                                                 radius=2)

            context = {
                'objects': particles,
                'xdim': xdim / 2,
                'params': params
            }

            context = base_wiz(request, context)
            return render_to_response('wizards/wiz_particles_mask_radii.html',
                                      context)
コード例 #2
0
    def _run(self, protocol, request):
        params = self._getParameters(protocol)
        obj = params['input'].get()

        if obj is None:
            return HttpResponse("errorInput")
        else:
            # Single particle
            particle = obj.clone()
            particle.text = particle.getFileName()
            particle.basename = basename(particle.text)

            xdim = getImageXdim(request, particle.text)

            context = {'obj': particle, 'xdim': xdim, 'params': params}

            context = base_wiz(request, context)

            return render_to_response('wizards/wiz_custom_mask_spider.html',
                                      context)
コード例 #3
0
ファイル: spider_wizard.py プロジェクト: I2PC/scipion
 def _run(self, protocol, request):
     params = self._getParameters(protocol)
     obj = params['input'].get()
     
     if obj is None:
         return HttpResponse("errorInput")
     else:
         # Single particle
         particle = obj.clone()
         particle.text = particle.getFileName()
         particle.basename = basename(particle.text)
                 
         xdim = getImageXdim(request, particle.text)
 
         context = {'obj': particle,
                    'xdim':xdim,
                    'params': params }
     
         context = base_wiz(request, context)
         
         return render_to_response('wizards/wiz_custom_mask_spider.html', context)    
コード例 #4
0
ファイル: spider_wizard.py プロジェクト: I2PC/scipion
    def _run(self, protocol, request):
        params = self._getParameters(protocol)
        objs = params['input'].get()
        
        res = validateParticles(objs) 
        
        if res is not 1:
            return HttpResponse(res)
        else:
            particles = self._getParticles(objs)
            
            if len(particles) == 0:
                return HttpResponse("errorIterate")
            removeExt
            xdim = getImageXdim(request, particles[0].text)

            params['value'] = validateMaskRadius(params['value'], xdim, radius=2)               
            
            context = {'objects': particles,
                       'xdim':xdim/2,
                       'params': params }
        
            context = base_wiz(request, context)
            return render_to_response('wizards/wiz_particles_mask_radii.html', context)