Skip to content

Create_phantom

Adrian Quintana edited this page Dec 11, 2017 · 1 revision

phantom_create

Purpose

This program allows you to generate 3D phantoms. Phantoms are Spider volumes defined in an artificial manner using a mathematical description, so the volume is a set of geometrical figures superposing (or not) each other in space. The corresponding Spider volume in voxels is generated for the description you give in the feature description file, which should have the structure shown before. As a general rule, you can think that the geometrical figures are first created in a canonical position and then moved and rotated to its final place in space.

Usage


$ phantom_create ...


Parameters

  • `` Phantom description file. The structure is as follows

Phantom description file, (generated with phantom help) # General Volume Parameters: # Xdim Ydim Zdim Background_Density Scale <back_den> # Feature Parameters: #Type +/= Density X_Center Y_Center Z_Center sph <+/=> blo <+/=> gau <+/=> cyl <+/=> dcy <+/=> cub <+/=> ell <+/=> con <+/=> Where:

    • sph sphere, with center at(x0,y0,z0) and radius in pixels[radius]
    • blo blob with center at(x0,y0,z0) and radius in pixels[radius], alpha is the tampering factor and order is the order of the Bessel functions (usually 2)
    • cyl cylinder, initially with base at planeXY and height inZ (-h/2 toh/2) and then it is moved to(x0,y0,z0) (its center) and rotated after(tilt,rot,psi)
    • dcy double cylinder, initially with base at planeXY and height inZ (-h/2 toh/2), then it is moved to(x0,y0,z0) and rotated after(tilt,rot,psi)
    • cub cube of size(xdim,ydim,zdim) whose center is moved to(x0,y0,z0) and rotated
    • ell ellipsoid with 3 radius and then moved and rotated
    • con cone, initially with base at planeXY and height inZ (-h/2 toh/2), and then the(0,0,0) point is moved to(x0,y0,z0) and rotated
    • + the features can overlap and add their densities at overlapping positions
    • === the overlapping positions will keep the last feature density
    • scale The scale is by default 1. This scale factor is a number which will multiply all features in order to reduce them (scale<1) or enlarge them (scale>1)
  • `` Output file

Examples and notes

  • Index symmetry Due to the Xmipp definition of center, volumes are symmetrical (with respect to the size, ie, are defined between-xi and+xi) for odd dimensions (for instance, 65x65x65, in this case the volume is defined between[-32,+32] for the three directions)
  • Euler angles Euler angles cause figures to be rotated, here you have some useful Euler combinations to make a cone (this figure has been selected as it seems to point in some direction) point in the given direction |Direction |rot |tilt |psi | | -X | 180 | 90 | 0 | | +X | 0 | 90 | 0 | | -Y | 270 | 90 | 0 | | +Y | 90 | 90 | 0 | | -Z | 0 | 180 | 0 | | +Z | 0 | 0 | 0 |
  • Difference with old Xmipp The corresponding program in the Old Xmipp is the program phantom. In that program the order for the angles ispsi,tilt,rot, while for the new one isrot,tilt,psi. This means that you have to reverse the angle order from one version to the other. Furthermore, you have to invert the sign of theY position and the rotational angle. Another change is that angles are now expressed in degrees and not in radians.

    Let's see an example, the ellipsoid in the Old Xmipp density x0 y0 z0 Xradius Yradius Zradius 3rd 2nd 1st

0001 e o 1.0 15.0 -25.9808 0.0 15.0 15.0 30.0 0.0 0.52 -1.047 must be translated as


                 density  x0       y0     z0 Xradius Yradius Zradius 1st  2nd    3rd
        ell    =    1     15    25.9808     0   15      15      30    -60   30      0 
   

Furthermore, radius units in the old phantom of Xmipp are half units, but for cylinders theZ radius is expressed in full units.

Here you have an example to generate a double ring of six spheres each one:

Filetwo_rings.descr:


# Phantom description file, (generated with phantom help) 
# General Volume Parameters: 
#      Xdim      Ydim      Zdim   Background
        65        65        65        0 
# Feature Parameters: 
#Type +/= Density X_Center Y_Center Z_Center Radius
# Bottom ring -----------------------------------------------------
 sph  +      1      15         0      -8.5      7.5
 sph  +      1       7.5      13      -8.5      7.5
 sph  +      1       7.5     -13      -8.5      7.5
 sph  +      1      -7.5      13      -8.5      7.5
 sph  +      1      -7.5     -13      -8.5      7.5
 sph  +      1     -15         0      -8.5      7.5
# Top ring --------------------------------------------------------
 sph  +      1      15         0       8.5      7.5
 sph  +      1       7.5      13       8.5      7.5
 sph  +      1       7.5     -13       8.5      7.5
 sph  +      1      -7.5      13       8.5      7.5
 sph  +      1      -7.5     -13       8.5      7.5
 sph  +      1     -15         0       8.5      7.5


The command to generate the volume would be


$ phantom_create -i two_rings.descr -o two_rings.vol 


--Main.AlfredoSolano - 29 Jan 2007

Clone this wiki locally