[3dem] Python function equivalent to MRC image2010 Irdpas

Jose Miguel de la Rosa Trevin jmdelarosa at cnb.csic.es
Fri Jul 15 15:18:29 PDT 2016


Dear John,

In Scipion we have an ImageHandler class that can be used to read/write
images/volumes inside stacks or in individual files.
After reading the image, there is a function getData that return a numpy
array that is very flexible in terms of indexing (which can be used for
cropping/extracting particles/volumes).

Recently we were integrating the Localized Reconstruction with Juha
Huiskonen and we develop a simple protocol to extract the subparticles from
the particles images. The code may serve to illustrate the usage of this
classes and its potential.

https://github.com/I2PC/scipion/blob/devel-localized-recons/pyworkflow/em/packages/opic/protocol_localized_extraction.py#L97

The main downside is that you need to install the whole Scipion framework
for just one desired Python function, which I understand that you will
prefer to be a self-contained independent function.

Hope this helps,
Kind regards,
Jose Miguel.


On Fri, Jul 15, 2016 at 11:24 PM, <john.rubinstein at utoronto.ca> wrote:

> Dear Colleagues,
>
> In order to save some coding, I am hoping that someone can point me to a
> Python function that is equivalent the MRC Image2010 subroutine Irdpas,
> which reads part of a section from an MRC format image stack. That is, I
> would like to specify a z-slice, a start point in x, an end point in x, a
> start point in y, and an end point in y, and have the function return a 2D
> array that contains the relevant portion of the specified slice. Any python
> code that extracts particles from movies should have this function. A more
> general function that extracts a volume from the stack/volume would also be
> great.
>
> Thanks in advance for any suggestions.
>
> Best regards,
> John
>
> --
> John Rubinstein
> Molecular Structure and Function Program
> The Hospital for Sick Children Research Institute
> 686 Bay Street, Rm. 20-9705
> Toronto, ON
> Canada
> M5G 0A4
> Tel: (+001) 416-813-7255
> Fax: (+001) 416-813-5022
> www.sickkids.ca/research/rubinstein
>
>
>
> _______________________________________________
> 3dem mailing list
> 3dem at ncmir.ucsd.edu
> https://mail.ncmir.ucsd.edu/mailman/listinfo/3dem
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ncmir.ucsd.edu/pipermail/3dem/attachments/20160716/74f98e7c/attachment.html>


More information about the 3dem mailing list