label
Program to perform simple manipulations on image files
C*LABEL.FOR******************************************************************** C * C Program to perform simple manipulations on image files * C * C Version 1.12 31-MAR-82 DAA for VAX * C Version 1.13 13-OCT-82 DAA for VAX * C Version 1.14 7- JAN-85 MK some more routines * C for nicer displays * C Version 1.15 20-APR-85 RH line size 8192 * C Version 1.16 12-JUN-87 RH extra option * C Version 1.17 06-FEB-92 RH max/min/mean on option 4 * C Version 1.18 26-MAR-92 RH transfer "extra" data * C Version 1.20 07-OCT-95 RH increased dimensions * C Version 1.21 17-DEC-96 RH new single particle option 50 * C Version 1.22 01-JAN-97 RH clean up new option * C Version 1.23 01-SEP-98 RH remove title option 50 I/P * C Version 1.H1 01-FEB-03 HST more transforming options * C****************************************************************************** C C Input is a single file in mapformat, output is a single file in mapformat C C Card input, or online control C C card 1 : input filename C card 2 : IMODE, describes which of the various simple manipulations C are required - can be -2,-1,0,1,2,3,4 or 99 for images C as well as 5,6,7,8 for transforms. C If IMODE is 50, single particle boxing and restacking option C If IMODE is 99, a second IMODE of 1,2,3,4 gives more options C and 5,6,7,8 more options for transforms. C card 3 : output filename C cards 4 onwards are dependent on manipulation - see below C ------------------------------------------------------------------------- C IMODE= -3: Change to BYTE output format with automatic scaling',/, C C IMODE= -2: Change INTEGER*2/INTEGER*1 output format',/, C card 4 : SCALE, scale factor for INTEGER*2/BYTE conversion C C IMODE= -1: Change REAL/INTEGER*2 output format',/, C card 4 : SCALE, scale factor for REAL/INTEGER conversion C C IMODE= 0: Change Labels',/, C card 4 : NLA, number of labels to ADD ? (can be negative) C cards 5 : TITLE, enter titles to add for label number # C or card 5 : NLR, remove labels # (0 to exit) ? C C IMODE= 1: Select region',/, C card 4 : enter Limits (Xmin,max,Ymin,max) if NZ=1 C or card 4 : enter Limits (Xmin,max,Ymin,max,Zmin,max) if NZ>1 C C IMODE= 2: Linear OD stretch ( y = mx + b )',/, C card 4 : A,B enter coefficients A & B ( Y = AX + B ) C card 5 : IQ=0 or 1 - set values <0 to 0 (0= no, 1=yes) ? C C IMODE= 3: Logrithmic OD stretch ( y = aLOGx + b )',/, C card 4 : A,B enter coefficients A & B ( Y = A*ALOG(X) + B ) C C IMODE= 4: Average adjacent pixels',/, C card 4 : NREDX,NREDY enter integer reduction factor for X,Y: C C IMODE= 5: Output amplitudes or Intensities',/, C card 4 : IQ, write out amplitudes (0) or Intensities*.01 (1) ? C C IMODE= 6: Output Phases (degrees)',/, C no further input needed C C IMODE= 7: Output REAL part of Complex value',/, C no further input needed C C IMODE= 8: Output IMAGINARY part of Complex value',/) C no further input needed C C IMODE= 10: Transform 16 bit linear transmission into 16 bit OD C C IMODE= 11: Transform 16 bit linear transmission into 8 bit OD C C IMODE= 12: Fix STEM images for IMOD C C IMODE= 20: Produce thumbnail image C card 4 : Enter X/Y dimensions of output image C C ----------------------------------------------------------- C IMODE= 50: goes to the single particle selection option, with input C from a file of X,Y coordinates, and desired box size. C card 4 : NBOXX,NBOXY C card 5 : input filename for the list of X,Y coordinates of C the centres of the areas to be selected. C ----------------------------------------------------------- C IMODE= 99: More options, mainly for display purposes') C then asks for a second IMODE C C IMODE= 1: VARIOUS 90 DEG TURNS AND MIRRORS',/, C card 4 : ITURN, TURN NO? (1:Z90,2:Z-90,3:Z180,4:Xmir,5:Ymir) C C IMODE= 2: GEOMETRIC STRETCH ( y = m**X )',/, C card 4 : A, enter A (Y = X**A) C C IMODE= 3: CUT OFF OVER - AND UNDERFLOWS',/, C card 4 : A,B enter LOWEST AND HIGHEST VALUE TO PRUNE IMAGE WITH C C IMODE= 4: GET RID OF OUTLIERS BY INTERPOLATION') C card 4 : critdiff, enter critical difference C C****************************************************************************