home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / image144.sit / Globals.p < prev    next >
Encoding:
Text File  |  1992-03-31  |  32.4 KB  |  992 lines

  1. unit Globals;
  2.  
  3. {Global declarations for Image program.}
  4.  
  5. interface
  6.  
  7.     uses
  8.         QuickDraw, Palettes, PrintTraps;
  9.  
  10.     const
  11.         Version = 144;
  12.  
  13.         UsingFPU = true;
  14.  
  15.         AppleMenu = 128;
  16.  
  17.         FileMenu = 129;
  18.         NewItem = 1;
  19.         OpenItem = 2;
  20.         ImportItem = 3;
  21.         CloseItem = 4;
  22.         SaveItem = 6;
  23.         SaveAsItem = 7;
  24.         ExportItem = 8;
  25.         SaveScreenItem = 9;
  26.         RecordPreferencesItem = 10;
  27.         RevertItem = 12;
  28.         DuplicateItem = 13;
  29.         GetInfoItem = 14;
  30.         SetHalftoneItem = 16;
  31.         PageSetupItem = 17;
  32.         PrintItem = 18;
  33.         QuitItem = 20;
  34.  
  35.         EditMenu = 130;
  36.         UndoItem = 1;
  37.         CutItem = 3;
  38.         CopyItem = 4;
  39.         PasteItem = 5;
  40.         ClearItem = 6;
  41.         FillItem = 8;
  42.         InvertItem = 9;
  43.         DrawBoundaryItem = 10;
  44.         DrawScaleItem = 11;
  45.         SelectAllItem = 13;
  46.         ScaleAndRotateItem = 14;
  47.         RotateLeftItem = 16;
  48.         RotateRightItem = 17;
  49.         FlipVerticalItem = 18;
  50.         FlipHorizontalItem = 19;
  51.         UnzoomItem = 21;
  52.         ShowClipboardItem = 22;
  53.  
  54.         OptionsMenu = 131;
  55.         InvertPaletteItem = 1;
  56.         SetNumberItem = 2;
  57.         SetExtraColorsItem = 3;
  58.         GrayscaleItem = 4;
  59.         ColorTablesItem = 5;
  60.         PreferencesItem = 11;
  61.         PlotOptionsItem = 12;
  62.         ScaleToFitItem = 13;
  63.         ThresholdItem = 14;
  64.         SliceItem = 15;
  65.         PropagateItem = 16;
  66.  
  67.         FontMenu = 32; {Sub Menu}
  68.  
  69.         SizeMenu = 33; {Sub Menu}
  70.  
  71.         StyleMenu = 34; {Sub Menu}
  72.         LeftItem = 8;
  73.         CenterItem = 9;
  74.         RightItem = 10;
  75.         NoBackgroundItem = 12;
  76.         WithBackgroundItem = 13;
  77.  
  78.         ColorTablesMenu = 41; {Sub Menu}
  79.         SystemPaletteItem = 1;
  80.         Pseudo20Item = 2;
  81.         Pseudo32Item = 3;
  82.         RainbowItem = 4;
  83.         Fire1Item = 5;
  84.         Fire2Item = 6;
  85.         IceItem = 7;
  86.         GraysItem = 8;
  87.         SpectrumItem = 9;
  88.  
  89.         PropagateMenu = 38;   {Sub Menu}
  90.         LUTItem = 1;
  91.         SpatialItem = 2;
  92.         DensityItem = 3;
  93.         AllItem = 4;
  94.  
  95.         EnhanceMenu = 132;
  96.         SmoothItem = 1;
  97.         SharpenItem = 2;
  98.         ShadowItem = 3;
  99.         EdgeDetectItem = 4;
  100.         ReduceNoiseItem = 5;
  101.         DitherItem = 6;
  102.         ConvolveItem = 7;
  103.         BinaryItem = 9;
  104.         ArithmeticItem = 10;
  105.         BackgroundItem = 11;
  106.         ApplyItem = 12;
  107.         EnhanceItem = 13;
  108.         EqualizeItem = 14;
  109.         ChangeItem = 15;
  110.  
  111.         BinaryMenu = 35; {Sub Menu}
  112.         MakeBinaryItem = 1;
  113.         ErosionItem = 3;
  114.         DilationItem = 4;
  115.         OpeningItem = 5;
  116.         ClosingItem = 6;
  117.         SetCountItem = 7;
  118.         IterationsItem = 8;
  119.         OutlineItem = 10;
  120.         SkeletonizeItem = 11;
  121.  
  122.         ArithmeticMenu = 37; {Sub Menu}
  123.         AddItem = 1;
  124.         SubtractItem = 2;
  125.         MultiplyItem = 3;
  126.         DivideItem = 4;
  127.         LogItem = 5;
  128.  
  129.         BackgroundMenu = 40; {Sub Menu}
  130.         HorizontalItem = 1;
  131.         VerticalItem = 2;
  132.         Sub2DItem = 3;
  133.         RemoveStreaksItem = 4;
  134.         FasterItem = 6;
  135.         RadiusItem = 7;
  136.  
  137.         AnalyzeMenu = 133;
  138.         MeasureItem = 1;
  139.         AnalyzeItem = 2;
  140.         ShowItem = 3;
  141.         HistogramItem = 4;
  142.         PlotItem = 5;
  143.         PlotSurfaceItem = 6;
  144.         OptionsItem = 7;
  145.         SetScaleItem = 9;
  146.         CalibrateItem = 10;
  147.         RedoItem = 11;
  148.         DeleteItem = 12;
  149.         ResetItem = 13;
  150.         RestoreItem = 14;
  151.         MarkItem = 15;
  152.  
  153.         SpecialMenu = 140;
  154.         StartItem = 1;
  155.         AverageItem = 2;
  156.         SaveBlankFieldItem = 3;
  157.         VideoOptionsItem = 4;
  158.         PhotoModeItem = 6;
  159.         SortItem = 7;
  160.         LoadMacrosItem = 9;
  161.         FirstMacroItem = 11;
  162.  
  163.         StacksMenu = 141;
  164.         StackFromWindowsItem = 1;
  165.         WindowsFromStackItem = 2;
  166.         AddSliceItem = 3;
  167.         DeleteSliceItem = 4;
  168.         NextSliceItem = 5;
  169.         PreviousSliceItem = 6;
  170.         MakeMovieItem = 8;
  171.         CaptureFramesItem = 9;
  172.         AnimateItem = 10;
  173.         ProjectItem = 12;
  174.         ResliceItem = 13;
  175.         ResliceOptionsItem = 14;
  176.  
  177.         SortPaletteMenu = 36; {Sub Menu}
  178.         byHueItem = 1;
  179.         bySaturationItem = 2;
  180.         byBrightnessItem = 3;
  181.  
  182.         WindowsMenu = 138;
  183.         NextWindowItem = 1;
  184.         StackWindowsItem = 2;
  185.         TileWindowsItem = 3;
  186.         PasteControlItem = 4;
  187.         SelectToolsItem = 6;
  188.         SelectGrayMapItem = 7;
  189.         SelectLutItem = 8;
  190.         SelectValuesItem = 9;
  191.         SelectHistogramItem = 10;
  192.         SelectPlotItem = 11;
  193.         SelectResultsItem = 12;
  194.  
  195.         UserMenu = 139;
  196.  
  197.         TransferModeMenu = 200;  {Popup Menu in Paste Control window}
  198.         CopyModeItem = 1;
  199.         AndItem = 2;
  200.         OrItem = 3;
  201.         XorItem = 4;
  202.         ReplaceItem = 5;
  203.         BlendItem = 6;
  204.  
  205.         LineToolMenu = 201;
  206.         StraightItem = 1;
  207.         SegmentedItem = 2;
  208.         FreehandItem = 3;
  209.  
  210.         MinFree = 125000;
  211.         HeaderSize = 512;
  212.         TiffDirSize = 256;
  213.         MaxLine = 4096;
  214.         tleft = 36;
  215.         ttop = 40;
  216.         twidth = 44;
  217.         tmiddle = 22;
  218.         theight = 277;
  219.         gmleft = 2;
  220.         gmtop = 338;
  221.         gmwidth = 78;
  222.         gmheight = 118;
  223.         gmRectLeft = 7;
  224.         gmRectTop = 6;
  225.         gmRectRight = 71;
  226.         gmRectBottom = 70;
  227.         gmSlideWidth = 68;
  228.         gmSlideHeight = 7;
  229.         gmSlide1Offset = 8;
  230.         gmSlide2Offset = 19;
  231.         gmIconWidth = 17;
  232.         gmIconHeight = 14;
  233.         gmIconOffset = 31;
  234.         gmIcon1Left = 17;
  235.         gmIcon2Left = 46;
  236.         cleft = 2;
  237.         ctop = 40;
  238.         cwidth = 30;
  239.         rwidth = 200;
  240.         rheight = 225;
  241.         hleft = 220;
  242.         hwidth = 256;
  243.         hheight = 120;
  244.         pcwidth = 186;
  245.         pcheight = 85;
  246.         MaxPseudoColors = 32;
  247.         MaxPseudoColorsLessOne = 31;
  248.         PicKind = 88;
  249.         HistoKind = 89;
  250.         ProfilePlotKind = 90;
  251.         LUTKind = 91;
  252.         MapKind = 92;
  253.         ToolKind = 93;
  254.         ValuesKind = 94;
  255.         CalibrationPlotKind = 95;
  256.         PasteControlKind = 96;
  257.         ResultsKind = 97;
  258.         IOErrorID = 400;
  259.         AboutID = 256;
  260.         VersItem = 2;
  261.         MemItem = 3;
  262.         StackSize = 40000;
  263.         ToolFont = 249;      {Bits 7-14 of font resource ID(31884) }
  264.         WindowsMenuItems = 13;       {Items in Windows menu before images}
  265.         ho = 2;
  266.         vo = 4;
  267.         WhiteIndex = 0;
  268.         BlackIndex = 255;
  269.         OvalSize = 15;
  270.         LinesLeft = 13;
  271.         LinesRight = 40;
  272.         nLinetypes = 6;
  273.         CheckMarkChar = 65;
  274.         TxPlain = 1;
  275.         TxBold = 2;
  276.         TxItalic = 3;
  277.         TxUnderLine = 4;
  278.         TxOutLine = 5;
  279.         TxShadow = 6;
  280.         FileID8 = 'IPICIMAG';
  281.         DefaultBufferSize = 307200; {Enough for 640x480 image}
  282.         PickerCursorID = 111;
  283.         LUTCursorID = 112;
  284.         gmCursorID = 113;
  285.         GrabberCursorID = 114;
  286.         PencilCursorID = 115;
  287.         CrossCursorID = 117;
  288.         CrossCursorPlusID = 118;
  289.         CrossCursorMinusID = 119;
  290.         BucketCursorID = 120;
  291.         GlassCursorPlusID = 121;
  292.         GlassCursorMinusID = 122;
  293.         WandCursorID = 123;
  294.         WandPlusCursorID = 124;
  295.         WandMinusCursorID = 125;
  296.         AppleDefaultCLUT = 8;
  297.         SpectrumCLUT = 200;
  298.         KlutzID = 200;
  299.         PixelPaintID = 999; {Used for PixelPaint and Canvas CLUTs}
  300.         GhostWindow = $A84;
  301.         GrayRgnGlobal = $9EE;
  302.         MBarHeight = $BAA;
  303.         MaxPics = 250;
  304.         FirstExtraColorsEntry = 1;
  305.         MaxExtraColors = 6;
  306.         MaxExtraPlus2 = 8;
  307.         ExtraColorsHeight = 10;
  308.         MyMaxLong = 2000000000;
  309.         MaxTextBufSize = 32700;
  310.         MaxMaxRegions = 8000;
  311.         MaxStandards = 20;
  312.         BadReal = 808080.0;
  313.         NoValue = -808080.0;
  314.         TabSpacing = 12;
  315.         MaxPolyVertices = 4000;
  316.         pi = 3.1415926535898;
  317.         ValuesVStart = 11;
  318.         ValuesHStart = 4;
  319.     {TIFF Constants}
  320.         short = 3;
  321.         long = 4;
  322.         NewSubfileType = 254;
  323.         ImageWidth = 256;
  324.         ImageLength = 257;
  325.         BitsPerSample = 258;
  326.         Compression = 259;
  327.         PhotoInterp = 262;
  328.         StripOffsets = 273;
  329.         SamplesPerPixel = 277;
  330.         RowsPerStrip = 278;
  331.         StripByteCount = 279;
  332.         XResolution = 282;
  333.         YResolution = 283;
  334.         ResolutionUnit = 296;
  335.         ColorMapTag = 320;
  336.         ImageHdrTag = -22222; {43314}
  337.         TiffFillerSize = 67;
  338.         RoiHandleSize = 5;
  339.         CancelResetID = 3;
  340.         npcItems = 7;
  341. {Blend = 32;}
  342. {Transparent = 36;}
  343.         LeftArrow = 28;
  344.         RightArrow = 29;
  345.         UpArrow = 30;
  346.         DownArrow = 31;
  347.         hPicOffset = 8;
  348.         vPicOffset = 16;
  349.         qcRowBytes = 1024;
  350.         FunctionKey = 16;
  351.         MaxMacroSize = 15000;
  352.         MaxSymbols = 300;
  353.         MaxStackSize = 100;
  354.         MaxMacros = 50;
  355.         SymbolSize = 12;
  356.         MaxPicSize = 16383;
  357.         ScrollBarWidth = 15;
  358.         PrefsName = 'Image Prefs';
  359.         StraightChar = 97;
  360.         SegmentedChar = 98;
  361.         FreehandChar = 99;
  362.         MaxSlices = 256;
  363.         HomeKey = 1;
  364.         EndKey = 4;
  365.         PageUp = 11;
  366.         PageDown = 12;
  367.         osEvt = 15;
  368.         Pseudo20ID = 1001;
  369.         Pseudo32ID = 1002;
  370.         RainbowID = 1003;
  371.         Fire1ID = 1004;
  372.         Fire2ID = 1005;
  373.         IceID = 1006;
  374.         GraysID = 1007;
  375.         MaxColor = 15000;
  376.         MaxCoordinates = 10000;
  377.  
  378.  
  379.  
  380.     type
  381.         BitMapHandle = ^BitMapPtr;
  382.         BitMapPtr = ^BitMap;
  383.         UnsignedByte = 0..255;
  384.         LineType = packed array[0..MaxLine] of UnsignedByte;
  385.         LinePtr = ^LineType;
  386.         rLineType = array[1..MaxLine] of real;
  387.         ClutTable = packed array[0..255] of integer;
  388.         ColorArray = packed array[0..MaxPseudoColorsLessOne] of byte;
  389.         LutArray = packed array[0..255] of byte;
  390.         PicType = (pdp11, NewPicture, normal, PictFile, Leftover, imported, QuickCaptureType, NullPicture, BlankField, TiffFile, InvertedTIFF, FourBitTIFF, ScionType, PicsFile);
  391.         LUTModeType = (PseudoColor, OldAppleDefault, OldSpectrum, GrayScale, ColorLut, CustomGrayscale);
  392.         ColorTableType = (CustomTable, AppleDefault, Pseudo20, Pseudo32, Rainbow, Fire1, Fire2, Ice, Grays, Spectrum);
  393.         ExtraColorsArray = array[1..MaxExtraColors] of rgbColor;
  394.         MyCSpecArray = array[0..255] of ColorSpec;
  395.         CoefficientArray = array[1..6] of double;
  396.         CurveFitType = (StraightLine, Poly2, Poly3, Poly4, Poly5, ExpoFit, PowerFit, LogFit, RodbardFit, SpareFit1, SpareFit2, UncalibratedOD);
  397.         UnitsType = (Nanometers, Micrometers, Millimeters, Centimeters, Meters, Kilometers, Inches, Feet, Miles, Pixels);
  398.         FileDepthType = (EightBits, SixteenBitsUnsigned, SixteenBitsSigned);
  399.         RoiTypeType = (RgnRoi, RectRoi, OvalRoi, LineRoi, FreeLineRoi, SegLineRoi, NoRoi);
  400.  
  401.         PicHeader = record
  402.                 FileID: packed array[1..8] of char; {8  8}
  403.                 hnlines: integer;                    {2  10}
  404.                 hPixelsPerLine: integer;        {2  12}
  405.                 hversion: integer;                   {2  14}
  406.                 hOldLutMode: LutModeType;    {2  16}
  407.                 hOldnColors: integer;                {2  18}
  408.                 hr, hg, hb: ColorArray;              {96 114}
  409.                 hOldColorStart: integer;             {2  116}
  410.                 hColorWidth: integer;                 {2  118}
  411.                 hExtraColors: ExtraColorsArray;   {36 154}
  412.                 hnExtraColors: integer;              {2  156}
  413.                 hForegroundIndex: integer;     {2  158}
  414.                 hBackgroundIndex: integer;      {2  160}
  415.                 hRawSpatialScale: double;        {8  168}
  416.                 Unused2: integer;                    {2  170}
  417.                 Unused3: integer;                    {2  172}
  418.                 hUnitsID: integer;                   {2  174}
  419.                 hp1x, hp1y, hp2x, hp2y: integer;     {8  182}
  420.                 hfit: CurveFitType;                  {2  184}
  421.                 hnCoefficients: integer;           {2  186}
  422.                 hCoeff: CoefficientArray;         {48 234}
  423.                 hUM: string[15];                   {16 250}
  424.                 UnusedBoolean: boolean;          {1  251}
  425.                 hBinaryPic: boolean;               {1  252}
  426.                 hSliceStart: integer;           {2 254}
  427.                 hSliceEnd: integer;              {2  256}
  428.                 hScaleMagnification: real;   {4  260}
  429.                 hNSlices: integer;                 {2 262}
  430.                 hSliceSpacing: real;          {4 266}
  431.                 hCurrentSlice: integer;        {2 268}
  432.                 hLoopTime: real;                   {4  272}
  433.                 hPixelAspectRatio: real;       {4  276}
  434.                 hColorStart: integer;             {2  278}
  435.                 hColorEnd: integer;               {2  280}
  436.                 hnColors: integer;                  {2  282}
  437.                 hFill1, hFill2: RGBColor;    {12  294}
  438.                 hTable: ColorTableType;       {1  295}
  439.                 hLutMode: LutModeType;      {1  296}
  440.                 hInvertedTable: boolean;      {1  297}
  441.                 hZeroClip: boolean;               {1  298}
  442.                 UnusedBytes: packed array[1..214] of byte;
  443.             end;
  444.  
  445.         StackInfoRec = record
  446.                 nSlices: integer;
  447.                 CurrentSlice: integer;
  448.                 PicBaseH: array[1..MaxSlices] of handle;
  449.                 SliceSpacing: real;
  450.                 LoopTime: real;
  451.             end;
  452.         StackInfoPtr = ^StackInfoRec;
  453.  
  454.         PaletteHeader = record
  455.                 pID: packed array[1..4] of char;  {4  4}
  456.                 pVersion: integer;                              {2  6}
  457.                 pnColors: integer;                              {2  8}
  458.                 pColorStart: integer;                         {2  10}
  459.                 pColorEnd: integer;                            {2  12}
  460.                 pFill1: rgbColor;                               {6  18}
  461.                 pFill2: rgbColor;                               {6  24}
  462.                 pUnused: array[1..4] of integer;     {8  32}
  463.             end;
  464.  
  465.         RoiHeader = record
  466.                 rID: packed array[1..4] of char;  {4   4}
  467.                 rVersion: integer;                              {2   6}
  468.                 rRoiType: RoiTypeType;                    {2   8}
  469.                 rRoiRect: rect;                                   {8   16}
  470.                 rNCoordinates: integer;                     {2   18}
  471.                 rX1, rY1, rX2, rY2: real;                 {16 34}
  472.                 rLineWidth: integer;                          {2   36}
  473.                 rUnused: array[1..14] of integer;    {28 64}
  474.             end;
  475.  
  476.         PicInfo = record
  477.                 nlines, PixelsPerLine: integer;
  478.                 ImageSize: LongInt;
  479.                 BytesPerRow: integer;
  480.                 PicBaseAddr: ptr;
  481.                 PicBaseHandle: handle;
  482.                 osPort: cGrafPtr;         {Offscreen Port}
  483.                 PicRect: rect;
  484.                 RoiRect: rect;
  485.                 roiRgn: rgnHandle;
  486.                 RoiType: RoiTypeType;
  487.                 SrcRect: rect;
  488.                 wrect: rect;
  489.                 initwrect: rect;
  490.                 savewrect, SaveSrcRect: rect;
  491.                 SaveMagnification: extended;
  492.                 savehloc, savevloc: integer;  {Old window location in global coordinates}
  493.                 RoiShowing: boolean;
  494.                 title: string[30];
  495.                 NewPic: boolean;
  496.                 Magnification: extended;
  497.                 vref: integer;
  498.                 PictureType: PicType;
  499.                 wptr: WindowPtr;
  500.                 PicNum: integer;
  501.                 ScaleToFitWindow: boolean;
  502.                 Changes: boolean;
  503.                 RedLUT, GreenLUT, BlueLUT: LutArray;
  504.                 nColors: integer;
  505.                 ColorStart, ColorEnd: LongInt;
  506.                 FillColor1, FillColor2: RGBColor;
  507.                 LUTMode: LUTModeType;
  508.                 ColorTable: ColorTableType;
  509.                 InvertedColorTable: boolean;
  510.                 cTable: MyCSpecArray;
  511.                 IdentityFunction: boolean;
  512.                 PixMapSize: LongInt;
  513.                 RawSpatialScale, xSpatialScale, ySpatialScale, ScaleMagnification, UnitsPerCM, PixelAspectRatio: extended;
  514.                 units: string[2];
  515.                 FullUnits: string[11];
  516.                 UnitsID: UnitsType;
  517.                 UnitOfMeasure: string[15];
  518.                 HeaderOffset, ImageDataOffset, ColorMapOffset: LongInt;
  519.                 Fit: CurveFitType;
  520.                 nCoefficients: integer;
  521.                 Coefficient: CoefficientArray;
  522.                 DensityCalibrated, SpatiallyCalibrated: boolean;
  523.                 ZeroClip: boolean;
  524.                 BinaryPic: boolean;
  525.                 WindowState: (NormalWindow, TiledSmall, TiledSmallScaled, TiledBig, TiledBigScaled);
  526.                 FileDepth: FileDepthType;
  527.                 Revertable: boolean;
  528.                 LX1, LY1, LX2, LY2: real;
  529.                 cLength, uLength: extended;
  530.                 StackInfo: StackInfoPtr;
  531.             end;
  532.  
  533.         InfoPtr = ^PicInfo;
  534.         ToolType = (MagnifyingGlass, SelectionTool, Grabber, OvalSelectionTool, Pencil, PolygonTool, Eraser, FreehandTool, Brush, LineTool, ruler, LUTTool, PaintBucket, TextTool, PlotTool, AirbrushTool, Wand, PickerTool, AngleTool, CrossHairTool);
  535.         OpType = (InvertOp, PaintOp, FrameOp, EraseOp, PasteOp, AddOp, SubtractOp, MultiplyOp, DivideOp);
  536.         ObjectType = (lineObj, oval, SelectionOval, Rectangle, PlotLine, SelectionRect, BrushObj);
  537.         FilterType = (WeightedAvg, UnweightedAvg, fsharpen, fshadow, EdgeDetect, ReduceNoise, dither, erosion, dilation, OutlineFilter, skeletonize);
  538.         rhptr = ^RgnHandle;
  539.         FlipRotateType = (RotateLeft, RotateRight, FlipVertical, FlipHorizontal);
  540.         TextBackType = (NoBack, WithBack);
  541.         HistogramType = array[0..255] of LongInt;
  542.         str4 = packed array[1..4] of char;
  543.         LookupTable = packed array[0..255] of UnsignedByte;
  544.         TextBufType = packed array[1..MaxTextBufSize] of char;
  545.         TextBufPtr = ^TextBufType;
  546.         SortArray = array[1..9] of integer;
  547.         StandardsArray = array[1..MaxStandards] of extended;
  548.         MeasurementTypes = (AreaM, MeanM, StdDevM, xyLocM, ModeM, LengthM, MajorAxisM, MinorAxisM, AngleM, IntDenM, MinMaxM, User1M, User2M);
  549.         TiffHdr = record
  550.                 ByteOrder: packed array[1..2] of char;
  551.                 Version: integer;
  552.                 FirstIFDOffset: LongInt;
  553.             end;
  554.         TiffEntry = record
  555.                 TagField: integer;
  556.                 ftype: integer;
  557.                 length: LongInt;
  558.                 offset: LongInt;
  559.             end;
  560.         pcItemType = (pcPopupMenu, pcCheckBox, pcButton);
  561.         WhatToImportType = (ImportTIFF, ImportMCID, ImportLUT, ImportText, ImportCustom);
  562.         FateTable = array[0..255] of integer;
  563.         SaveAsWhatType = (asTIFF, asPICT, asMacPaint, asPICS, AsPalette, AsOutline, AsRawData, SaveAsMCID);
  564.         ExportAsWhatType = (AsRaw, asMCID, asText, AsLUT, asMeasurements, asPlotValues, asHistogramValues, asCoordinates);
  565.  
  566.         RealArray = array[0..MaxMaxRegions] of real;
  567.         meanType = RealArray;
  568.         sdType = RealArray;
  569.         PixelCountType = array[0..MaxMaxRegions] of LongInt;
  570.         AreaType = RealArray;
  571.         modeType = RealArray;
  572.         IntegratedDensityType = RealArray;
  573.         idBackgroundType = RealArray;
  574.         xcenterType = RealArray;
  575.         ycenterType = RealArray;
  576.         MajorAxisType = RealArray;
  577.         MinorAxisType = RealArray;
  578.         orientationType = RealArray;
  579.         MinType = RealArray;
  580.         MaxType = RealArray;
  581.         plengthType = RealArray;
  582.         User1Type = RealArray;
  583.         User2Type = RealArray;
  584.  
  585.         meanPtr = ^meanType;
  586.         sdPtr = ^sdType;
  587.         PixelCountPtr = ^PixelCountType;
  588.         AreaPtr = ^AreaType;
  589.         modePtr = ^modeType;
  590.         IntegratedDensityPtr = ^IntegratedDensityType;
  591.         idBackgroundPtr = ^idBackgroundType;
  592.         xcenterPtr = ^xcenterType;
  593.         ycenterPtr = ^ycenterType;
  594.         MajorAxisPtr = ^MajorAxisType;
  595.         MinorAxisPtr = ^MinorAxisType;
  596.         orientationPtr = ^orientationType;
  597.         MinPtr = ^MinType;
  598.         MaxPtr = ^MaxType;
  599.         plengthPtr = ^plengthType;
  600.         User1Ptr = ^User1Type;
  601.         User2Ptr = ^User2Type;
  602.  
  603.         TokenType = (NullT, beginT, endT, identifier, UnknownIdentifier, DoneT, LeftParen, RightParen, LeftBracket, RightBracket, comma, colon, SemiColon, stringT, NumericLiteral, VarT, IntegerT, RealT, BooleanT, CommandT, FunctionT, ArrayT, AssignOp, ForT, ToT, DoT, IfT, ThenT, ElseT, whileT, repeatT, untilT, IntVarT, Variable, PlusOp, MinusOp, MulOp, DivOp, eqOP, ltOp, gtOp, neOp, leOp, geOp, orOp, IntDivOp, modOp, andOp, NotOp, ProcedureT, MacroT, ProcIdT, TrueT, FalseT);
  604.         CommandType = (SetUser1C, SetUser2C, GetPlotCountC, PlotDataC, RequiresC, SetOptionsC, BufferC, GetSpacingC, SetSpacingC, PropagateLutC, PropagateDensityC, PropagateSpatialC, SetCountC, ShowMsgC, UpdateLutC, SetCounterC, RedLutC, GreenLutC, BlueLutC, SaveStateC, RestoreStateC, GetTimeC, SetScaleC, MakeLineC, PlotProfileC, ResliceC, CopyModeC, TriggerC, AverageFramesC, AddSliceC, DeleteSliceC, MakeStackC, GetSliceC, nSlicesC, SelectSliceC, ChooseSliceC, GetMouseC, SetMajorC, SetMinorC, TileC, rAreaC, rMeanC, rStdDevC, rAngleC, rXC, rYC, rLengthC, rMajorC, rMinorC, rMinC, rMaxC, rUser1C, rUser2C, UpdateResultsC, rCountC, HistogramC, ChangeC, ExportC, PicNumC, ScaleSelectionC, ScalingOptionsC, PutPixelC, ChoosePicC, WriteC, WritelnC, AreaC, DensityC, StdC, XyC, ModeC, PerimeterC, MajorC, MinorC, AngleC, IntDensityC, MinMaxC, SetPrecisionC, SetParticleSizeC, AdjustC, IgnoreC, OutlineParticlesC, LabelC, IncludeC, AutoC, PlotXYZC, CalibratedC, cValueC, SameSizeC, GetColumnC, PutColumnC, GetRowC, PutRowC, ShowResultsC, SetWidthC, ScaleMathC, InvertYC, AndC, OrC, XorC, BlendC, ReplaceC, AddC, SubC, MulC, DivC, SetOptionC, GetResultsC, SetLabelsC, SetPlotScaleC, SetDimC, ColumnC, ChannelC, ShowPasteC, NullC, RotateRC, RotateLC, FlipVC, FlipHC, CopyC, SelectC, ClearC, FillC, InvertC, FrameC, PasteC, KillC, RestoreC, AnalyzeC, ConvolveC, NextC, MarkC, MeasureC, ThresholdC, ResetgmC, MakeBinC, DitherC, SmoothC, SharpenC, ShadowC, TraceC, ReduceC, SetSliceC, RedirectC, WaitC, ResetmC, UndoC, SetForeC, SetBackC, ScaleC, HistoC, EnhanceC, EqualizeC, ErodeC, DilateC, OutlineC, ThinC, AddConstC, MulConstC, RevertC, BeepC, NopC, MakeC, MakeOvalC, MoveC, InsetC, MoveToC, LineToC, DrawTextC, DrawNumC, SetFontC, SetFontSizeC, SetTextC, GetPicSizeC, PutMsgC, ExitC, GetRoiC, TruncC, RoundC, GetNumC, StartC, StopC, CaptureC, RandomC, MakeNewC, DrawScaleC, SetPaletteC, GetPixelC, ButtonC, oddC, absC, sqrtC, sinC, cosC, expC, lnC, arctanC, sqrC, OpenC, ImportC, SetImportC, SetMinMaxC, SetCustomC, nPicsC, SelectPicC, SetPicNameC, ApplyLutC, SetSizeC, SaveC, SaveAllC, SaveAsC, CopyResultsC, CloseC, DisposeC, DisposeAllC, DupC, GetInfoC, PrintC, GetLineC);
  605.         SymbolType = packed array[1..SymbolSize] of char;
  606.         VarType = (IntVar, RealVar, BooleanVar);
  607.         SymTabRec = record
  608.                 Symbol: SymbolType;
  609.                 tType: TokenType;
  610.                 cType: CommandType;
  611.                 loc: integer;
  612.             end;
  613.         StackRec = record
  614.                 Symbol: SymbolType;
  615.                 vType: VarType;
  616.                 Value: extended;
  617.             end;
  618.         MacrosRec = record
  619.                 Macros: packed array[0..MaxMacroSize] of char;
  620.                 SymbolTable: array[1..MaxSymbols] of SymTabRec;
  621.                 stack: array[1..MaxStackSize] of StackRec;
  622.                 aLine: LineType;
  623.             end;
  624.         MacrosPtr = ^MacrosRec;
  625.         rsMethodType = (Bilinear, NearestNeighbor);
  626.         TiffColorMapType = array[1..3] of array[0..255] of integer;
  627.         StackIFDType = record
  628.                 nEntries: integer; {2}
  629.                 TiffDir: array[1..6] of TiffEntry; {72}
  630.                 NextIFD: LongInt;  {4}
  631.             end;
  632.  
  633.         SettingsType = record
  634.                 sID: packed array[1..4] of char;
  635.                 sVersion: integer;
  636.                 sForegroundIndex, sBackgroundIndex: integer;
  637.                 sBrushHeight, sBrushWidth: integer;
  638.                 sAirbrushDiameter: integer;
  639.                 sLUTMode: LUTModeType;
  640.                 sOldColorStart: integer;
  641.                 sOldColorWidth: integer;
  642.                 sCurrentFontID: integer;
  643.                 sCurrentStyle: style;
  644.                 sCurrentSize: integer;
  645.                 sTextJust: integer;
  646.                 sTextBack: TextBackType;
  647.                 snExtraColors: integer;
  648.                 sExtraColors: ExtraColorsArray;
  649.                 sInvertVideo: boolean;
  650.                 sMeasurements: set of MeasurementTypes;
  651.                 sInvertPlots, sAutoScalePlots, sLinePlot, sDrawPlotLabels, sFixedSizePlot: boolean;
  652.                 sUnused1: packed array[1..12] of integer;
  653.                 sProfilePlotWidth, sProfilePlotHeight: integer;
  654.                 sFramesToAverage: integer;
  655.                 sNewPicWidth, sNewPicHeight: integer;
  656.                 sBufferSize: LongInt;
  657.                 sMaxScionWidth: integer;
  658.                 sThresholdToForeground, sNonThresholdToBackground: boolean;
  659.                 sVideoChannel: integer;
  660.                 sWhatToImport: WhatToImportType;
  661.                 sImportCustomWidth, sImportCustomHeight: integer;
  662.                 sImportCustomOffset: LongInt;
  663.                 sWandAutoMeasure, sWandAdjustAreas: boolean;
  664.                 sBinaryIterations: integer;
  665.                 sScaleArithmetic: boolean;
  666.                 sInvertPixelValues: boolean;
  667.                 sInvertYCoordinates: boolean;
  668.                 sFieldWidth, sPrecision: integer;
  669.                 sMinParticleSize, sMaxParticleSize: LongInt;
  670.                 sIgnoreParticlesTouchingEdge, sLabelParticles, sOutlineParticles, sIncludeHoles: boolean;
  671.                 sKernelsVRefNum: integer;
  672.                 sKernelsDirID: LongInt;
  673.                 sDefaultVRefNum: integer;
  674.                 sDefaultDirID: LongInt;
  675.                 sOscillatingMovies: boolean;
  676.                 sDriverHalftoning: boolean;
  677.                 sMaxRegions: integer;
  678.                 sImportCustomDepth: FileDepthType;
  679.                 sImportSwapBytes, sImportCalibrate, sImportAutoscale: boolean;
  680.                 sUnused2: packed array[1..12] of integer;
  681.                 sShowHeadings: boolean;
  682.         {Added with V1.40}
  683.                 sProfilePlotMin, sProfilePlotMax: real;
  684.                 sImportMin, sImportMax: real;
  685.                 sHighlightPixels: boolean;
  686.         {Added with V1.41}
  687.                 sBallRadius: integer;
  688.                 sFasterBackgroundSubtraction: boolean;
  689.                 sScaleConvolutions: boolean;
  690.        {Added with V1.42}
  691.                 sBinaryCount: integer;
  692.                 sColorTable: ColorTableType;
  693.                 sColorStart, sColorEnd: integer;
  694.                 sInvertedTable: boolean;
  695.        {Added with V1.44}
  696.                 sHalftoneFrequency, sHalftoneAngle: integer;
  697.                 sHalftoneDotFunction: boolean;
  698.             end;
  699.  
  700.         TiffInfoRec = record
  701.                 Width, Height: integer;
  702.                 BitsPerPixel: integer;
  703.                 ZeroIsBlack: boolean;
  704.                 OffsetToData, OffsetToColorMap, OffsetToImageHeader: LongInt;
  705.                 Resolution: extended;
  706.                 ResUnits: (tCentimeters, tInches, tNoUnits);
  707.                 NextIFD: LongInt;
  708.             end;
  709.  
  710.         TiffIFDTable = array[1..MaxSlices] of record
  711.                 iWidth, iHeight: integer;
  712.                 Offset: LongInt;
  713.                 Invert: boolean;
  714.             end;
  715.  
  716.         PaletteRecType = record
  717.                 NumberOfColors: integer;
  718.                 RedData: ColorArray;
  719.                 GreenData: ColorArray;
  720.                 BlueData: ColorArray;
  721.             end;
  722.  
  723.         ProjectionMethodType = (NearestPoint, BrightestPoint, MeanValue);
  724.         AxisType = (XAxis, YAxis, ZAxis);
  725.  
  726.         CoordinatesType = array[1..MaxCoordinates] of integer;
  727.         xCoordinatesPtr = ^CoordinatesType;
  728.         yCoordinatesPtr = ^CoordinatesType;
  729.         WhatToUndoType = (NothingToUndo, UndoEdit, UndoFlip, UndoRotate, UndoFilter, UndoPaste, UndoTransform, UndoClear, UndoMeasurement, UndoPoint, UndoZoom, UndoOutline, UndoSliceDelete, UndoFirstSliceDelete, UndoLUT);
  730.  
  731.  
  732.  
  733.     var
  734.         TraceInfo: str4;
  735.         finished: boolean;
  736.         trect, gmrect, MapRect, MapRect2, crect, HistoRect: rect;
  737.         gmSlide1, gmslide2, gmSlide1i, gmSlide2i, gmicon1, gmicon2: rect;
  738.         ToolWindow, MapWindow, LUTWindow, ValuesWindow, HistoWindow, PlotWindow, PasteControl: WindowPtr;
  739.         BuggyWatch: CursHandle;
  740.         cr, tab, BackSpace, eof: char;
  741.         CharCount: LongInt;
  742.         ScreenPort: GrafPtr;
  743.         CScreenPort: cGrafPtr;
  744.         ticks: LongInt;
  745.         MonoFunction: ClutTable;
  746.         Info: InfoPtr;
  747.         ToolCursor: array[ToolType] of Cursor;
  748.         PickerCursor, LUTCursor, gmCursor, CrossPlusCursor, CrossMinusCursor, GlassMinusCursor, watch, WandPlusCursor, WandMinusCursor: Cursor;
  749.         CurrentTool, PreviousTool, FirstTool, LastTool: ToolType;
  750.         ToolRect: array[ToolType] of rect;
  751.         ToolChar, ToolCursorChar: array[ToolType] of char;
  752.         ToolTime, LutTime: longInt;
  753.         nPics: integer;
  754.         PicWindow: array[1..MaxPics] of WindowPtr;
  755.         ScreenWidth, ScreenHeight: integer;
  756.         ScreenBase: ptr;
  757.         ScreenRowBytes: LongInt;
  758.         Histogram: HistogramType;
  759.         HistogramSliceStart, HistogramSliceEnd: integer;
  760.         ForegroundIndex, BackgroundIndex: integer;
  761.         lines: array[1..nLineTypes] of rect;
  762.         CheckRect: rect;
  763.         LineWidth, LineIndex: integer;
  764.         StartOfLines: integer;
  765.         MaskRgn: RgnHandle;
  766.         PlotPICT: PicHandle;
  767.         PlotLeft, PlotTop, PlotWidth, PlotHeight: integer;
  768.         PlotMin, PlotMax: extended;
  769.         PlotCount, PlotAvg: integer;
  770.         PlotData: LinePtr;
  771.         PlotMean: extended;
  772.         InvertPlots, AutoscalePlots, LinePlot, DrawPlotLabels, FixedSizePlot: boolean;
  773.         ProfilePlotMin, ProfilePlotMax: extended;
  774.         ProfilePlotWidth, ProfilePlotHeight: integer;
  775.         UndoBuf, ClipBuf, BigBuf: ptr;
  776.         ClipBufSize, UndoBufSize, BigBufSize: LongInt;
  777.         UndoInfoRec: PicInfo;
  778.         UndoInfo: InfoPtr;
  779.         CurrentUndoSize: LongInt;
  780.         AirbrushDiameter, AirbrushRadius, AirbrushRadius2: integer;
  781.         BrushHeight, BrushWidth: integer;
  782.         CurrentFontID, CurrentSize, NumFontItems: integer;
  783.         CurrentStyle: Style;
  784.         InsertionPoint: point; {Offscreen coordinates}
  785.         IsInsertionPoint: boolean;
  786.         TextJust: integer;
  787.         TextBack: TextBackType;
  788.         TextStr: str255;
  789.         TextRect: rect;
  790.         TextStart: point;
  791.         BlinkTime: LongInt;
  792.         pat: array[0..7] of pattern;
  793.         PatIndex: integer;
  794.         OpPending: boolean;
  795.         CurrentOp: OpType;
  796.         IsOK: boolean;
  797.         PicLeftBase, PicTopBase, PicLeft, PicTop: integer;
  798.         ClipBufInfoRec: PicInfo;
  799.         ClipBufInfo: InfoPtr;
  800.         MouseState: (NotInRoi, InRoi, DownInRoi);
  801.         osMouseDownLoc: point;
  802.         OldRoiRect: rect;
  803.         WhatsOnClip: (Nothing, AColor, RectPic, NonRectPic, ImportedPic, CameraPic, TextOnClip);
  804.         ClipTextInBuffer: boolean;
  805.         ExtraColors: ExtraColorsArray;
  806.         nExtraColors: integer;
  807.         PasteTransferMode: integer;
  808.         cheight: integer;
  809.         ExtraColorsRect: array[1..MaxExtraPlus2] of rect;
  810.         ExtraColorsEntry: array[1..MaxExtraPlus2] of integer;
  811.         RoiMode: (MoveMode, StretchMode, LeftEndMode, RightEndMode);
  812.         OldScrapCount: integer;
  813.         ClipboardConverted: boolean;
  814.         results: record
  815.                 tmean: extended;
  816.                 MinIndex, MaxIndex, imode, imean: integer;
  817.             end;
  818.         FrameGrabber: (QuickCapture, Scion, NoFrameGrabber);
  819.         DTSlotBase, ScionSlotBase: LongInt;
  820.         ControlReg, ChannelReg: ptr;
  821.         Digitizing: boolean;
  822.         debugging: boolean;
  823.         NoInfo: InfoPtr;
  824.         NoInfoRec: PicInfo;
  825.         UndoFromClip: boolean;
  826.         DensitySlicing, Thresholding, ThresholdToForeground, NonThresholdToBackground: boolean;
  827.         SliceStart, SliceEnd: integer;
  828.         SliceColor: RGBColor;
  829.         BlankFieldInfo: InfoPtr;
  830.         BlankFieldMean: integer;
  831.         QuickCaptureInfo, ScionInfo: InfoPtr;
  832.         InvertVideo, HighlightSaturatedPixels: boolean;
  833.         VideoChannel: integer;
  834.         TextBufSize, TextBufColumn, TextBufLineCount: integer;
  835.         TextBufP: TextBufPtr;
  836.         BitInfoCount: integer;
  837.         mCount, mCount2: integer;
  838.         nPoints, nLengths, nAngles: integer;
  839.         umean: array[0..MaxStandards] of real; {Uncalibrated means}
  840.         StandardValues: StandardsArray;
  841.         nStandards: integer;
  842.         cvalue: array[0..255] of extended;
  843.         MinValue, MaxValue, FitGoodness, FitSD: extended;
  844.         PlotLeftMargin, PlotTopMargin, PlotBottomMargin, PlotRightMargin: integer;
  845.         WhatToUndo: WhatToUndoType;
  846.         WhatToCopy: (NothingToCopy, CopySelection, CopyCLUT, CopyGrayMap, CopyTools, CopyPlot, CopyCalibrationPlot, CopyHistogram, CopyMeasurements, CopyColor);
  847.         WhatToPrint: (NothingToPrint, PrintImage, PrintSelection, PrintMeasurements, PrintPlot, PrintHistogram);
  848.         PrintRecord: THPrint;
  849.         isLaserWriter: boolean;
  850.         printing: boolean;
  851.         HalftoneFrequency, HalftoneAngle: integer;
  852.         HalftoneDotFunction: boolean;
  853.         AppleMenuH, FileMenuH, EditMenuH, OptionsMenuH, ColorTablesMenuH, PropagateMenuH, EnhanceMenuH, BinaryMenuH, ArithmeticMenuH, BackgroundMenuH, AnalyzeMenuH, SpecialMenuH, StacksMenuH, SortPaletteMenuH, FontMenuH, SizeMenuH, StyleMenuH, WindowsMenuH, UserMenuH, TransferModeMenuH, LineToolMenuH: MenuHandle;
  854.         rleft, rtop: integer;
  855.         ListDone: boolean;
  856.         ResultsWindow: WindowPtr;
  857.         hScrollBar, vScrollBar: ControlHandle;
  858.         ListTE: TEHandle;
  859.         hListPageSize, vListPageSize: integer;
  860.         measuring: boolean;
  861.         Measurements: set of MeasurementTypes;
  862.         nListColumns: integer;
  863.         FramesToAverage: integer;
  864.         xLabel, yLabel, zLabel: string[31];
  865.         xValueLoc, yValueLoc, zValueLoc: integer;
  866.         MenuBarHeight: integer;
  867.         NewPicWidth, NewPicHeight: integer;
  868.         RestoreUndoBuf: boolean;
  869.         WhatToOpen: (OpenImage, OpenPICT2, OpenTIFF, OpenMCID, OpenUnknown, OpenImported, OpenCustom);
  870.         WhatToImport: WhatToImportType;
  871.         ImportCustomWidth, ImportCustomHeight: integer;
  872.         ImportCustomOffset: LongInt;
  873.         ImportCustomDepth: FileDepthType;
  874.         ImportSwapBytes, ImportAll, ImportCalibrate: boolean;
  875.         IntelByteOrder: boolean;
  876.         BufferSize: LongInt;
  877.         MaxScionWidth: integer;
  878.         isSelectionTool: boolean;
  879.         SelectionMode: (NewSelection, AddSelection, SubSelection);
  880.         RoiMovementState: (Unconstrained, Constrained, ConstrainedH, ConstrainedV);
  881.         pcItem: array[1..npcItems] of record
  882.                 r: rect;
  883.                 itype: pcItemType;
  884.                 str: string[20];
  885.             end;
  886.         PictF: integer;
  887.         PictBuffer, curPictBufPtr: ptr;
  888.         BytesInPictBuffer: LongInt;
  889.         FitsInPictBuffer, RoiNudged, GrayMapReady, RedoSelection: boolean;
  890.         ThresholdingMode: (DensitySlice, GrayMapThresholding, BinaryImage, NoThresholding);
  891.         WandAutoMeasure, WandAdjustAreas, RedirectSampling: boolean;
  892.         LabelParticles, OutlineParticles, IgnoreParticlesTouchingEdge, IncludeHoles: boolean;
  893.         MinParticleSize, MaxParticleSize: LongInt;
  894.         OptionKeyWasDown, ScaleArithmetic, FitEllipse, AnalyzingParticles: boolean;
  895.         WhiteRGB, BlackRGB: RGBColor;
  896.         BinaryIterations: integer;
  897.         nMonitors: integer;
  898.         Monitors: array[1..6] of GDHandle;
  899.         ValuesMessage: str255;
  900.         DTStartTicks, DTFrameCount: LongInt;
  901.         SaveAsWhat: SaveAsWhatType;
  902.         ExportAsWhat: ExportAsWhatType;
  903.         SaveAllState: (NoSaveAll, SaveAllStage1, SaveAllStage2);
  904.         InvertPixelValues, InvertYCoordinates, ContinuousHistogram: boolean;
  905.         qcPort: cGrafPtr;
  906.         qcWidth, qcHeight: integer;
  907.         RoiUpdateTime: LongInt; {Time required to draw ROI outline. Set to 0 to force redraw.}
  908.         FieldWidth: integer;
  909.         Precision: integer; {Digits to right of decimal point}
  910.         MeasurementToRedo: integer;
  911.         Has32BitQuickDraw: boolean;
  912.         DefaultRefNum, KernelsRefNum: integer;
  913.         DefaultFileName: string[63];
  914.         rsHScale, rsVScale, rsAngle: real; {Rotate and Scale Parameters}
  915.         rsMethod: rsMethodType;
  916.         rsCreateNewWindow: boolean;
  917.         rsInteractive: boolean;
  918.         TextEol, TextEof: boolean;
  919.         Textf, TextIndex: integer;
  920.         TextFileSize: LongInt;
  921.         nMacros, nSymbols: integer;
  922.         Macro: boolean; {Set true if macro is running.}
  923.         MacrosP: MacrosPtr;
  924.         MacroCommand: CommandType;
  925.         ImportAutoScale: boolean;
  926.         ImportMin, ImportMax: extended;
  927.         OscillatingMovies, DriverHalftoning: boolean;
  928.         ExplicitPalette: PaletteHandle;
  929.         LivePasteMode: boolean;
  930.         ShowCount: boolean;
  931.         PasteControlLeft, PasteControlTop: integer;
  932.         MaxRegions: integer;
  933.         mean: meanPtr;
  934.         sd: sdPtr;
  935.         PixelCount: PixelCountPtr;
  936.         mArea: AreaPtr;
  937.         mode: modePtr;
  938.         IntegratedDensity: IntegratedDensityPtr;
  939.         idBackground: idBackgroundPtr;
  940.         xcenter: xcenterPtr;
  941.         ycenter: ycenterPtr;
  942.         MajorAxis: MajorAxisPtr;
  943.         MinorAxis: MinorAxisPtr;
  944.         orientation: orientationPtr;
  945.         mMin: MinPtr;
  946.         mMax: MaxPtr;
  947.         plength: plengthPtr;
  948.         User1: User1Ptr;
  949.         User2: User2Ptr;
  950.         ResultsLeft, ResultsTop, ResultsWidth, ResultsHeight: integer;
  951.         UnsavedResults: boolean;
  952.         MajorLabel, MinorLabel, User1Label, User2Label: string[9];
  953.         OldSystem, System7: boolean;
  954.         SystemRefNum: integer;
  955.         ShowHeadings: boolean;
  956.         MakingLOI: boolean;
  957.         LOIType: (Straight, Freehand, Segmented);
  958.         MakingStack: boolean;
  959.         FramesWanted: integer;
  960.         ScaleConvolutions: boolean;
  961.         FasterBackgroundSubtraction: boolean;
  962.         BallRadius: integer;
  963.         DelayTicks: integer;
  964.         CmdPeriodToStop: string[21];
  965.         CommandKey: char;
  966.         BinaryCount, BinaryThreshold: integer;
  967.         ClipboardColor: rgbColor;
  968.         InitAngle, TotalAngle, AngleInc,                 {initial, total, and incremental angles of volume rotation}
  969.         TransparencyLower,                                   {pixels below this threshold are transparent}
  970.         TransparencyUpper,                                   {pixels above this threshold are transparent}
  971.         Opacity,                                                       {percentage nearest-point in a combined projection}
  972.         DepthCueSurf,                                             {depth-cueing constant for nearest-pt component}
  973.         DepthCueInt: integer;                                  {depth-cueing constant for other projection components}
  974.         AxisOfRotation: AxisType;                           {project volume as it rotates about x,y,or z-axis}
  975.         SaveProjections,                                         {if TRUE, save and close proj frames once created}
  976.         MinProjSize: boolean;                                {if FALSE, make windows same size regardless of rotation axis}
  977.         ProjectionMethod: ProjectionMethodType;
  978.         MeterWindow: WindowPtr;
  979.         xCoordinates: xCoordinatesPtr;
  980.         yCoordinates: yCoordinatesPtr;
  981.         nCoordinates: integer;
  982.         BlankLine: LinePtr;
  983.         SwitchLUTOnSuspend: boolean;
  984.         SumFrames, ExternalTrigger, BlindMovieCapture: boolean;
  985.  
  986.  
  987.  
  988.  
  989.  
  990. implementation
  991.  
  992. end.