File: perisettings.pas

package info (click to toggle)
mricron 0.20140804.1~dfsg.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,480 kB
  • ctags: 8,011
  • sloc: pascal: 114,853; sh: 49; makefile: 32
file content (96 lines) | stat: -rwxr-xr-x 2,477 bytes parent folder | download | duplicates (7)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
unit perisettings; 

{$mode objfpc}{$H+}

interface

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

type

  { TPSForm }

  TPSForm = class(TForm)
    BinWidthEdit: TFloatSpinEdit;
    OKBtn: TButton;
    SavePSVolCheck: TCheckBox;
    PctSignalCheck: TCheckBox;
    ModelCheck: TCheckBox;
    RegressCheck: TCheckBox;
    TDCheck: TCheckBox;
    SliceTImeCheck: TCheckBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    PreBinEdit: TSpinEdit;
    PostBinEdit: TSpinEdit;
 procedure FormShow(Sender: TObject);
 function GetPeriSettings(var lPSPlot: TPSPlot): boolean;
  procedure OKBtnClick(Sender: TObject);
  procedure RegressCheckClick(Sender: TObject);

  private
    { private declarations }
  public
    { public declarations }
  end; 

var
  PSForm: TPSForm;

implementation
uses nifti_img_view;

 function TPSForm.GetPeriSettings(var lPSPlot: TPSPlot): boolean;
 begin
      result := false;
      if lPSPlot.TRSec <= 0 then begin
          showmessage('Please specify the TR (in seconds) before creating a peristimulus plot.');
          exit;
      end;
      if BinWidthEdit.value = 0 then
         BinWidthEdit.value := lPSPlot.TRsec;
      PSForm.ShowModal;
      if BinWidthEdit.value = 0 then
         BinWidthEdit.value := lPSPlot.TRsec
      else
          lPSPlot.BinWidthSec :=  BinWidthEdit.Value;
      lPSPlot.nNegBins := PreBinEdit.value;
      lPSPlot.nPosBins := PostBinEdit.value;
      lPSPlot.SliceTime := SliceTimeCheck.checked;
      lPSPlot.SavePSVol := SavePSVolCheck.checked;
      lPSPlot.BaselineCorrect := ModelCheck.checked;
      lPSPlot.PctSignal := PctSignalCheck.checked;
      lPSPlot.RemoveRegressorVariability := RegressCheck.checked;
      lPSPlot.TemporalDeriv := TDcheck.checked;
      lPSPlot.PlotModel := ModelCheck.checked;
      lPSPlot.SPMDefaultsStatsFmriT := gBGImg.SPMDefaultsStatsFmriT;
      lPSPlot.SPMDefaultsStatsFmriT0 := gBGImg.SPMDefaultsStatsFmriT0;
      result := true;
 end;

 procedure TPSForm.FormShow(Sender: TObject);
 begin
      RegressCheckClick(nil);
 end;



 procedure TPSForm.OKBtnClick(Sender: TObject);
 begin

 end;

 procedure TPSForm.RegressCheckClick(Sender: TObject);
 begin
     TDCheck.visible := RegressCheck.checked;
  ModelCheck.Visible := RegressCheck.checked;
 end;

initialization
  {$I perisettings.lrs}

end.