== proc2d == '''This program performs various processing operations on images and sets of images''' proc2d [first=] [last=] [list=] [exclude=] [nobad] [inplace] [edgenorm] [norm[=,]] [invert] [flip] [rot=] [trans=,] [center] [acfcenter] [scale=] [clip=] [shrink=] [meanshrink=] [apix=] [lp=] [hp=] [tlp=] [rfilt=[,[,[,]]]] [blfilt=] [filefilt=] [mask=] [imask=] [noisemask] [gaussmask] [calcsf=[,]] [mrc] [mrc8bit] [pif] [hdf] [png] [em] [spider] [spider-single] [spiderswap] [spiderswap-single] [pgm[=,]] [sharphp=] [norefs] [rotav] [average] [fftavg=] [split=n] [ctfsplit] [interlv=] [sym=] [plt[=]] [setsfpairs] [addnoise=] [randomize=,,] [snrfilt=] [wiener=[,[,]]] [wienernoc=] [selfcl[=][,]] [comment=] [radon] [rfp] [mraprep] [phot] [rsub] '''Parameters:''' || ||Input file|| || ||Output file. Appends to output file unless inplace specified|| ||[first=]||Specify the first image in the input to process (0 - n-1)|| ||[last=]||Specify the last image in the input to process|| ||[list=]||Works only on the image numbers contained in || ||[exclude=]||Excludes image numbers in || ||[nobad]||Exclude particles with simga=0|| ||[inplace]||Output overwrites input, USE SAME FILENAME, DO NOT 'clip' images.|| ||[edgenorm]||Output is always normalized, this will set 0 to the circular edge value rather than the overall mean|| ||[norm[=,]]||Normalize the result|| ||[invert]||Inverts the density|| ||[flip]||Vertical flip of image (inverts handedness)|| ||[rot=]||Rotate by an angle (degrees)|| ||[trans=,]||Translate|| ||[center]||Center image using center of mass|| ||[acfcenter]||Center image using CCF with 180 deg rotation|| ||[scale=]||Scale by specified scaling factor. Clip must also be specified to change the dimensions of the output map|| ||[clip=]||Define the output image size (always square)|| ||[shrink=]||Reduce an image size by an integral scaling factor, uses median filter. Clip is not required.|| ||[meanshrink=]||Same as shrink, but takes the average instead of the median. Clip is not required.|| ||[apix=]||Specify the Angstr/pixel for S scaling|| ||[lp=]||Gaussian lowpass filter, r in angstroms if apix defined, pixels if undef|| ||[hp=]||Arctan highpass filter, r in angstroms if apix defined, pixels if undef|| ||[tlp=]||Arctan lowpass filter, r in angstroms if apix defined, pixels if undef|| ||[rfilt=[,[,[,]]]]||Apply one of a variety of real-space filters|| ||[blfilt=]||Apply bilateral filtering|| ||[filefilt=]||Filter with a Fourier filter specified in a 2 column text file|| ||[mask=]||Circular mask|| ||[imask=]||Circular inner mask|| ||[noisemask]||Fill the masked region with 1-sigma noise rather than zero|| ||[gaussmask]||Make the mask a Gaussian falloff|| ||[calcsf=[,]]||This will calculate a radial structure factor for the image and write it to the specified output file, must specify apix. Optionally divide into angular bins|| ||[mrc]||Output a set of MRC files rather than a single IMAGIC stack|| ||[mrc8bit]||Output a set of 8-bit MRC files to conserve space|| ||[pif]||Output to a PIF (Purdue Image Format) file|| ||[hdf]||Output to a HDF5 (Hierarchical Data Format) file.|| ||[png]||Output to a PNG (Portable Network Graphics) file|| ||[em]||Output to a EM image file|| ||[spider]||Output a Spider stack file rather than an IMAGIC stack|| ||[spider-single]||Output in individual Spider files rather than an IMAGIC file|| ||[spiderswap]||Output a spider stack file in byte-swapped order (ie - PC vs SGI)|| ||[spiderswap-single]||Output in individual Spider files in swapped order rather than an IMAGIC file|| ||[pgm[=,]]||Output a set of PGM images rather than an IMAGIC stack|| ||[sharphp=]||A highpass with a sharp cutoff (beware artifacts)|| ||[norefs]||Skip any input images which are marked as references (usually used with classes.*)|| ||[rotav]||Each image is rotationally averaged|| ||[average]||Averages all input images (without alignment) and writes a single (normalized) output image|| ||[fftavg=]||Incoherent Fourier average of all images and write a single power spectrum image|| ||[split=n]||Splits the input file into a set of n output files|| ||[ctfsplit]||Splits the input file into output files with the same CTF parameters|| ||[interlv=]||Specifies a 2nd input file. Output will be 2 files interleaved.|| ||[sym=]||Apply an n-fold rotational symmetry to each image|| ||[plt[=]]||output the orientations in IMAGIC .plt file format|| ||[setsfpairs]||Applies the radial structure factor of the 1st image to the 2nd, the 3rd to the 4th, etc|| ||[addnoise=]||Add flatband gaussian noise with defined standard deviation|| ||[randomize=,,]||This will randomly rotate and translate each particle|| ||[snrfilt=]||Filter the images by the estimated SNR in each image.|| ||[wiener=[,[,]]]||Wiener filter the images using the estimated SNR with CTF amplitude correction.|| ||[wienernoc=]||Wiener filter the images without CTF amplitude correction.|| ||[selfcl[=][,]]||Output file will be a 180x180 self-common lines map for each image.|| ||[comment=] Sets the comment string in the output file (if supported||[comment=] Sets the comment string in the output file (if supported)|| ||[radon]||Do Radon transform|| ||[rfp]||Experimental|| ||[mraprep]||Experimental|| ||[phot]||Experimental|| ||[rsub]||Experimental|| '''Usage:''' ''proc2d 3244.img start.hed invert apix=5 lp=18'' ''proc2d start.hed start.hed invert inplace'' '''Description''' This program is used to perform a variety of generic 2D image processing tasks. Like all of the EMAN programs, it will read any supported file format. By default it outputs to an Imagic file although there are options to change this. Note that, by default, images are appended to the end of the output file if it already exists. All images in one file MUST have the same size. ie - if you try to copy 50x50 images to the end of a file that already contains 100x100 images, an error will result. Note the 'first=' and 'last=' options allow a subset of the input file to be processed. The 'inplace' keyword may be used to cause output images to overwrite the input images rather than being appended to the end of the file. Most of the processing is explained in sufficient detail above, but there are a few notes: * The scale operation does NOT resize the image in pixels. Generally you want to specify both scale and clip. * If apix is not specified, all filters are specified in pixels in Fourier space. If apix is specified, all filters are specified in Angstroms. ie - 'apix=4.5 lp=8' would filter the image using a Gaussian in Fourier space with a 1/e width of 1/8 reciprocal angstroms. * The 'center' option generally doesn't produce very good results on noisy images. Use the 'cenalignint' program instead. * You might notice that 'mask'ing an image often produces a mask that doesn't match the density just inside the mask very well. The 'edgemean' value normalizes the images so the mean value matches the edge of the image rather than the overall mean value of the image. * The self common-lines option takes two optional parameters. The first is the size of the self common-line image. For example, 180 would produce 180x180 maps, meaning a 2 degree spacing. Also note that these maps have been undiagonalized, meaning the normal diagonal line of 1's is along the x-axis. The mode determines how the common-lines are calculated: 0 will do real-space calculations, 1 will do amplitude-weighted Fourier phase-error common-lines scaled and inverted so higher is better, 2 will do amplitude-only Fourier common-lines * The real-space filter option can perform a variety of filters: * 0: x 0 (simple threshold) * 1: x 0, then normalize * 2: x 0, x>val1 -> 1 * 3: x>val1 -> x 0 0 x<0 -> val2, then normalize * 4: x -> fabs(x) * 5: x towards zero by val1 set to zero if passes zero * 6: x!=0 ->1 * 7: x 0 * 9: x -> (x+val1)*val2 * 10: x -> sqrt(x) * 11: x -> exp(x/val1-val2) * 12: x -> 2*(val1-x) * 14: val1<=x<=val2 -> 1.0 else 0.0 * 13: x>val1 -> val1, x val2, histogram tail chopper * 15: x -> log(x) * 16: x -> e^x * 17: x>mean+sigma*val1 or x mean, histogram tail chopper * 20: median filter, val1 is size * 21: like 20, but takes std dev of box instead of median * 22: like 20, but takes max value * 50: Tries to remove linear gradients * 51: Vertical stripe filter to remove Zeiss artifacts * 60:Fill zeroes at the edges with nearest non-zero value * 61: Fill constant regions with zero * 62: Eliminate beamstop in diffraction images (sigma,x center,y center) negative sigma will do a radial subtract as well * 102: Eliminate x,y pixels from the edge of the image * 103: Map each value to the radius at that point (useful in proc3d as well) * 110: Iterative expansion of a binary mask, val1 = number of layers to expand, val2 = number of layers before starting Gaussian decay * 111: Iterative expansion of a multilevel mask file (see qsegment). Simultaneoulsy expands all levels and prevents overlap problems. * 113: Local gradient remover, subtracts the local average from each pixel, val1= size of box to average over