FRM2FRM: FRaMe to FRaMe image file format conversion utility. Converts to and/or from: *) Bruker frame format (ASCII header, BINARY counts, ASCII overflow table). *) Bruker/BIS frame format (ASCII header, BINARY counts, BINARY tables). *) Bruker ASCII frame format (ASCII header, ASCII counts). *) TIFF (CHESS or Other format) (BINARY header, BINARY counts). Can also convert to (but cannot read these file formats): *) small Bruker frame format (half-size, ie 1K -> 512). *) small Bruker/BIS frame format (half-size, ie 1K -> 512). *) JPEG (curtesy of Larry Finger) Can also convert from (but cannot write these file formats): *) APS frame format (ASCII header, BINARY counts) *) TIFF (MMX/MarCCD frame format) (BINARY header, BINARY counts). *) SPEC (Roper WinSpec files) (BINARY header, BINARY counts). FRM2FRM only requires the names of certain files as user input. The user has the option of enterring ALL filenames on the command line, or of leaving the command line blank and having the program prompt the user for all filenames. GUI version: Wildcards are permitted in filename inputs. You can use either single character wildcard '?' or multiple character wilcard '*'. You can use multiple wildcards. You can use wildcards to change the file naming conventions as in: filename IN: base*.* filename OUT: base_*_*.sfrm You can use wildcards to change the number of characters in frame number field. filename IN: base01.A?? filename OUT: base_01_10??.sfrm Console version: Wildcards are permitted in filename inputs, but are more limited than the GUI version. All wildcards must be within file base or file extension, but not both. Wildcards are permitted in filename outputs, but are limited to *.ext or base.*. filename IN: base??_*.sfrm filename OUT: *.out Syntax for command line (console version only): FRM2FRM [/A] [/B] [/T] [/Z] [/#] [/FORMAT:#] filename[.tif] [/OUT:filename[.out]] [/CMTOGRID:##.##] [/PIXPERCM:##.##] [/J:#,#] filename.ext1 Required. The name of the frame image file. The input file format is automatically determined. filename.ext2 Optional. Defaults to ".out". [/F:#] Optional. Defaults to Bruker. Possible values are: 1 = Bruker frame file 2 = small Bruker frame file (half-size, ie 1K -> 512) 3 = Bruker ASCII file 4 = TIFF file 5 = JPEG (curtesy of Larry Finger) 6 = Bruker (BIS/PROTEUM) 7 = small Bruker (BIS/PROTEUM) (half-size, ie 1K -> 512) 8 = imageNCIF (n.y.i.) [/A] Always convert. Avoids "Frame already in requested format". [/B] Batch mode: suppresses final "Hit to continue" message. [/T] Allow any frame dimension in import frame file and trim image dimensions to Bruker dimensions (512, 1024, 2048, 4096, etc.). [/Z] Allow frame dimensions in multiples of 512, instead of 512*2^n (512, 1024, 2048, 4096). (SAINT currently does NOT support these odd frame dimensions of 1536, 3072, and 6144). [/#] Force output frame file to be 1, 2 or 4 bytes per pixel. (file is saved without an overflow table). [/C:##.##] CMTOGRID for imported frames. Default is 0.0=ignore. [/P:##.##] PIXPERCM for imported frames. Default is 0.0=ignore. [/J#,#] JPEG min and max scaling for output image. Default is 0:255. Note: "[]" are not type. They are used to bracket optional or defaulted values. Note: all command line switches may be abbreviated and the separator character may be ":", "=", or "-" (ie. "/F:1", "/F=1", and "/FORMAT-1" are equivalent). Note: the command line arguments may be in any order. Current limitations (ignored fields in file header of various frame formats): *) Bruker: Defaults to version 8 frame headers with 4096-byte overflow *) Bruker ASCII: Each line is limited to 80 characters plus terminators. *) TIFF: Reading TIFF files has many limitations: TIFF must be a single, full-size, monochrome, & uncompressed image. File headers are defaulted to best guess values. CHESS: private tags are not translated. Numerous frame header items are defaulted to best guesses. MMX/MarCCD: handles only omega or phi scan series. Assume angles are already in Bruker conventions, except for chi (CHImar + 90.0 = CHIbruker). This works for frame series collected at 2t=0, Om=0, phi, Ch=0, which convert to 0, 0, phi, 90 in Bruker angle conventions. Frame number and Number of frames in series are not converted. CCD temp is not converted. Detector roll pitch yaw are not converted. NEXP & CCDparms are not converted. Roper: All frame header information is defaulted. *) APS: Read only; FRM2FRM cannot write this frame file format. *) APS: angles in frame header are not converted to Bruker conventions. *) SPEC: Read only. *) imageNCIF: (n.y.i.) Note: For compatibility with software requiring 512-byte overflow table, use the environment variable: "SET SAXI$512MAXOVF=1". History: 1.0.19 20Feb04 Fixed handling Bruker/BIS file format with full overflow table. Compatible with FrmUtility 1.0.0.6/18-Feb-2004 1.0.18 06Jan04 Added support for writing Bruker/BIS file format and half-size too. Compatible with FrmUtility 1.0.0.4/06-Jan-2004 1.0.17 05Mar03 Added support for reading Roper SPEC (*.spe) and TIFF (*.tif) files. Added user defaults for missing header items in Registry. GUI only: Allow changing user header defaults. Note: Console version uses these Registry user header defaults too. 1.0.16 09Dec02 New feature to Trim imported frame type (TIFFs) dimensions to Bruker supported frame dimensions (512, 1024, 2048, 4096, etc.) Console: Added "/T" command line switch. GUI: Added [] Trim to Bruker dimensions. 1.0.16 28Oct02 (beta2) 1.0.16 05Sep02 (beta) Added support for reading Bruker new frame format (PROTEUM). Added JPEG min and max input for re-scaling the output image. GUI only: Improved support for using wildcards in file specs. Now supports multiple wildcards of '*' and/or '?'. Now supports renaming filename conventions by using wildcards. 1.0.15 29Jan02 Bug fix for reading ASCII frame formats. Sometimes extra counts were read as zero, especially in 11I7 formatted counts. 1.0.14 11Jan02 Added a second TIFF output for non-CHESS TIFF files. Adds more tags to the TIFF header. Added support to read ASCII frame format files. Added warning for PROTEUM frame formats. 1.0.13 21Aug01 Improved APS import support. Fixed reading some images (data section). 1.0.12 14May01 Improved APS import support. Added support for "beamlinename", etc. 1.0.11 22Dec99 Added the importing frame parms of CMTOGRID and PIXPERCM. 1.0.10 09Apr99 Enhanced APS support (second pass at reading this file format). (used frame from Quantum4 CCD at ALS). Reads only the first frame image of 4 in the Quantum4 file. 1.0.09 18Jan99 Allow opening readonly files as input frames (ie. off DVD/CDROM). Enhanced TIFF support to read MMX/MarCCD TIFFs. 1.0.08 19Oct98 Enhanced TIFF support to read monochrome TIFFs stored by strips (ugly). Added support for JPEG output images as option number 5. Code now compiles into console or gui version of FRM2FRM. Note: GUI version supports file drag and drop (from NT Explorer). Dialog Input: finding project directories is n.y.i. File finder window is not centered Abort button is not yet implemented On error, change title bar to read is not yet implemented 1.0.07 19Aug98 Added "/Z" option switch (applies only to reading non-Bruker frame file formats, such as APS or TIFF). 1.0.06 27May98 Corrected handling of filename wildcard characters. 1.0.05 24Apr98 Added reading APS frame formats. This is first pass at reading APS frames, so several frame header items may be incorrect or missing. 1.0.04 13Apr98 Enforce minimum overflow table size of 512 bytes. 1.0.03 09Dec97 Handle frames with LINEAR scaling feature in frame header. 1.0.02 01Oct97 Bruker AXS release. 1.0.00 27May97 first version to replace SHRINK & TOASCII utilities. Eventually FRM2FRM will replace FRMFIX & TOSAXII utilities.