PT - Create Pattern or mask image

(2/15/14)

PURPOSE

Using 'PT' you are able to create a 2D pattern or mask file (consisting of 0's and 1's) by combining sets of elementary patterns. Elementary patterns available are: Points, Lines, Circles, Triangles, and Boxes. These elementary patterns can either be "added" (i.e. the corresponding image points will be set to 1.0) or "subtracted" (i.e. the corresponding image points will be set to 0.0) from the image. In addition the closed patterns can be drawn as outlines or filled.   Example.

SEE ALSO

PP L [Put Points in image - from Document file Listing]
PP LL [Put Lines in image - from Document file Listing]
MO [Create Model image]
BL [Create Blank image/volume]
MO 3 [Create Model volume]

USAGE

.OPERATION: PT

.OUTPUT FILE: IMG042
[Enter the name of an existing or new pattern file.]

If the pattern file does not exist, SPIDER will ask the next question: (Warning, inside a loop you must allow for this additional question)


.DIMENSIONS (NX, NY): 32,64
[Enter dimensions for the pattern image.]

Following pattern code menu appears. Patterns can be subtracted by appending 'S' to the code.

   CODE SHAPE
   P    POINT
   L    LINE
   C    FILLED CIRCLE
   CL    OUTLINED CIRCLE
   CJ    CIRCLE FROM 3 POINTS
   T    FILLED TRIANGLE
   TL    OUTLINED TRIANGLE
   B    FILLED BOX
   BL    OUTLINED BOX

.PATTERN (P,L,C,T,B,etc): P
[Enter the pattern code desired. See above for listing of all possible patterns.]

For (P)oint ('P' or 'PS') , SPIDER will ask:


.COORDINATES: 12, 15
[Enter the coordinates of the point.]

[The specified image point will be set to 1.0 (code: 'P') or to 0.0 (code 'PS'), respectively.]

For (L)ine ('L' or 'LS') , SPIDER will ask:


.COORDINATES & INTENSITY OF STARTING POINT: 12, 17

.COORDINATES OF ENDING POINT: 23, 32
[Enter the coordinates of the two end points of the line.]

[All points along the line between the two specified margin points (i.e. the nearest grid point in every column and row) will be set to specified intensity, If no intensity is specifed then they will be set to: 1.0 (code: 'L') or to: 0.0 (code: LS), respectively.]

For (C)ircle ('C', 'CS', 'CL', or 'CLS' ) , SPIDER will ask:


.CENTER COORDINATES & OPTIONAL INTENSITY: 12, 15
[Enter center coordinates and intensity of the circle.]

.RADIUS: 8
[Enter radius of the circle. Either, all points within the area limited by circle with the specified center and radius are set to 1.0 (code: 'C') or 0.0 (code: 'CS'), respectively, or, only those image points belonging to the margin of the specified circle (i.e. the points lying on the margin line of the circle) are set to 1.0 (code: 'CL') or to 0.0 (code: 'CLS'), respectively.]

For (T)riangle ('T', 'TS', 'TL', or 'TLS' ) , SPIDER will ask:


.COORDINATES OF FIRST POINT: 12, 16

.COORDINATES OF SECOND POINT: 22, 10

.COORDINATES OF THIRD POINT: 3, 5
[Enter coordinates of the three apexes of the triangle. Either, all points within the area limited by the triangle with the specified margin points are set to 1.0 (code: 'T') or 0.0 (code: 'TS'), respectively, or, only those image points belonging to the margin lines of the specified triangle are set to 1.0 (code: 'TL') or to 0.0 (code: 'TLS'), respectively.]

For (B)ox ('B', 'BS', 'BL', or 'BLS' ) , SPIDER will ask:


.COORDINATES OF UPPER LEFT CORNER: 10, 8
[Enter coordinates of the upper left corner of the box.]

.COORDINATES OF LOWER RIGHT CORNER: 100, 120
[Enter the X and Y coordinates of the lower right corner. Either, all points within the area limited by the specified box are set to 1.0 (code: 'B') or 0.0 (code: 'BS'), respectively, or, only those image points belonging to the margin lines of the specified rectangle are set to 1.0 (code: 'BL') or to 0.0 (code: 'BLS'), respectively.]

For all selections SPIDER will ask:

.CONTINUE ? (Y/N): Y
[Enter 'Y' if you want to "add" or "subtract" another elementary pattern, enter 'N' if you are finished.]

NOTES

  1. Option 'R' still works for backward compatibility. It asks for offsets of opposite corner of rectangle instead of coordinates of the corner. This is thus a source for confusion. al Aug 05

SUBROUTINES

MCIRCL, MLINE, MPOINT, MRECTL, MTRIAN, PTTERN

CALLER

CONF1

© Copyright Notice /       Enquiries: spider@wadsworth.org