Size: 3883
Comment:
|
← Revision 51 as of 2009-04-11 00:48:59 ⇥
Size: 3933
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 9: | Line 9: |
{{{ | {{{#!python |
Line 34: | Line 34: |
||<:>{{{test_image(8)}}}: Randomly rotated and translated scurve ||<:>{{{test_image(9)}}}: Scurve and Gaussian noise || | ||<:>{{{test_image(8)}}}: Randomly rotated, mirrored and translated scurve ||<:>{{{test_image(9)}}}: Scurve and Gaussian noise || |
Line 40: | Line 40: |
{{{ | {{{#!python |
Line 69: | Line 69: |
{{{ | {{{#!python |
Line 86: | Line 86: |
||{{{ e.process_inplace("testimage.gradient")}}}||{{{ e.process_inplace("testimage.gradient", {'axis','y'}) }}}|| | ||{{{ e.process_inplace("testimage.gradient")}}}||{{{ e.process_inplace("testimage.gradient", {'axis':'y'}) }}}|| |
Line 94: | Line 94: |
{{{ | {{{#!python |
Line 103: | Line 103: |
{{{ | {{{#!python |
Python test images
EMAN2 includes a good selection of test images. They come in many shapes and forms, from simple gradients and shapes to basic noise models.
test_image (2D)
At present there are 10 2D test images that are accessible using the test_image function, which is defined in EMAN2.py.
If you don't specify the size argument the returned image is 128x128. The following table shows each of the currently defined test_images.
|
|
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 random frequency line wave |
test_image(5): Axes |
|
|
test_image(6): Random frequency line wave |
test_image(7): Scurve and directional gradient |
|
|
test_image(8): Randomly rotated, mirrored and translated scurve |
test_image(9): Scurve and Gaussian noise |
test_image_3d (3D)
At present there are 6 3D test images that are accessible using the test_image_3d function, which is defined in EMAN2.py.
The following table shows the currently available 3D test images.
|
|
test_image_3d(0): Axes |
test_image_3d(1): Spherical waves |
|
|
test_image_3d(2): Tomography test image |
test_image_3d(3): Solid cube |
|
|
test_image_3d(4): Solid sphere |
test_image_3d(5): Rotated ellipse with holes |
Using the processor framework
2D
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:
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
You can write the image to disk if you need to:
Also, a great many of the test images work on 3D (and 1D) images, so feel free to play around.