1
by Michael Hanke
Import upstream version 0.20100725.1~dfsg.1 |
1 |
unit mni; |
2 |
||
3 |
{$mode objfpc}{$H+}
|
|
4 |
||
5 |
interface
|
|
6 |
||
7 |
uses
|
|
8 |
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Spin; |
|
9 |
||
10 |
type
|
|
11 |
||
12 |
{ TMNIForm }
|
|
13 |
||
14 |
TMNIForm = class(TForm) |
|
15 |
XEdit: TSpinEdit; |
|
16 |
YEdit: TSpinEdit; |
|
17 |
ZEdit: TSpinEdit; |
|
18 |
procedure FormCreate(Sender: TObject); |
|
19 |
procedure XEditChange(Sender: TObject); |
|
20 |
private
|
|
21 |
{ private declarations }
|
|
22 |
public
|
|
23 |
{ public declarations }
|
|
24 |
end; |
|
25 |
||
26 |
var
|
|
27 |
MNIForm: TMNIForm; |
|
28 |
||
29 |
implementation
|
|
30 |
uses define_types, nifti_img,nifti_img_view; |
|
31 |
{ TMNIForm }
|
|
32 |
||
33 |
procedure TMNIForm.XEditChange(Sender: TObject); |
|
34 |
var
|
|
35 |
lXmm,lYmm,lZmm: single; |
|
36 |
lX,lY,lZ: integer; |
|
37 |
begin
|
|
38 |
if not MNIForm.visible then exit; |
|
39 |
if gMRIcroOverlay[kBGOverlayNum].ScrnBufferItems=0 then |
|
40 |
exit; |
|
41 |
lXmm:=XEdit.value; |
|
42 |
lYmm:=YEdit.value; |
|
43 |
lZmm:=ZEdit.value; |
|
44 |
MMToImgCoord(lX,lY,lZ,lXmm,lYmm,lZmm); |
|
45 |
if lX <> ImgForm.XViewEdit.value then ImgForm.XViewEdit.value := lX; |
|
46 |
if lY <> ImgForm.YViewEdit.value then ImgForm.YViewEdit.value := lY; |
|
47 |
if lZ <> ImgForm.ZViewEdit.value then ImgForm.ZViewEdit.value := lZ; |
|
48 |
ImgForm.XViewEditChange(nil); |
|
49 |
end; |
|
50 |
||
51 |
procedure TMNIForm.FormCreate(Sender: TObject); |
|
52 |
begin
|
|
53 |
||
54 |
end; |
|
55 |
||
56 |
initialization
|
|
57 |
{$I mni.lrs}
|
|
58 |
||
59 |
end. |
|
60 |