1909
Comment:
|
2695
|
Deletions are marked like this. | Additions are marked like this. |
Line 9: | Line 9: |
{{{ #] e2.py Welcome to EMAN2 Prompt provided by IPython Enter '?' for ipython help In [3]: e = test_image(0,size=(256,256)) In [4]: display(e) }}} ||{{attachment:test_0.png}} ||{{attachment:test_1.png}}|| || test_image(0): The EMAN scurve || test_image(1): Gaussian noise || ||{{attachment:test_2.png}} ||{{attachment:test_3.png}}|| || test_image(2): Dark square || test_image(3): Light square || ||{{attachment:test_4.png}} ||{{attachment:test_5.png}}|| || test_image(4): Scurve and line wave || test_image(5): Axes || ||{{attachment:test_6.png}} ||{{attachment:test_7.png}}|| || test_image(6): Line wave || test_image(7) : Scurve and directional gradient || ||{{attachment:test_8.png}} ||{{attachment:test_9.png}}|| || test_image(8) || test_image(9) || |
2D
EMAN2 includes a good selection of test images that can be generated in no time at all. They come in many shapes and forms, from simple gradients and shapes to basic noise models.
Using the test_image function in Python
At present there are 10 2D test images that are accessible using the test_image function, which is defined in EMAN2.py.
#] e2.py Welcome to EMAN2 Prompt provided by IPython Enter '?' for ipython help In [3]: e = test_image(0,size=(256,256)) In [4]: display(e)
|
|
test_image(0): The EMAN scurve |
test_image(1): Gaussian noise |
|
|
test_image(2): Dark square |
test_image(3): Light square |
|
|
test_image(4): Scurve and line wave |
test_image(5): Axes |
|
|
test_image(6): Line wave |
test_image(7) : Scurve and directional gradient |
|
|
test_image(8) |
test_image(9) |
Using the processor framework
To create a test image using the processor framework start by running e2.py and by creating an empty image that is appropriately sized, for example as follows:
#] e2.py Welcome to EMAN2 Prompt provided by IPython Enter '?' for ipython help In [3]: e = EMData() In [4]: e.set_size(256,256)
Then issue one of the commands shown below in the table to generate the test image
|
|
e.process_inplace("testimage.gradient") |
e.process_inplace("testimage.gradient", {'axis','y'}) |
|
|
e.process_inplace("testimage.axes") |
e.process_inplace("testimage.circlesphere") |
|
|
e.process_inplace("testimage.scurve") |
e.process_inplace("testimage.noise.gauss") |
Note that this is not all of the test images, and that you can get a complete list by typying e2help.py processors on the command prompt (or see http://blake.bcm.edu/eman2/processors.html). Finally, you can display the image
In [5]: e.process_inplace("testimage.scurve") In [6]: display(e)
You can write the image to disk if you need to:
In [7]: e.write_image("scurve.img") In [8]: e.write_image("scurve.mrc")
Also, a great many of the test images work on 3D (and 1D) images, so feel free to play around.
3D
To come