File: mni.pas

package info (click to toggle)
mricron 0.20140804.1~dfsg.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 13,508 kB
  • sloc: pascal: 114,876; sh: 49; makefile: 35
file content (60 lines) | stat: -rwxr-xr-x 1,219 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
unit mni;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Spin;

type

  { TMNIForm }

  TMNIForm = class(TForm)
    XEdit: TSpinEdit;
    YEdit: TSpinEdit;
    ZEdit: TSpinEdit;
    procedure FormCreate(Sender: TObject);
    procedure XEditChange(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end; 

var
  MNIForm: TMNIForm;

implementation
uses define_types, nifti_img,nifti_img_view;
{ TMNIForm }

procedure TMNIForm.XEditChange(Sender: TObject);
  var
lXmm,lYmm,lZmm: single;
lX,lY,lZ: integer;
begin
 if not MNIForm.visible then exit;
 if gMRIcroOverlay[kBGOverlayNum].ScrnBufferItems=0 then
		exit;
 lXmm:=XEdit.value;
 lYmm:=YEdit.value;
 lZmm:=ZEdit.value;
 MMToImgCoord(lX,lY,lZ,lXmm,lYmm,lZmm);
 if lX <> ImgForm.XViewEdit.value then ImgForm.XViewEdit.value := lX;
 if lY <> ImgForm.YViewEdit.value then ImgForm.YViewEdit.value := lY;
 if lZ <> ImgForm.ZViewEdit.value then ImgForm.ZViewEdit.value := lZ;
 ImgForm.XViewEditChange(nil);
end;

procedure TMNIForm.FormCreate(Sender: TObject);
begin

end;

initialization
  {$I mni.lrs}

end.