home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / software / mac / nihimage / nih_beta.hqx / nih-image155beta62.sit / Macros / Stacks < prev    next >
Encoding:
Text File  |  1994-03-21  |  14.5 KB  |  712 lines  |  [TEXT/Imag]

  1. {This file contains macros that work with stacks.}
  2.  
  3. procedure CheckForStack;
  4. begin
  5.   if nPics=0 then begin
  6.     PutMessage('This macro requires a stack.');
  7.     exit;
  8.   end;
  9.   if nSlices=0 then begin
  10.     PutMessage('This window is not a stack.');
  11.     exit
  12.   end;
  13. end;
  14.  
  15.  
  16. macro 'Add Slice [A]';    begin CheckForStack; AddSlice end;
  17. macro 'Delete Slice [D]'; begin CheckForStack; DeleteSlice end;
  18. macro 'First Slice [F]';  begin CheckForStack; SelectSlice(1) end;
  19. macro 'Last Slice [L]';   begin CheckForStack; SelectSlice(nSlices) end;
  20.  
  21. macro 'Select Slice╔ [S]';
  22. var
  23.   n:integer;
  24. begin
  25.  CheckForStack;
  26.  n:=GetNumber('Slice Number:',trunc(nSlices/2));
  27.  SelectSlice(n)
  28. end;
  29.  
  30.  
  31. macro '(-' begin end;
  32.  
  33. macro 'Smooth';
  34. var
  35.   i:integer;
  36. begin
  37.   CheckForStack;
  38.   for i:= 1 to nSlices do begin
  39.     SelectSlice(i);
  40.     SetOption; Smooth;
  41.   end;
  42. end;
  43.  
  44.  
  45. macro 'Sharpen';
  46. var
  47.   i:integer;
  48. begin
  49.   CheckForStack;
  50.   for i:= 1 to nSlices do begin
  51.     SelectSlice(i);
  52.     SetOption; Smooth;
  53.     SetOption; Sharpen;
  54.   end;
  55. end;
  56.  
  57.  
  58. macro 'Reduce Noise';
  59. var
  60.   i:integer;
  61. begin
  62.   CheckForStack;
  63.   for i:= 1 to nSlices do begin
  64.     SelectSlice(i);
  65.     ReduceNoise;
  66.   end;
  67. end;
  68.  
  69.  
  70. macro 'Apply LUT';
  71. var
  72.   i,stack,slices:integer;
  73. begin
  74.   CheckForStack;
  75.   stack:=PicNumber;
  76.   slices:=nSlices;
  77.   Duplicate('Temp');
  78.   for i:= 1 to slices do begin
  79.     SelectPic(stack);
  80.     SelectSlice(i);
  81.     ApplyLut;
  82.     SelectPic(nPics);
  83.     if i<>slices then PropagateLut;
  84.   end;
  85.   SelectPic(nPics);
  86.   Dispose;
  87. end;
  88.  
  89.  
  90. macro 'Fix Colors';
  91. {
  92. Changes 0 to 1 and 255 to 254 in all slices. We want to do this because
  93. pixel values of 0(which always displays as white) and 255(always
  94. displays as black) cause problems when pseudo-coloring images.
  95. }
  96. var
  97.   i:integer;
  98. begin
  99.   CheckForStack;
  100.   for i:= 1 to nSlices do begin
  101.     SelectSlice(i);
  102.     ChangeValues(0,0,1);
  103.     ChangeValues(255,255,254);
  104.   end;
  105. end;
  106.  
  107.  
  108. macro '(-' begin end;
  109.  
  110.  
  111. procedure CheckForSelection;
  112. var 
  113.   x1,y1,x2,y2,LineWidth:integer;
  114. begin
  115.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  116.   GetLine(x1,y1,x2,y2,LineWidth);
  117.   if (RoiWidth=0) or (x1>=0) then begin
  118.     PutMessage('Please make a rectangular selection.');
  119.     exit;
  120.   end;
  121. end;
  122.  
  123.  
  124. procedure CropAndScale(fast:boolean; angle:real);
  125. var
  126.   i,OldStack,NewStack:integer;
  127.   RoiLeft,RoiTop,RoiWidth,RoiHeight:integer;
  128.   N,NewWidth:integer;
  129.   ScaleFactor:real;
  130.   OneToOne:boolean;
  131. begin
  132.   CheckForStack;
  133.   CheckForSelection;
  134.   SaveState;
  135.   OldStack:=PicNumber;
  136.   N:=nSlices;
  137.   ScaleFactor:=GetNumber('Scale factor(0.05..25):',1.0);
  138.   OneToOne:=ScaleFactor=1.0;
  139.   NewWidth:=round(RoiWidth*ScaleFactor);
  140.   if odd(NewWidth) then begin
  141.     NewWidth:=NewWidth-1;
  142.     ScaleFactor:=NewWidth/RoiWidth;
  143.   end;
  144.   SetNewSize(RoiWidth*ScaleFactor,RoiHeight*ScaleFactor);
  145.   MakeNewStack('Stack');
  146.   NewStack:=PicNumber;
  147.   if not OneToOne then begin
  148.     if fast 
  149.       then SetScaling('Nearest; Create New Window')
  150.       else SetScaling('Bilinear; Create New Window');
  151.   end;
  152.   SelectPic(OldStack);
  153.   for i:= 1 to N do begin
  154.     SelectSlice(1);
  155.     if OneToOne and (angle=0.0) then Duplicate('Temp')
  156.       else ScaleAndRotate(ScaleFactor,ScaleFactor,angle);
  157.     SelectAll;
  158.     Copy;
  159.     SelectPic(NewStack);
  160.     if i<>1 then AddSlice;
  161.     Paste;
  162.     SelectPic(nPics);
  163.     Dispose; {Temp}
  164.     SelectPic(OldStack);
  165.     DeleteSlice;
  166.   end;
  167.   Dispose; {OldStack}
  168.   RestoreState;
  169. end;
  170.  
  171. macro 'Crop and Scale-Fast╔';   begin CropAndScale(true, 0); end;
  172. macro 'Crop and Scale-Smooth╔'; begin CropAndScale(false, 0); end;
  173.  
  174. procedure Rotate(left:boolean);
  175. var
  176.   i,OldStack,NewStack:integer;
  177.   RoiLeft,RoiTop,RoiWidth,RoiHeight:integer;
  178.   N,NewWidth:integer;
  179.   ScaleFactor,SliceSpacing:real;
  180.   OneToOne:boolean;
  181. begin
  182.   CheckForStack;
  183.   SelectAll;
  184.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  185.   OldStack:=PicNumber;
  186.   SliceSpacing:=GetSliceSpacing;
  187.   N:=nSlices;
  188.   SetNewSize(RoiHeight,RoiWidth);
  189.   MakeNewStack('Stack');
  190.   if SliceSpacing>0 then SetSliceSpacing(SliceSpacing);
  191.   NewStack:=PicNumber;
  192.   SelectPic(OldStack);
  193.   for i:= 1 to N do begin
  194.     SelectSlice(1);
  195.     if left
  196.       then RotateLeft(true)
  197.       else RotateRight(true);
  198.     SelectAll;
  199.     Copy;
  200.     SelectPic(NewStack);
  201.     if i<>1 then AddSlice;
  202.     Paste;
  203.     ChoosePic(nPics);
  204.     Dispose;
  205.     SelectPic(OldStack);
  206.     DeleteSlice;
  207.   end;
  208.   Dispose;
  209. end;
  210.  
  211.  
  212. macro 'Rotate Left';  begin rotate(true) end;
  213. macro 'Rotate Right'; begin rotate(false) end;
  214.  
  215.  
  216. macro 'Rotate╔';
  217. var
  218.   angle:real;
  219. begin
  220.   angle:=GetNumber('Angle(-180.0í..180.0í):',45.0);
  221.   CropAndScale(false, angle);
  222. end;
  223.  
  224.  
  225. macro 'Invert';
  226. var
  227.   i:integer;
  228. begin
  229.   CheckForStack;
  230.   for i:= 1 to nSlices do begin
  231.     SelectSlice(i);
  232.     Invert;
  233.   end;
  234. end;
  235.  
  236.  
  237. procedure flip(vertical:boolean);
  238. var
  239.   i:integer;
  240.   SliceSpacing:real;
  241. begin
  242.   CheckForStack;
  243.   for i:= 1 to nSlices do begin
  244.     SelectSlice(i);
  245.     if vertical
  246.       then FlipVertical
  247.       else FlipHorizontal;
  248.   end;
  249. end;
  250.  
  251. macro 'Flip Vertical';   begin flip(true) end;
  252. macro 'Flip Horizontal'; begin flip(false) end;
  253.  
  254.  
  255. macro 'Delete Even Slices';
  256. var
  257.   n:integer;
  258. begin
  259.   CheckForStack;
  260.   SelectSlice(2);
  261.   repeat
  262.     DeleteSlice;
  263.     n:=SliceNumber;
  264.     n:=n+2;
  265.     if n>nSlices then exit;
  266.     SelectSlice(n);
  267.    until false;
  268. end;
  269.  
  270.  
  271. macro 'Replicate Slices╔';
  272. var
  273.   n,i,RepFactor:integer;
  274. begin
  275.   CheckForStack;
  276.   RepFactor:=GetNumber('Replication factor(2,3,4,5,etc):',2);
  277.   n:=nSlices;
  278.   repeat
  279.     SelectSlice(n);
  280.     SelectAll;
  281.     Copy;
  282.     for i:=2 to RepFactor do begin
  283.       AddSlice;
  284.       Paste;
  285.     end;
  286.     n:=n-1;
  287.    until n=0;
  288.    KillRoi;
  289. end;
  290.  
  291.  
  292. macro 'Merge Two Stacks';
  293. {
  294. Combines two stacks(w1xh1xd1 and w2xh2xd2) to create a new
  295. w1+w2 x max(h1,h2) x max(d1,d2) stack. For example, a 256x256x40
  296. and a 256x256x30 stack would be combined into one 512x256x40 stack.
  297. }
  298. var
  299.   i,w1,w2,w3,h1,h2,h3,d1,d2,d3:integer;
  300. begin
  301.   SaveState;
  302.   if nPics<>2 then begin
  303.     PutMessage('This macro operates on exactly two stacks.');
  304.     exit;
  305.   end;
  306.   SelectPic(1);
  307.   GetPicSize(w1,h1);
  308.   d1:=nSlices;
  309.   SelectPic(2);
  310.   GetPicSize(w2,h2);
  311.   d2:=nSlices;
  312.   if d1>=d2
  313.     then d3:=d1
  314.     else d3:=d2;
  315.   if d3=0 then begin
  316.     PutMessage('Both images must be stacks.');
  317.     exit;
  318.   end;
  319.   w3:=w1+w2;
  320.   if h1>=h2
  321.     then h3:=h1
  322.     else h3:=h2;
  323.   SetNewSize(w3,h3);
  324.   MakeNewStack('Merged');
  325.   for i:=1 to d3 do begin
  326.     SelectPic(1);
  327.     SelectSlice(1);
  328.     SelectAll;
  329.     Copy;
  330.     DeleteSlice;
  331.     SelectPic(3);
  332.     MakeRoi(0,0,w1,h1);
  333.     Paste;
  334.     SelectPic(2);
  335.     SelectSlice(1);
  336.     SelectAll;
  337.     Copy;
  338.     DeleteSlice;
  339.     SelectPic(3);
  340.     MakeRoi(w1,0,w2,h2);
  341.     Paste;
  342.     if i<d3 then AddSlice;
  343.   end;
  344.   SelectPic(1);
  345.   Dispose;
  346.   SelectPic(1);
  347.   Dispose;
  348.   RestoreState;
  349. end;
  350.  
  351.  
  352. macro 'Average Two Stacks';
  353. {Creates the frame by frame average of two stacks.}
  354. var
  355.   i,w1,w2,w3,h1,h2,h3,d1,d2,d3,avg:integer;
  356. begin
  357.   RequiresVersion(1.53);
  358.   SaveState;
  359.   if nPics<>2 then begin
  360.     PutMessage('This macro operates on exactly two stacks.');
  361.     exit;
  362.   end;
  363.   SelectPic(1);
  364.   KillRoi;
  365.   GetPicSize(w1,h1);
  366.   d1:=nSlices;
  367.   SelectPic(2);
  368.   KillRoi;
  369.   GetPicSize(w2,h2);
  370.   d2:=nSlices;
  371.   if d1>=d2
  372.     then d3:=d1
  373.     else d3:=d2;
  374.   if (w1<>w2) or (h1<>h2) or (d1<>d2) or (d1=0)  then begin
  375.     PutMessage('This macro requires two stacks that are the same size.');
  376.     exit;
  377.   end;
  378.   SetNewSize(w1,h1);
  379.   MakeNewStack('Average');
  380.   avg:=PicNumber;
  381.   for i:=1 to d1 do begin
  382.     SelectPic(1);
  383.     SelectSlice(i);
  384.     SelectPic(2);
  385.     SelectSlice(i);
  386.    ImageMath('Add', 1, 2, 0.5, 0, 'Temp');
  387.     SelectAll;
  388.     Copy;
  389.     dispose;
  390.     SelectPic(avg);
  391.     if i<>1 then AddSlice;
  392.     paste;
  393.    end;
  394.   RestoreState;
  395. end;
  396.  
  397.  
  398. macro '(-' begin end;
  399.  
  400.  
  401. macro 'Save Slices as files╔';
  402. {
  403. This macro saves the slices in a stack as individual TIFF or PICT files using
  404. names of the form needed by Apple's Convert to [QuickTime]Movie utility.
  405. To specify the file type, checked either TIFF or PICT in the SaveAs dialog
  406. box, which should only appear once.
  407. }
  408. var
  409.   i,stack:integer;
  410. begin
  411.   CheckForStack;
  412.   stack:=PicNumber;
  413.   for i:= 1 to nSlices do begin
  414.     SelectPic(stack);
  415.     SelectSlice(i);
  416.     Duplicate('Frame.',i:2);
  417.     SaveAs;
  418.     {Export;}
  419.     Dispose;
  420.   end;
  421. end;
  422.  
  423.  
  424. macro 'Windows to Stack';
  425. {Unlike the menu command of the same name, the windows do not}
  426. {all need to be the same size.}
  427. var
  428.   i,width,height,MinWidth,MinHeight,n,stack:integer;
  429.   isStack:boolean;
  430. begin
  431.   if nPics<=1 then begin
  432.     PutMessage('At least two images must be open.');
  433.     exit;
  434.   end;
  435.   MinWidth:=9999;
  436.   MinHeight:=9999;
  437.   isStack:=false;
  438.   for i:=1 to nPics do begin
  439.     SelectPic(i);
  440.     GetPicSize(width,height);
  441.     if width<MinWidth then MinWidth:=width;
  442.     if height<MinHeight then MinHeight:=height;
  443.     isStack:=isStack or (nSlices>0);
  444.   end;
  445.   if isStack then begin
  446.     PutMessage('This macro does not work with stacks.');
  447.     exit;
  448.   end;
  449.   if odd(MinWidth) then MinWidth:=MinWidth-1;
  450.   n:=nPics;
  451.   SaveState;
  452.   SetNewSize(MinWidth,MinHeight);
  453.   MakeNewStack('Stack');
  454.   stack:=nPics;
  455.   for i:=1 to n do begin
  456.     SelectPic(1);
  457.     MakeRoi(0,0,MinWidth,MinHeight);
  458.     copy;
  459.     Dispose;
  460.     SelectPic(nPics);
  461.     paste;
  462.     if i<>n then AddSlice;
  463.   end;
  464.   KillRoi;
  465.   RestoreState;
  466. end;
  467.  
  468.  
  469. Macro 'Stack to Windows'
  470. var
  471.   mystack,i:integer
  472.   width,height:integer;
  473. begin
  474.   SaveState;
  475.   CheckForStack;
  476.   GetPicSize(width,height);
  477.   SetNewSize(width,height);
  478.   mystack := picnumber;
  479.   for i:=1 to nslices do begin
  480.     SelectSlice(i);
  481.     SelectAll;
  482.     copy;
  483.     MakeNewWindow(i);
  484.     paste;
  485.     SelectPic(myStack);
  486.   end;
  487.   KillRoi;
  488.   RestoreState;
  489. end;
  490.  
  491.  
  492. macro 'Make Cone';
  493. var
  494.   i,size,margin,MaxRadius,r,r2,center,RodLength,color:integer;
  495. begin
  496.   size:=64;
  497.   margin:=5;
  498.   color:=100;
  499.   SaveState;
  500.   SetBackgroundColor(255); {Black}
  501.   SetNewSize(size,size);
  502.   MakeNewStack('Cone');
  503.   for i:=1 to margin do AddSlice;
  504.   MaxRadius:=(size-2*margin)/2;
  505.   center:=size div 2;
  506.   RodLength:=size-2*margin-1;
  507.   for i:=1 to RodLength do begin
  508.     AddSlice;
  509.     r:=MaxRadius*(i/RodLength);
  510.     MakeOvalRoi(center-r,center-r,r*2,r*2);
  511.     SetForegroundColor(color);
  512.     Fill;
  513.     if (i>RodLength/2) and (i<(RodLength-margin)) then begin
  514.       r2:=MaxRadius/6;
  515.       MakeOvalRoi(center-2.125*r2,center-1.3*r2,r2*2,r2*2);
  516.       SetForegroundColor(color-25);
  517.       Fill;
  518.       MakeOvalRoi(center+0.625*r2,center-0.7*r2,r2*2,r2*2);
  519.       SetForegroundColor(color+25);
  520.       Fill;
  521.     end;
  522.   end;
  523.   for i:=1 to margin do AddSlice;
  524.   KillRoi;
  525.   RestoreState;
  526. end;
  527.  
  528.  
  529. macro 'Animate';
  530. var
  531.   i:integer;
  532. begin
  533.   CheckForStack;
  534.   i:=0;
  535.   repeat
  536.     i:=i+1;
  537.     if i>nSlices then i:=1;
  538.     SelectSlice(i);
  539.   until button;
  540. end;
  541.  
  542.  
  543. procedure DoReslicing(horizontal:boolean);
  544. var
  545.   stack1,stack2,width,height:integer;
  546.   RoiLeft,RoiTop,RoiWidth,RoiHeight,max:integer;
  547.   InputSpacing,OutputSpacing,loc:real;
  548.   FirstTime:boolean;
  549. begin
  550.   RequiresVersion(1.45);
  551.   CheckForStack;
  552.   CheckForSelection;
  553.   SaveState;
  554.   SetBackground(0);
  555.   SetBackground(255);
  556.   stack1:=PicNumber;
  557.   InputSpacing:=GetSliceSpacing;
  558.   if InputSpacing<=0 then InputSpacing:=1;
  559.   InputSpacing:=GetNumber('Input Slice Spacing(Pixels):',InputSpacing);
  560.   SetSliceSpacing(InputSpacing);
  561.   OutputSpacing:=InputSpacing;
  562.   OutputSpacing:=GetNumber('Output Slice Spacing (Pixels):', OutputSpacing);
  563.   FirstTime:=true;
  564.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  565.   if horizontal then begin
  566.     loc:=RoiTop+OutputSpacing;
  567.     max:=RoiTop+RoiHeight;
  568.   end else begin
  569.     loc:=RoiLeft+OutputSpacing;
  570.     max:=RoiLeft+RoiWidth;
  571.   end;
  572.   while loc<max do begin
  573.     ChoosePic(stack1);
  574.     if horizontal
  575.       then MakeLineRoi(RoiLeft,loc,RoiLeft+RoiWidth,loc)
  576.       else MakeLineRoi(loc,RoiTop,loc,RoiTop+RoiHeight);
  577.     Reslice;
  578.     SelectAll;
  579.     Copy;
  580.     GetPicSize(width,height);
  581.     Dispose;
  582.     if FirstTime then begin
  583.       SetNewSize(width,height);
  584.       MakeNewStack(OutputSpacing:1:2);
  585.       SetSliceSpacing(OutputSpacing);
  586.       stack2:=PicNumber;
  587.     end;
  588.     ChoosePic(stack2);
  589.     if not FirstTime then AddSlice;
  590.     Paste;
  591.     loc:=loc+OutputSpacing;
  592.     FirstTime:=false;
  593.   end;
  594.   SelectPic(stack1);
  595.   KillRoi;
  596.   SelectPic(stack2);
  597.   KillRoi;
  598.   RestoreState;
  599. end;
  600.  
  601.  
  602. macro 'Reslice Horizontally╔'; begin DoReslicing(true) end;
  603. macro 'Reslice Vertically╔';   begin DoReslicing(false) end;
  604.  
  605.  
  606. macro '(-' begin end;
  607.  
  608.  
  609. procedure ResliceSignaMRI(horizontal,OptionKey:boolean);
  610. var
  611.   stack1,stack2,width,height:integer;
  612.   RoiLeft,RoiTop,RoiWidth,RoiHeight,max:integer;
  613.   loc,PixelSpacing:real;
  614.   InputSpacing,OutputSpacing:real; {mm}
  615.   scale:real; {pixels/mm}  
  616.   FirstTime:boolean;
  617. begin
  618.   scale:=1.0666; {Assumes 256x256 slices and 240mm field of view}
  619.   RequiresVersion(1.45);
  620.   CheckForStack;
  621.   CheckForSelection;
  622.   SaveState;
  623.   SetScale(scale,'mm');
  624.   SetBackground(0);
  625.   SetBackground(255);
  626.   stack1:=PicNumber;
  627.   InputSpacing:=GetSliceSpacing/scale;
  628.   if InputSpacing<=0 then InputSpacing:=1.5;
  629.   InputSpacing:=GetNumber('Input Slice Spacing(mm):',InputSpacing);
  630.   SetSliceSpacing(InputSpacing*scale);
  631.   OutputSpacing:=InputSpacing;
  632.   OutputSpacing:=GetNumber('Output Slice Spacing (mm):', OutputSpacing);
  633.   PixelSpacing:=OutputSpacing*scale;
  634.   FirstTime:=true;
  635.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  636.   if horizontal then begin
  637.     loc:=RoiTop+PixelSpacing;
  638.     max:=RoiTop+RoiHeight;
  639.   end else begin
  640.     loc:=RoiLeft+PixelSpacing;
  641.     max:=RoiLeft+RoiWidth;
  642.   end;
  643.   while loc<max do begin
  644.     ChoosePic(stack1);
  645.     if horizontal
  646.       then MakeLineRoi(RoiLeft,loc,RoiLeft+RoiWidth,loc)
  647.       else MakeLineRoi(loc,RoiTop,loc,RoiTop+RoiTop+RoiHeight);
  648.     if OptionKey then SetOption;
  649.     Reslice;
  650.     SelectAll;
  651.     Copy;
  652.     GetPicSize(width,height);
  653.     Dispose;
  654.     if FirstTime then begin
  655.       SetNewSize(width,height);
  656.       MakeNewStack(OutputSpacing:1:2);
  657.       SetSliceSpacing(PixelSpacing);
  658.       stack2:=PicNumber;
  659.     end;
  660.     ChoosePic(stack2);
  661.     if not FirstTime then AddSlice;
  662.     Paste;
  663.     loc:=loc+PixelSpacing;
  664.     FirstTime:=false;
  665.   end;
  666.   SelectPic(stack1);
  667.   KillRoi;
  668.   SelectPic(stack2);
  669.   KillRoi;
  670.   RestoreState;
  671. end;
  672.  
  673.  
  674. macro 'Import GE Signa Files╔';
  675. Var
  676.   i,n,max,stack,first:integer;
  677.   scale:real; {pixels/mm}
  678. begin
  679.   scale:=1.066666; {assumes 256x256 slices with 240mm field of view}
  680.   first:=round(GetNumber('Number of first slice:',1));
  681.   max:=round(GetNumber('Maximum pixel value:',255));
  682.   SetNewSize(256,256);
  683.   MakeNewStack('Stack');
  684.   stack:=nPics;
  685.   MoveWindow(340,40);
  686.   SetScale(scale,'mm');
  687.   SetCustom(256,256,14336);
  688.   SetImport('Custom; 16-bits Signed; Fixed Scale');
  689.   SetImportMinMax(0,max);
  690.   n:=first;
  691.   for i:=1 to 256 do begin
  692.     Import('i.',n:3);
  693.     SetPicName('i.',n:3);
  694.     SelectAll;
  695.     Copy;
  696.     Dispose;
  697.     SelectPic(stack);
  698.     if n<>first then AddSlice;
  699.     n:=n+1;
  700.     Paste;
  701.    end;
  702. end;
  703.  
  704.  
  705. macro 'Sagitals to Coronals╔'; begin ResliceSignaMRI(false,true) end;
  706.  
  707. macro 'Sagitals to Axials╔'; begin ResliceSignaMRI(true,true) end;
  708.  
  709. macro 'Coronals to Sagitals╔'; begin ResliceSignaMRI(false,true) end;
  710.  
  711.  
  712.