{from Globals.header} var Raw16Pid, Raw8Pid, RawANDPid, RawB16Pid: integer; RawHeight, RawMaskPid, RawWidth, rawDirID, rawVRefNum: integer; frameType, firstFrame, lastFrame, nextFrame, skipFrame: integer; fore, foredef, cropheight, cropwidth, maskheight: integer; maskwidth, b16Pid, i16Pid, s16Pid, m16Pid: integer; o16Pid, i8Pid, referencePid, smoothPid, markPid: integer; maskPid, mask1Pid, mask2Pid, mask3Pid, dilatePid: integer; flagPid, kernelPid, rbKerPid, xlate16uTo8P, std65535Pid: integer; std8191Pid, customLUTPid, xmax, xmin, ymax: integer; ymin, pack16Pid, packDirID, packMarkPid, packVRefNum: integer; {initialize global variables} begin requiresUser('Pixel16u',2); requiresUser('GetPutPixel',1); requiresUser('timer',1); requiresUser('utilities',1); requiresUser('markup',1); {info about the raw data} Raw16Pid := GetMemo('Raw16Pid'); Raw8Pid := GetMemo('Raw8Pid'); RawANDPid := GetMemo('RawANDPid'); RawB16Pid := GetMemo('RawB16Pid'); RawHeight := GetMemo('RawHeight'); RawMaskPid := GetMemo('RawMaskPid'); RawWidth := GetMemo('RawWidth'); rawDirID := GetMemo('rawDirID'); rawVRefNum := GetMemo('rawVRefNum'); {raw data frame numbers} frameType := GetMemo('frameType'); firstFrame := GetMemo('firstFrame'); lastFrame := GetMemo('lastFrame'); nextFrame := GetMemo('nextFrame'); skipFrame := GetMemo('skipFrame'); {mark color} fore := GetMemo('fore'); foredef := GetMemo('foredef'); {cropped image dimensions} cropheight := GetMemo('cropheight'); cropwidth := GetMemo('cropwidth'); maskheight := GetMemo('maskheight'); maskwidth := GetMemo('maskwidth'); {scratch image pidNumbers} b16Pid := GetMemo('b16Pid'); i16Pid := GetMemo('i16Pid'); s16Pid := GetMemo('s16Pid'); m16Pid := GetMemo('m16Pid'); o16Pid := GetMemo('o16Pid'); i8Pid := GetMemo('i8Pid'); referencePid := GetMemo('referencePid'); smoothPid := GetMemo('smoothPid'); markPid := GetMemo('markPid'); maskPid := GetMemo('maskPid'); mask1Pid := GetMemo('mask1Pid'); mask2Pid := GetMemo('mask2Pid'); mask3Pid := GetMemo('mask3Pid'); dilatePid := GetMemo('dilatePid'); flagPid := GetMemo('flagPid'); {kernel information} kernelPid := GetMemo('kernelPid'); rbKerPid := GetMemo('rbKerPid'); xlate16uTo8P := GetMemo('xlate16uTo8P'); std65535Pid := GetMemo('std65535Pid'); std8191Pid := GetMemo('std8191Pid'); customLUTPid := GetMemo('customLUTPid'); xmax := GetMemo('xmax'); xmin := GetMemo('xmin'); ymax := GetMemo('ymax'); ymin := GetMemo('ymin'); {packed stack info} pack16Pid := GetMemo('pack16Pid'); packDirID := GetMemo('packDirID'); packMarkPid := GetMemo('packMarkPid'); packVRefNum := GetMemo('packVRefNum'); if pidExists(GetMemo('frontPid')) then selectPic(GetMemo('frontPid')); {end from Globals.header} end; macro '[F5] 16 bit arithmetic'; begin SetMemo('frontPid', pidNumber); SelectWindow('16 bit arithmetic'); LoadMacros; end; macro '[F6] Adjust 16 bit LUT'; begin SetMemo('frontPid', pidNumber); SelectWindow('Adjust 16 bit LUT'); LoadMacros; end; macro '[F7] Calculate Intensity'; begin SetMemo('frontPid', pidNumber); SelectWindow('Calculate Intensity'); LoadMacros; end; macro '[F8] Create Kernels'; begin SetMemo('frontPid', pidNumber); SelectWindow('Create Kernels'); LoadMacros; end; macro '[F9] Examine Old 16 bit Stacks'; begin SetMemo('frontPid', pidNumber); SelectWindow('Examine Old 16 bit Stacks'); LoadMacros; end; macro '[F10] Examine Packed 16 bit stack'; begin SetMemo('frontPid', pidNumber); SelectWindow('Examine Packed 16 bit stack'); LoadMacros; end; macro '[F11] Examine Raw Data'; begin SetMemo('frontPid', pidNumber); SelectWindow('Examine Raw Data'); LoadMacros; end; macro '([F12] Front Image Is ...'; begin end; macro '(-'; begin end; macro 'Front image is mask image'; begin maskPid := pidNumber; SetMemo('maskPid', maskPid); end; macro 'Front image is Raw mask image'; begin RawMaskPid := pidNumber; SetMemo('RawMaskPid', RawMaskPid); end; macro 'Front image is mark image'; begin markPid := pidNumber; SetMemo('markPid', markPid); end; macro 'Front image is 16 bit background image'; begin b16Pid := pidNumber; SetMemo('b16Pid', b16Pid); end; macro 'Front image is packed 16 bit stack'; begin pack16Pid := pidNumber; SetMemo('pack16Pid', pack16Pid); end; macro 'Front image is packed mark stack'; begin packMarkPid := pidNumber; SetMemo('packMarkPid', packMarkPid); end; macro 'Front image is 16 to 8 conversion table'; begin xlate16uTo8P := pidNumber; SetMemo('xlate16uTo8P', xlate16uTo8P); end; macro 'Front image is 8 bit display buffer'; begin i8Pid := pidNumber; SetMemo('i8Pid', i8Pid); end; macro 'Front image is 16 bit slice buffer'; begin i16Pid := pidNumber; SetMemo('i16Pid', i16Pid); end; macro 'Front image is background kernel'; begin kernelPid := PidNumber; SetMemo('kernelPid', kernelPid); end; macro 'Front image is smoothing kernel'; begin smoothPid := PidNumber; SetMemo('smoothPid', smoothPid); end; macro 'Front image is rolling ball kernel'; begin rbKerPid := PidNumber; SetMemo('rbKerPid', rbKerPid); end; macro 'Front image is reference image'; begin referencePid := pidNumber; SetMemo('referencePid', referencePid); end; macro '-)'; begin end; macro 'Bring mask image to front'; begin selectPic(maskPid); end; macro 'Bring mark image to front'; begin selectPic(markPid); end; macro 'Bring packed 16 bit stack to front'; begin selectPic(pack16Pid); end; macro 'Bring packed mark stack to front'; begin selectPic(packMarkPid); end; macro 'Bring 16 to 8 conversion table to front'; begin selectPic(xlate16uTo8P); end; macro 'Bring 8 bit image buffer to front'; begin selectPic(i8Pid); end; macro 'Bring 16 bit image buffer to front'; begin selectPic(i16Pid); end; macro 'Bring background kernel to front'; begin selectPic(kernelPid); end; macro 'Bring smoothing kernel to front'; begin selectPic(smoothPid); end; macro 'Bring rolling ball kernel to front'; begin selectPic(rbKerPid); end; macro 'Bring reference image to front'; begin selectPic(referencePid); end; macro '-)'; begin end; macro 'Select data image'; begin SelectPic(MarkupPicNumber('data')); end; macro 'Select data16 image'; begin SelectPic(MarkupPicNumber('data16')); end; macro 'Select marks image'; begin SelectPic(MarkupPicNumber('mark')); end; macro 'Select bkg image'; begin SelectPic(MarkupPicNumber('bkg')); end; macro '-)'; begin end; macro 'Display front 8 bit image as markup data pixels'; begin MarkupData(picNumber); MarkupShow; end; macro 'Display front 8 bit image as markup mark pixels'; begin MarkupMarks(picNumber); MarkupShow; end; macro 'Display front 16 bit image as markup foreground graph'; begin MarkupData16(picNumber); MarkupShow; end; macro 'Display front 16 bit image as markup background graph'; begin MarkupBkg(picNumber); MarkupShow; end; macro 'Restore normal markup display'; begin ChoosePic(i8Pid); MarkupData8(picNumber); ChoosePic(i16Pid); MarkupData16(picNumber); ChoosePic(b16Pid); MarkupBkg(picNumber); ChoosePic(markPid); MarkupMarks(picNumber); MarkupShow; end;