diff --git a/ROIfilt.lfm b/ROIfilt.lfm index f445d52..984be64 100755 --- a/ROIfilt.lfm +++ b/ROIfilt.lfm @@ -1,46 +1,57 @@ object FilterROIform: TFilterROIform Left = 569 - Height = 190 + Height = 148 Top = 107 - Width = 240 + Width = 297 HorzScrollBar.Page = 209 VertScrollBar.Page = 196 ActiveControl = MinROIfilt + AutoSize = True BorderIcons = [biSystemMenu] BorderStyle = bsToolWindow + BorderWidth = 4 Caption = 'Intensity filter' - ClientHeight = 190 - ClientWidth = 240 - Constraints.MaxHeight = 190 - Constraints.MaxWidth = 240 - Constraints.MinHeight = 190 + ClientHeight = 148 + ClientWidth = 297 OnClose = FormClose OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.6.0.2' + LCLVersion = '2.1.0.0' object Label42: TLabel - Left = 4 - Height = 17 - Top = 14 - Width = 101 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = MinROIfilt + AnchorSideTop.Side = asrCenter + Left = 8 + Height = 16 + Top = 10 + Width = 90 + BorderSpacing.Left = 4 Caption = 'Min. Threshold' ParentColor = False end object FilterROIBtn: TSpeedButton - Left = 4 + AnchorSideLeft.Control = Label42 + AnchorSideTop.Control = Filter2NIfTIBtn + AnchorSideTop.Side = asrBottom + Left = 8 Height = 25 - Top = 143 - Width = 221 + Top = 87 + Width = 280 + BorderSpacing.Top = 4 + Constraints.MinWidth = 280 Caption = 'Filter VOI with highlighted' OnClick = FilterROIBtnClick ShowHint = True ParentShowHint = False end object Label43: TLabel - Left = 4 - Height = 17 - Top = 49 - Width = 104 + AnchorSideLeft.Control = Label42 + AnchorSideTop.Control = MaxROIfilt + AnchorSideTop.Side = asrCenter + Left = 8 + Height = 16 + Top = 35 + Width = 93 Caption = 'Max. Threshold' Font.CharSet = 13 ParentColor = False @@ -48,38 +59,56 @@ object FilterROIform: TFilterROIform end object Filter2NIfTIBtn: TSpeedButton Tag = 128 - Left = 4 + AnchorSideLeft.Control = Label42 + AnchorSideTop.Control = MaxROIfilt + AnchorSideTop.Side = asrBottom + Left = 8 Height = 25 - Top = 107 - Width = 221 + Top = 58 + Width = 280 + BorderSpacing.Top = 4 + Constraints.MinWidth = 280 Caption = 'Save highlighted as NIfTI or VOI' OnClick = Filter2NIfTIBtnClick ShowHint = True ParentShowHint = False end object FiltROILabel: TLabel + AnchorSideLeft.Control = Label42 + AnchorSideTop.Control = FilterROIBtn + AnchorSideTop.Side = asrBottom Left = 8 - Height = 17 - Top = 81 - Width = 28 + Height = 16 + Top = 116 + Width = 25 + BorderSpacing.Top = 4 Caption = ' ' ParentColor = False end object MinROIfilt: TSpinEdit - Left = 120 - Height = 27 - Top = 7 + AnchorSideLeft.Control = Label42 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Owner + Left = 104 + Height = 21 + Top = 8 Width = 64 + BorderSpacing.Left = 6 + BorderSpacing.Top = 4 MaxValue = 254 OnChange = MinROIfiltChange TabOrder = 0 Value = 100 end object MaxROIfilt: TSpinEdit - Left = 120 - Height = 27 - Top = 42 + AnchorSideLeft.Control = MinROIfilt + AnchorSideTop.Control = MinROIfilt + AnchorSideTop.Side = asrBottom + Left = 104 + Height = 21 + Top = 33 Width = 64 + BorderSpacing.Top = 4 MaxValue = 255 OnChange = MinROIfiltChange TabOrder = 1 diff --git a/ROIfilt.lrs b/ROIfilt.lrs index f3da479..aa65c3a 100755 --- a/ROIfilt.lrs +++ b/ROIfilt.lrs @@ -1,28 +1,42 @@ { This is an automatically generated lazarus resource file } LazarusResources.Add('TFilterROIform','FORMDATA',[ - 'TPF0'#14'TFilterROIform'#13'FilterROIform'#4'Left'#3'9'#2#6'Height'#3#190#0#3 - +'Top'#2'k'#5'Width'#3#240#0#18'HorzScrollBar.Page'#3#209#0#18'VertScrollBar.' - +'Page'#3#196#0#13'ActiveControl'#7#10'MinROIfilt'#11'BorderIcons'#11#12'biSy' - +'stemMenu'#0#11'BorderStyle'#7#12'bsToolWindow'#7'Caption'#6#16'Intensity fi' - +'lter'#12'ClientHeight'#3#190#0#11'ClientWidth'#3#240#0#21'Constraints.MaxHe' - +'ight'#3#190#0#20'Constraints.MaxWidth'#3#240#0#21'Constraints.MinHeight'#3 - +#190#0#7'OnClose'#7#9'FormClose'#6'OnShow'#7#8'FormShow'#8'Position'#7#14'po' - +'ScreenCenter'#10'LCLVersion'#6#7'1.6.0.2'#0#6'TLabel'#7'Label42'#4'Left'#2#4 - +#6'Height'#2#17#3'Top'#2#14#5'Width'#2'e'#7'Caption'#6#14'Min. Threshold'#11 - +'ParentColor'#8#0#0#12'TSpeedButton'#12'FilterROIBtn'#4'Left'#2#4#6'Height'#2 - +#25#3'Top'#3#143#0#5'Width'#3#221#0#7'Caption'#6#27'Filter VOI with highligh' - +'ted'#7'OnClick'#7#17'FilterROIBtnClick'#8'ShowHint'#9#14'ParentShowHint'#8#0 - +#0#6'TLabel'#7'Label43'#4'Left'#2#4#6'Height'#2#17#3'Top'#2'1'#5'Width'#2'h' - +#7'Caption'#6#14'Max. Threshold'#12'Font.CharSet'#2#13#11'ParentColor'#8#10 - +'ParentFont'#8#0#0#12'TSpeedButton'#15'Filter2NIfTIBtn'#3'Tag'#3#128#0#4'Lef' - +'t'#2#4#6'Height'#2#25#3'Top'#2'k'#5'Width'#3#221#0#7'Caption'#6' Save highl' - +'ighted as NIfTI or VOI'#7'OnClick'#7#20'Filter2NIfTIBtnClick'#8'ShowHint'#9 - +#14'ParentShowHint'#8#0#0#6'TLabel'#12'FiltROILabel'#4'Left'#2#8#6'Height'#2 - +#17#3'Top'#2'Q'#5'Width'#2#28#7'Caption'#6#7' '#11'ParentColor'#8#0#0#9 - +'TSpinEdit'#10'MinROIfilt'#4'Left'#2'x'#6'Height'#2#27#3'Top'#2#7#5'Width'#2 - +'@'#8'MaxValue'#3#254#0#8'OnChange'#7#16'MinROIfiltChange'#8'TabOrder'#2#0#5 - +'Value'#2'd'#0#0#9'TSpinEdit'#10'MaxROIfilt'#4'Left'#2'x'#6'Height'#2#27#3'T' - +'op'#2'*'#5'Width'#2'@'#8'MaxValue'#3#255#0#8'OnChange'#7#16'MinROIfiltChang' - +'e'#8'TabOrder'#2#1#5'Value'#3#255#0#0#0#0 + 'TPF0'#14'TFilterROIform'#13'FilterROIform'#4'Left'#3'9'#2#6'Height'#3#148#0#3 + +'Top'#2'k'#5'Width'#3')'#1#18'HorzScrollBar.Page'#3#209#0#18'VertScrollBar.P' + +'age'#3#196#0#13'ActiveControl'#7#10'MinROIfilt'#8'AutoSize'#9#11'BorderIcon' + +'s'#11#12'biSystemMenu'#0#11'BorderStyle'#7#12'bsToolWindow'#11'BorderWidth' + +#2#4#7'Caption'#6#16'Intensity filter'#12'ClientHeight'#3#148#0#11'ClientWid' + +'th'#3')'#1#7'OnClose'#7#9'FormClose'#6'OnShow'#7#8'FormShow'#8'Position'#7 + +#14'poScreenCenter'#10'LCLVersion'#6#7'2.1.0.0'#0#6'TLabel'#7'Label42'#22'An' + +'chorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#10'MinROIfilt' + +#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#8#6'Height'#2#16#3'Top'#2#10 + +#5'Width'#2'Z'#18'BorderSpacing.Left'#2#4#7'Caption'#6#14'Min. Threshold'#11 + +'ParentColor'#8#0#0#12'TSpeedButton'#12'FilterROIBtn'#22'AnchorSideLeft.Cont' + +'rol'#7#7'Label42'#21'AnchorSideTop.Control'#7#15'Filter2NIfTIBtn'#18'Anchor' + +'SideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#25#3'Top'#2'W'#5'Width' + +#3#24#1#17'BorderSpacing.Top'#2#4#20'Constraints.MinWidth'#3#24#1#7'Caption' + +#6#27'Filter VOI with highlighted'#7'OnClick'#7#17'FilterROIBtnClick'#8'Show' + +'Hint'#9#14'ParentShowHint'#8#0#0#6'TLabel'#7'Label43'#22'AnchorSideLeft.Con' + +'trol'#7#7'Label42'#21'AnchorSideTop.Control'#7#10'MaxROIfilt'#18'AnchorSide' + +'Top.Side'#7#9'asrCenter'#4'Left'#2#8#6'Height'#2#16#3'Top'#2'#'#5'Width'#2 + +']'#7'Caption'#6#14'Max. Threshold'#12'Font.CharSet'#2#13#11'ParentColor'#8 + +#10'ParentFont'#8#0#0#12'TSpeedButton'#15'Filter2NIfTIBtn'#3'Tag'#3#128#0#22 + +'AnchorSideLeft.Control'#7#7'Label42'#21'AnchorSideTop.Control'#7#10'MaxROIf' + +'ilt'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#25#3'Top' + +#2':'#5'Width'#3#24#1#17'BorderSpacing.Top'#2#4#20'Constraints.MinWidth'#3#24 + +#1#7'Caption'#6' Save highlighted as NIfTI or VOI'#7'OnClick'#7#20'Filter2NI' + +'fTIBtnClick'#8'ShowHint'#9#14'ParentShowHint'#8#0#0#6'TLabel'#12'FiltROILab' + +'el'#22'AnchorSideLeft.Control'#7#7'Label42'#21'AnchorSideTop.Control'#7#12 + +'FilterROIBtn'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2 + +#16#3'Top'#2't'#5'Width'#2#25#17'BorderSpacing.Top'#2#4#7'Caption'#6#7' ' + +' '#11'ParentColor'#8#0#0#9'TSpinEdit'#10'MinROIfilt'#22'AnchorSideLeft.Con' + +'trol'#7#7'Label42'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.' + +'Control'#7#5'Owner'#4'Left'#2'h'#6'Height'#2#21#3'Top'#2#8#5'Width'#2'@'#18 + +'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#4#8'MaxValue'#3#254#0#8'OnC' + +'hange'#7#16'MinROIfiltChange'#8'TabOrder'#2#0#5'Value'#2'd'#0#0#9'TSpinEdit' + +#10'MaxROIfilt'#22'AnchorSideLeft.Control'#7#10'MinROIfilt'#21'AnchorSideTop' + +'.Control'#7#10'MinROIfilt'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2 + +'h'#6'Height'#2#21#3'Top'#2'!'#5'Width'#2'@'#17'BorderSpacing.Top'#2#4#8'Max' + +'Value'#3#255#0#8'OnChange'#7#16'MinROIfiltChange'#8'TabOrder'#2#1#5'Value'#3 + +#255#0#0#0#0 ]); diff --git a/ReadFloat.lfm b/ReadFloat.lfm index c29d564..d434ef3 100755 --- a/ReadFloat.lfm +++ b/ReadFloat.lfm @@ -1,8 +1,8 @@ object ReadFloatForm: TReadFloatForm Tag = 321 - Left = 335 + Left = 369 Height = 95 - Top = 308 + Top = 410 Width = 620 HorzScrollBar.Page = 464 VertScrollBar.Page = 94 @@ -11,38 +11,51 @@ object ReadFloatForm: TReadFloatForm Caption = 'Real number required' ClientHeight = 95 ClientWidth = 620 - Constraints.MaxHeight = 95 - Constraints.MaxWidth = 620 - Constraints.MinHeight = 95 Constraints.MinWidth = 620 Position = poScreenCenter - LCLVersion = '1.6.0.4' + LCLVersion = '2.1.0.0' object ReadFloatLabel: TLabel - Left = 16 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ReadFloatEdit + AnchorSideTop.Side = asrCenter + Left = 4 Height = 16 - Top = 15 - Width = 97 + Top = 6 + Width = 93 Alignment = taRightJustify + BorderSpacing.Left = 4 Caption = 'Enter a number' ParentColor = False end object OKBtn: TButton - Left = 488 + AnchorSideTop.Control = ReadFloatEdit + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 541 Height = 25 - Top = 55 + Top = 29 Width = 75 + Anchors = [akTop, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 BorderSpacing.InnerBorder = 4 Caption = 'OK' OnClick = OKBtnClick TabOrder = 0 end object ReadFloatEdit: TFloatSpinEdit - Left = 472 - Height = 16 - Top = 15 + AnchorSideTop.Control = Owner + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 497 + Height = 21 + Top = 4 Width = 119 + Anchors = [akTop, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 DecimalPlaces = 4 - Increment = 1 MaxValue = 9999999999999 MinValue = -9999999999999 TabOrder = 1 diff --git a/ReadFloat.lrs b/ReadFloat.lrs index 9353b82..63a1706 100755 --- a/ReadFloat.lrs +++ b/ReadFloat.lrs @@ -1,20 +1,26 @@ { This is an automatically generated lazarus resource file } LazarusResources.Add('TReadFloatForm','FORMDATA',[ - 'TPF0'#14'TReadFloatForm'#13'ReadFloatForm'#3'Tag'#3'A'#1#4'Left'#3'O'#1#6'He' - +'ight'#2'_'#3'Top'#3'4'#1#5'Width'#3'l'#2#18'HorzScrollBar.Page'#3#208#1#18 + 'TPF0'#14'TReadFloatForm'#13'ReadFloatForm'#3'Tag'#3'A'#1#4'Left'#3'q'#1#6'He' + +'ight'#2'_'#3'Top'#3#154#1#5'Width'#3'l'#2#18'HorzScrollBar.Page'#3#208#1#18 +'VertScrollBar.Page'#2'^'#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize' +#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#20'Real number required'#12'Cl' - +'ientHeight'#2'_'#11'ClientWidth'#3'l'#2#21'Constraints.MaxHeight'#2'_'#20'C' - +'onstraints.MaxWidth'#3'l'#2#21'Constraints.MinHeight'#2'_'#20'Constraints.M' - +'inWidth'#3'l'#2#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'1.6.0.4' - +#0#6'TLabel'#14'ReadFloatLabel'#4'Left'#2#16#6'Height'#2#16#3'Top'#2#15#5'Wi' - +'dth'#2'a'#9'Alignment'#7#14'taRightJustify'#7'Caption'#6#14'Enter a number' - +#11'ParentColor'#8#0#0#7'TButton'#5'OKBtn'#4'Left'#3#232#1#6'Height'#2#25#3 - +'Top'#2'7'#5'Width'#2'K'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#2'OK' - +#7'OnClick'#7#10'OKBtnClick'#8'TabOrder'#2#0#0#0#14'TFloatSpinEdit'#13'ReadF' - +'loatEdit'#4'Left'#3#216#1#6'Height'#2#16#3'Top'#2#15#5'Width'#2'w'#13'Decim' - +'alPlaces'#2#4#9'Increment'#5#0#0#0#0#0#0#0#128#255'?'#8'MaxValue'#5#0#0#240 - +#255')'#231#132#145'*@'#8'MinValue'#5#0#0#240#255')'#231#132#145'*'#192#8'Ta' - +'bOrder'#2#1#5'Value'#5#0#0#0#0#0#0#0#0#0#0#0#0#0 + +'ientHeight'#2'_'#11'ClientWidth'#3'l'#2#20'Constraints.MinWidth'#3'l'#2#8'P' + +'osition'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.1.0.0'#0#6'TLabel'#14'Re' + +'adFloatLabel'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Contro' + +'l'#7#13'ReadFloatEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#4#6 + +'Height'#2#16#3'Top'#2#6#5'Width'#2']'#9'Alignment'#7#14'taRightJustify'#18 + +'BorderSpacing.Left'#2#4#7'Caption'#6#14'Enter a number'#11'ParentColor'#8#0 + +#0#7'TButton'#5'OKBtn'#21'AnchorSideTop.Control'#7#13'ReadFloatEdit'#18'Anch' + +'orSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'An' + +'chorSideRight.Side'#7#9'asrBottom'#4'Left'#3#29#2#6'Height'#2#25#3'Top'#2#29 + +#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#4 + +#19'BorderSpacing.Right'#2#4#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#2 + +'OK'#7'OnClick'#7#10'OKBtnClick'#8'TabOrder'#2#0#0#0#14'TFloatSpinEdit'#13'R' + +'eadFloatEdit'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Contr' + +'ol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#241#1#6'He' + +'ight'#2#21#3'Top'#2#4#5'Width'#2'w'#7'Anchors'#11#5'akTop'#7'akRight'#0#17 + +'BorderSpacing.Top'#2#4#19'BorderSpacing.Right'#2#4#13'DecimalPlaces'#2#4#8 + +'MaxValue'#5#0#0#240#255')'#231#132#145'*@'#8'MinValue'#5#0#0#240#255')'#231 + +#132#145'*'#192#8'TabOrder'#2#1#5'Value'#5#0#0#0#0#0#0#0#0#0#0#0#0#0 ]); diff --git a/ReadInt.lfm b/ReadInt.lfm index 596c351..812dc8f 100755 --- a/ReadInt.lfm +++ b/ReadInt.lfm @@ -1,44 +1,61 @@ object ReadIntForm: TReadIntForm Tag = 321 Left = 334 - Height = 95 + Height = 68 Top = 206 Width = 620 ActiveControl = ReadIntEdit + AutoSize = True BorderStyle = bsDialog + BorderWidth = 4 Caption = 'Integer required' - ClientHeight = 95 + ClientHeight = 68 ClientWidth = 620 - Constraints.MaxHeight = 95 - Constraints.MaxWidth = 620 - Constraints.MinHeight = 95 Constraints.MinWidth = 620 OnCreate = FormCreate OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.6.0.4' + LCLVersion = '2.1.0.0' object ReadIntLabel: TLabel + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ReadIntEdit + AnchorSideTop.Side = asrCenter Left = 8 Height = 16 - Top = 15 - Width = 97 + Top = 10 + Width = 93 Alignment = taRightJustify + BorderSpacing.Left = 4 Caption = 'Enter a number' ParentColor = False + OnClick = ReadIntLabelClick end object ReadIntEdit: TSpinEdit - Left = 464 - Height = 16 - Top = 12 + AnchorSideTop.Control = Owner + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 476 + Height = 21 + Top = 8 Width = 136 + Anchors = [akTop, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 MaxValue = 0 TabOrder = 1 end object OKBtn: TButton - Left = 488 + AnchorSideTop.Control = ReadIntEdit + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 537 Height = 25 - Top = 55 + Top = 33 Width = 75 + Anchors = [akTop, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 BorderSpacing.InnerBorder = 4 Caption = 'OK' OnClick = OKBtnClick diff --git a/ReadInt.lrs b/ReadInt.lrs index 22cfae5..f72fd08 100755 --- a/ReadInt.lrs +++ b/ReadInt.lrs @@ -2,16 +2,24 @@ LazarusResources.Add('TReadIntForm','FORMDATA',[ 'TPF0'#12'TReadIntForm'#11'ReadIntForm'#3'Tag'#3'A'#1#4'Left'#3'N'#1#6'Height' - +#2'_'#3'Top'#3#206#0#5'Width'#3'l'#2#13'ActiveControl'#7#11'ReadIntEdit'#11 - +'BorderStyle'#7#8'bsDialog'#7'Caption'#6#16'Integer required'#12'ClientHeigh' - +'t'#2'_'#11'ClientWidth'#3'l'#2#21'Constraints.MaxHeight'#2'_'#20'Constraint' - +'s.MaxWidth'#3'l'#2#21'Constraints.MinHeight'#2'_'#20'Constraints.MinWidth'#3 - +'l'#2#8'OnCreate'#7#10'FormCreate'#6'OnShow'#7#8'FormShow'#8'Position'#7#14 - +'poScreenCenter'#10'LCLVersion'#6#7'1.6.0.4'#0#6'TLabel'#12'ReadIntLabel'#4 - +'Left'#2#8#6'Height'#2#16#3'Top'#2#15#5'Width'#2'a'#9'Alignment'#7#14'taRigh' - +'tJustify'#7'Caption'#6#14'Enter a number'#11'ParentColor'#8#0#0#9'TSpinEdit' - +#11'ReadIntEdit'#4'Left'#3#208#1#6'Height'#2#16#3'Top'#2#12#5'Width'#3#136#0 - +#8'MaxValue'#2#0#8'TabOrder'#2#1#0#0#7'TButton'#5'OKBtn'#4'Left'#3#232#1#6'H' - +'eight'#2#25#3'Top'#2'7'#5'Width'#2'K'#25'BorderSpacing.InnerBorder'#2#4#7'C' - +'aption'#6#2'OK'#7'OnClick'#7#10'OKBtnClick'#8'TabOrder'#2#0#0#0#0 + +#2'D'#3'Top'#3#206#0#5'Width'#3'l'#2#13'ActiveControl'#7#11'ReadIntEdit'#8'A' + +'utoSize'#9#11'BorderStyle'#7#8'bsDialog'#11'BorderWidth'#2#4#7'Caption'#6#16 + +'Integer required'#12'ClientHeight'#2'D'#11'ClientWidth'#3'l'#2#20'Constrain' + +'ts.MinWidth'#3'l'#2#8'OnCreate'#7#10'FormCreate'#6'OnShow'#7#8'FormShow'#8 + +'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.1.0.0'#0#6'TLabel'#12'R' + +'eadIntLabel'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control' + +#7#11'ReadIntEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#8#6'Heigh' + +'t'#2#16#3'Top'#2#10#5'Width'#2']'#9'Alignment'#7#14'taRightJustify'#18'Bord' + +'erSpacing.Left'#2#4#7'Caption'#6#14'Enter a number'#11'ParentColor'#8#7'OnC' + +'lick'#7#17'ReadIntLabelClick'#0#0#9'TSpinEdit'#11'ReadIntEdit'#21'AnchorSid' + +'eTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSi' + +'deRight.Side'#7#9'asrBottom'#4'Left'#3#220#1#6'Height'#2#21#3'Top'#2#8#5'Wi' + +'dth'#3#136#0#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#4 + +#19'BorderSpacing.Right'#2#4#8'MaxValue'#2#0#8'TabOrder'#2#1#0#0#7'TButton'#5 + +'OKBtn'#21'AnchorSideTop.Control'#7#11'ReadIntEdit'#18'AnchorSideTop.Side'#7 + +#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side' + +#7#9'asrBottom'#4'Left'#3#25#2#6'Height'#2#25#3'Top'#2'!'#5'Width'#2'K'#7'An' + +'chors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#4#19'BorderSpacing.' + +'Right'#2#4#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#2'OK'#7'OnClick'#7 + +#10'OKBtnClick'#8'TabOrder'#2#0#0#0#0 ]); diff --git a/ReadInt.pas b/ReadInt.pas index ff9c0d7..87dfbb7 100755 --- a/ReadInt.pas +++ b/ReadInt.pas @@ -19,6 +19,7 @@ TReadIntForm = class(TForm) function GetInt(lStr: string; lMin,lDefault,lMax: integer): integer; procedure OKBtnClick(Sender: TObject); procedure FormCreate(Sender: TObject); + procedure ReadIntLabelClick(Sender: TObject); private { Private declarations } public @@ -38,15 +39,18 @@ implementation {$ENDIF} function TReadIntForm.GetInt(lStr: string; lMin,lDefault,lMax: integer): integer; begin - //result := lDefault; - ReadIntLabel.caption := lStr+' ['+inttostr(lMin)+'..'+inttostr(lMax)+']'; - ReadIntEdit.MinValue := lMin; - ReadIntEdit.MaxValue := lMax; - ReadIntEdit.Value := lDefault; - //ReadIntForm.OKBtn.Focused := true; - //ReadIntForm.OKBtn.SetFocus; - ReadIntForm.ShowModal; - result := ReadIntEdit.Value; + //result := lDefault; + ReadIntLabel.caption := lStr+' ['+inttostr(lMin)+'..'+inttostr(lMax)+']'; + ReadIntEdit.MinValue := lMin; + ReadIntEdit.MaxValue := lMax; + ReadIntEdit.Value := lDefault; + //ReadIntForm.OKBtn.Focused := true; + //ReadIntForm.OKBtn.SetFocus; + ReadIntForm.ShowModal; + result := ReadIntEdit.Value; + if (result < lMin) then result := lMin; + if (result > lMax) then result := lMax; + end; procedure TReadIntForm.FormShow(Sender: TObject); @@ -71,6 +75,11 @@ procedure TReadIntForm.FormCreate(Sender: TObject); end; end; +procedure TReadIntForm.ReadIntLabelClick(Sender: TObject); +begin + +end; + {$IFDEF FPC} initialization {$I ReadInt.lrs} diff --git a/lut/1.lut b/Resources/lut/1.lut similarity index 100% rename from lut/1.lut rename to Resources/lut/1.lut diff --git a/lut/1.lut~ b/Resources/lut/1.lut~ similarity index 100% rename from lut/1.lut~ rename to Resources/lut/1.lut~ diff --git a/lut/16.lut b/Resources/lut/16.lut similarity index 100% rename from lut/16.lut rename to Resources/lut/16.lut diff --git a/lut/1hot.lut b/Resources/lut/1hot.lut similarity index 100% rename from lut/1hot.lut rename to Resources/lut/1hot.lut diff --git a/lut/2winter.lut b/Resources/lut/2winter.lut similarity index 100% rename from lut/2winter.lut rename to Resources/lut/2winter.lut diff --git a/lut/3warm.lut b/Resources/lut/3warm.lut similarity index 100% rename from lut/3warm.lut rename to Resources/lut/3warm.lut diff --git a/lut/4cool.lut b/Resources/lut/4cool.lut similarity index 100% rename from lut/4cool.lut rename to Resources/lut/4cool.lut diff --git a/lut/5redyell.lut b/Resources/lut/5redyell.lut similarity index 100% rename from lut/5redyell.lut rename to Resources/lut/5redyell.lut diff --git a/lut/6bluegrn.lut b/Resources/lut/6bluegrn.lut similarity index 100% rename from lut/6bluegrn.lut rename to Resources/lut/6bluegrn.lut diff --git a/lut/GE_color.lut b/Resources/lut/GE_color.lut similarity index 100% rename from lut/GE_color.lut rename to Resources/lut/GE_color.lut diff --git a/lut/HOTIRON.lut b/Resources/lut/HOTIRON.lut similarity index 100% rename from lut/HOTIRON.lut rename to Resources/lut/HOTIRON.lut diff --git a/lut/NIH.lut b/Resources/lut/NIH.lut similarity index 100% rename from lut/NIH.lut rename to Resources/lut/NIH.lut diff --git a/lut/NIH_fire.lut b/Resources/lut/NIH_fire.lut similarity index 100% rename from lut/NIH_fire.lut rename to Resources/lut/NIH_fire.lut diff --git a/lut/NIH_ice.lut b/Resources/lut/NIH_ice.lut similarity index 100% rename from lut/NIH_ice.lut rename to Resources/lut/NIH_ice.lut diff --git a/lut/Rainramp.lut b/Resources/lut/Rainramp.lut similarity index 100% rename from lut/Rainramp.lut rename to Resources/lut/Rainramp.lut diff --git a/lut/actc.lut b/Resources/lut/actc.lut similarity index 100% rename from lut/actc.lut rename to Resources/lut/actc.lut diff --git a/lut/blackbdy.lut b/Resources/lut/blackbdy.lut similarity index 100% rename from lut/blackbdy.lut rename to Resources/lut/blackbdy.lut diff --git a/lut/blue_otto.lut b/Resources/lut/blue_otto.lut similarity index 100% rename from lut/blue_otto.lut rename to Resources/lut/blue_otto.lut diff --git a/lut/bluegray.lut b/Resources/lut/bluegray.lut similarity index 100% rename from lut/bluegray.lut rename to Resources/lut/bluegray.lut diff --git a/lut/bone.lut b/Resources/lut/bone.lut similarity index 100% rename from lut/bone.lut rename to Resources/lut/bone.lut diff --git a/lut/cardiac.lut b/Resources/lut/cardiac.lut similarity index 100% rename from lut/cardiac.lut rename to Resources/lut/cardiac.lut diff --git a/lut/cortex.lut b/Resources/lut/cortex.lut similarity index 100% rename from lut/cortex.lut rename to Resources/lut/cortex.lut diff --git a/lut/flow.lut b/Resources/lut/flow.lut similarity index 100% rename from lut/flow.lut rename to Resources/lut/flow.lut diff --git a/lut/french.lut b/Resources/lut/french.lut similarity index 100% rename from lut/french.lut rename to Resources/lut/french.lut diff --git a/lut/gold.lut b/Resources/lut/gold.lut similarity index 100% rename from lut/gold.lut rename to Resources/lut/gold.lut diff --git a/lut/gooch.lut b/Resources/lut/gooch.lut similarity index 100% rename from lut/gooch.lut rename to Resources/lut/gooch.lut diff --git a/lut/greengray.lut b/Resources/lut/greengray.lut similarity index 100% rename from lut/greengray.lut rename to Resources/lut/greengray.lut diff --git a/lut/overlay_classic.lut b/Resources/lut/overlay_classic.lut similarity index 100% rename from lut/overlay_classic.lut rename to Resources/lut/overlay_classic.lut diff --git a/lut/pink.lut b/Resources/lut/pink.lut similarity index 100% rename from lut/pink.lut rename to Resources/lut/pink.lut diff --git a/lut/pink_old.lut b/Resources/lut/pink_old.lut similarity index 100% rename from lut/pink_old.lut rename to Resources/lut/pink_old.lut diff --git a/lut/red_otto.lut b/Resources/lut/red_otto.lut similarity index 100% rename from lut/red_otto.lut rename to Resources/lut/red_otto.lut diff --git a/lut/spectrum.lut b/Resources/lut/spectrum.lut similarity index 100% rename from lut/spectrum.lut rename to Resources/lut/spectrum.lut diff --git a/lut/surface.lut b/Resources/lut/surface.lut similarity index 100% rename from lut/surface.lut rename to Resources/lut/surface.lut diff --git a/lut/x_hot.lut b/Resources/lut/x_hot.lut similarity index 100% rename from lut/x_hot.lut rename to Resources/lut/x_hot.lut diff --git a/lut/x_rain.lut b/Resources/lut/x_rain.lut similarity index 100% rename from lut/x_rain.lut rename to Resources/lut/x_rain.lut diff --git a/templates/aal.nii.gz b/Resources/templates/aal.nii.gz similarity index 100% rename from templates/aal.nii.gz rename to Resources/templates/aal.nii.gz diff --git a/templates/aal.nii.lut b/Resources/templates/aal.nii.lut similarity index 100% rename from templates/aal.nii.lut rename to Resources/templates/aal.nii.lut diff --git a/templates/brodmann.nii.gz b/Resources/templates/brodmann.nii.gz similarity index 100% rename from templates/brodmann.nii.gz rename to Resources/templates/brodmann.nii.gz diff --git a/templates/brodmann.nii.lut b/Resources/templates/brodmann.nii.lut similarity index 100% rename from templates/brodmann.nii.lut rename to Resources/templates/brodmann.nii.lut diff --git a/templates/ch2bet.nii.gz b/Resources/templates/ch2bet.nii.gz similarity index 100% rename from templates/ch2bet.nii.gz rename to Resources/templates/ch2bet.nii.gz diff --git a/_osx.command b/_osx.command index 43a55e1..1047471 100755 --- a/_osx.command +++ b/_osx.command @@ -4,9 +4,8 @@ # lazbuild -B filename.lpr #compile dcm2niix -cd ~/Documents/cocoa/dcm2niix/console -#g++ -O3 -dead_strip -I. main_console.cpp nii_foreign.cpp nii_dicom.cpp nifti1_io_core.cpp nii_ortho.cpp nii_dicom_batch.cpp jpg_0XC3.cpp ujpeg.cpp -o dcm2niix -I/usr/local/lib -I/usr/local/include/openjpeg-2.1 /usr/local/lib/libopenjp2.a -g++-8 -O3 -dead_strip -I. -std=c++14 -DmyEnableJPEGLS charls/jpegls.cpp charls/jpegmarkersegment.cpp charls/interface.cpp charls/jpegstreamwriter.cpp charls/jpegstreamreader.cpp main_console.cpp nii_foreign.cpp nii_dicom.cpp nifti1_io_core.cpp nii_ortho.cpp nii_dicom_batch.cpp jpg_0XC3.cpp ujpeg.cpp -o dcm2niix -I/usr/local/lib -I/usr/local/include/openjpeg-2.1 /usr/local/lib/libopenjp2.a +cd ~/dcm2niix/console +g++ -O3 -dead_strip -I. main_console.cpp nii_foreign.cpp nii_dicom.cpp nifti1_io_core.cpp nii_ortho.cpp nii_dicom_batch.cpp jpg_0XC3.cpp ujpeg.cpp -o dcm2niix -I/usr/local/lib -I/usr/local/include/openjpeg-2.1 /usr/local/lib/libopenjp2.a cp dcm2niix /Users/rorden/Documents/mricron/MRIcron/dcm2niix cp dcm2niix /Users/rorden/Documents/mricron/MRIcron/MRIcron.app/Contents/Resources/dcm2niix @@ -47,6 +46,7 @@ SKIPNPM #lazbuild ./mricron.lpr --cpu=x86_64 --ws=cocoa --compiler="/usr/local/bin/ppcx64" #Current FPC 3.0.0 can not compile on OSX 10.11 El Capitan, so use 3.1.1 #/Users/rorden/lazarus/lazbuild ./mricron.lpr --cpu=x86_64 --ws=cocoa --compiler="/usr/local/lib/fpc/3.1.1/ppcx64" + /Users/rorden/lazarus/lazbuild ./mricron.lpr --cpu=x86_64 --ws=cocoa strip ./mricron diff --git a/about.lfm b/about.lfm index 6758af7..cb95f81 100755 --- a/about.lfm +++ b/about.lfm @@ -4,51 +4,55 @@ object AboutForm: TAboutForm Height = 174 Top = 223 Width = 727 + AutoSize = True BorderIcons = [biSystemMenu] BorderStyle = bsDialog + BorderWidth = 4 Caption = 'About...' ClientHeight = 174 ClientWidth = 727 + Constraints.MinHeight = 120 + Constraints.MinWidth = 600 OnCreate = FormCreate Position = poScreenCenter - LCLVersion = '1.9.0.0' - object Panel2: TPanel - Left = 0 - Height = 99 - Top = 75 - Width = 727 - Align = alBottom - ClientHeight = 99 - ClientWidth = 727 - TabOrder = 0 - object HomepageLabel: TLabel - Left = 16 - Height = 16 - Top = 8 - Width = 46 - Alignment = taCenter - Caption = 'version' - ParentColor = False - OnClick = HomePageClick - end - object ThreadLabel: TLabel - Left = 8 - Height = 16 - Top = 48 - Width = 55 - Alignment = taCenter - Caption = ' Threads' - ParentColor = False - end - end + LCLVersion = '2.1.0.0' object Label1: TLabel + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner Left = 8 Height = 43 Top = 8 - Width = 142 + Width = 129 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 Caption = 'MRIcron' Font.Height = -36 ParentColor = False ParentFont = False end + object HomepageLabel: TLabel + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + Left = 5 + Height = 16 + Top = 55 + Width = 44 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 + Caption = 'version' + ParentColor = False + OnClick = HomePageClick + end + object ThreadLabel: TLabel + AnchorSideLeft.Control = HomepageLabel + AnchorSideTop.Control = HomepageLabel + AnchorSideTop.Side = asrBottom + Left = 5 + Height = 16 + Top = 75 + Width = 53 + BorderSpacing.Top = 4 + Caption = ' Threads' + ParentColor = False + end end diff --git a/about.lrs b/about.lrs index 1ed94e9..bed614b 100755 --- a/about.lrs +++ b/about.lrs @@ -2,17 +2,21 @@ LazarusResources.Add('TAboutForm','FORMDATA',[ 'TPF0'#10'TAboutForm'#9'AboutForm'#3'Tag'#3'A'#1#4'Left'#3#242#1#6'Height'#3 - +#174#0#3'Top'#3#223#0#5'Width'#3#215#2#11'BorderIcons'#11#12'biSystemMenu'#0 - +#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#8'About...'#12'ClientHeight'#3 - +#174#0#11'ClientWidth'#3#215#2#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14 - +'poScreenCenter'#10'LCLVersion'#6#7'1.9.0.0'#0#6'TPanel'#6'Panel2'#4'Left'#2 - +#0#6'Height'#2'c'#3'Top'#2'K'#5'Width'#3#215#2#5'Align'#7#8'alBottom'#12'Cli' - +'entHeight'#2'c'#11'ClientWidth'#3#215#2#8'TabOrder'#2#0#0#6'TLabel'#13'Home' - +'pageLabel'#4'Left'#2#16#6'Height'#2#16#3'Top'#2#8#5'Width'#2'.'#9'Alignment' - +#7#8'taCenter'#7'Caption'#6#7'version'#11'ParentColor'#8#7'OnClick'#7#13'Hom' - +'ePageClick'#0#0#6'TLabel'#11'ThreadLabel'#4'Left'#2#8#6'Height'#2#16#3'Top' - +#2'0'#5'Width'#2'7'#9'Alignment'#7#8'taCenter'#7'Caption'#6#8' Threads'#11'P' - +'arentColor'#8#0#0#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2'+'#3'Top'#2 - +#8#5'Width'#3#142#0#7'Caption'#6#7'MRIcron'#11'Font.Height'#2#220#11'ParentC' - +'olor'#8#10'ParentFont'#8#0#0#0 + +#174#0#3'Top'#3#223#0#5'Width'#3#215#2#8'AutoSize'#9#11'BorderIcons'#11#12'b' + +'iSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#11'BorderWidth'#2#4#7'Caption' + +#6#8'About...'#12'ClientHeight'#3#174#0#11'ClientWidth'#3#215#2#21'Constrain' + +'ts.MinHeight'#2'x'#20'Constraints.MinWidth'#3'X'#2#8'OnCreate'#7#10'FormCre' + +'ate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.1.0.0'#0#6'TLabe' + +'l'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control' + +#7#5'Owner'#4'Left'#2#8#6'Height'#2'+'#3'Top'#2#8#5'Width'#3#129#0#18'Border' + +'Spacing.Left'#2#4#17'BorderSpacing.Top'#2#4#7'Caption'#6#7'MRIcron'#11'Font' + +'.Height'#2#220#11'ParentColor'#8#10'ParentFont'#8#0#0#6'TLabel'#13'Homepage' + +'Label'#21'AnchorSideTop.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asr' + +'Bottom'#4'Left'#2#5#6'Height'#2#16#3'Top'#2'7'#5'Width'#2','#18'BorderSpaci' + +'ng.Left'#2#4#17'BorderSpacing.Top'#2#4#7'Caption'#6#7'version'#11'ParentCol' + +'or'#8#7'OnClick'#7#13'HomePageClick'#0#0#6'TLabel'#11'ThreadLabel'#22'Ancho' + +'rSideLeft.Control'#7#13'HomepageLabel'#21'AnchorSideTop.Control'#7#13'Homep' + +'ageLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#5#6'Height'#2#16#3 + +'Top'#2'K'#5'Width'#2'5'#17'BorderSpacing.Top'#2#4#7'Caption'#6#8' Threads' + +#11'ParentColor'#8#0#0#0 ]); diff --git a/about.pas b/about.pas index e45a6b5..6e00789 100755 --- a/about.pas +++ b/about.pas @@ -15,7 +15,6 @@ interface TAboutForm = class(TForm) HomepageLabel: TLabel; Label1: TLabel; - Panel2: TPanel; ThreadLabel: TLabel; procedure FormCreate(Sender: TObject); procedure HomePageClick(Sender: TObject); diff --git a/autoroi.lfm b/autoroi.lfm index 5cb8600..4ecbae3 100755 --- a/autoroi.lfm +++ b/autoroi.lfm @@ -1,123 +1,172 @@ object AutoROIForm: TAutoROIForm - Left = 785 - Height = 355 + Left = 757 + Height = 258 Top = 200 - Width = 265 + Width = 293 HorzScrollBar.Page = 264 VertScrollBar.Page = 354 ActiveControl = VarianceEdit + AutoSize = True BorderStyle = bsDialog + BorderWidth = 4 Caption = 'Create ROI' - ClientHeight = 355 - ClientWidth = 265 + ClientHeight = 258 + ClientWidth = 293 OnCreate = FormCreate OnDestroy = FormDestroy OnHide = FormHide OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.9.0.0' + LCLVersion = '2.1.0.0' object OriginLabel: TLabel - Left = 4 + AnchorSideLeft.Control = OriginBtn + AnchorSideTop.Control = OriginBtn + AnchorSideTop.Side = asrBottom + Left = 8 Height = 16 - Top = 42 - Width = 47 + Top = 37 + Width = 44 + BorderSpacing.Top = 4 Caption = 'Origin: ' ParentColor = False end object DiffLabel: TLabel + AnchorSideLeft.Control = Label4 + AnchorSideTop.Control = VarianceEdit + AnchorSideTop.Side = asrCenter Left = 12 Height = 16 - Top = 98 - Width = 140 + Top = 79 + Width = 132 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 Caption = 'Difference from origin' ParentColor = False end object Label1: TLabel + AnchorSideLeft.Control = DiffLabel + AnchorSideTop.Control = EdgeEdit + AnchorSideTop.Side = asrCenter Left = 12 Height = 16 - Top = 132 - Width = 115 + Top = 104 + Width = 112 Caption = 'Difference at edge' ParentColor = False end object Label2: TLabel + AnchorSideLeft.Control = DiffLabel + AnchorSideTop.Control = RadiusEdit Left = 12 Height = 16 - Top = 167 - Width = 79 + Top = 127 + Width = 77 Caption = 'Radius (mm)' ParentColor = False end object Label3: TLabel + AnchorSideLeft.Control = DiffLabel + AnchorSideTop.Control = ErodeEdit + AnchorSideTop.Side = asrCenter Left = 12 Height = 16 - Top = 202 - Width = 119 + Top = 154 + Width = 115 Caption = 'Erode/dilate cycles' ParentColor = False end object Label4: TLabel - Left = 4 + AnchorSideLeft.Control = OriginBtn + AnchorSideTop.Control = OriginLabel + AnchorSideTop.Side = asrBottom + Left = 8 Height = 16 - Top = 74 - Width = 72 + Top = 57 + Width = 70 + BorderSpacing.Top = 4 Caption = 'Constraints' ParentColor = False end object ExcludeBlackCheck: TCheckBox + AnchorSideLeft.Control = DiffLabel + AnchorSideTop.Control = ErodeEdit + AnchorSideTop.Side = asrBottom Left = 12 Height = 18 - Top = 236 - Width = 204 + Top = 177 + Width = 194 + BorderSpacing.Top = 4 Caption = 'Zero intensity constrains edge' OnClick = AutoROIchange TabOrder = 0 end object VarianceEdit: TSpinEdit - Left = 173 - Height = 16 - Top = 90 + AnchorSideLeft.Control = DiffLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Label4 + AnchorSideTop.Side = asrBottom + Left = 152 + Height = 21 + Top = 77 Width = 72 + BorderSpacing.Left = 8 + BorderSpacing.Top = 4 MaxValue = 255 OnChange = AutoROIchange TabOrder = 1 Value = 16 end object EdgeEdit: TSpinEdit - Left = 173 - Height = 16 - Top = 126 + AnchorSideLeft.Control = VarianceEdit + AnchorSideTop.Control = VarianceEdit + AnchorSideTop.Side = asrBottom + Left = 152 + Height = 21 + Top = 102 Width = 72 + BorderSpacing.Top = 4 MaxValue = 255 OnChange = AutoROIchange TabOrder = 2 Value = 16 end object RadiusEdit: TSpinEdit - Left = 173 - Height = 16 - Top = 161 + AnchorSideLeft.Control = VarianceEdit + AnchorSideTop.Control = EdgeEdit + AnchorSideTop.Side = asrBottom + Left = 152 + Height = 21 + Top = 127 Width = 72 + BorderSpacing.Top = 4 MaxValue = 9999 OnChange = AutoROIchange TabOrder = 3 Value = 32 end object ErodeEdit: TSpinEdit - Left = 173 - Height = 16 - Top = 196 + AnchorSideLeft.Control = VarianceEdit + AnchorSideTop.Control = RadiusEdit + AnchorSideTop.Side = asrBottom + Left = 152 + Height = 21 + Top = 152 Width = 72 + BorderSpacing.Top = 4 MaxValue = 12 OnChange = AutoROIchange TabOrder = 4 end object ROIconstraint: TComboBox + AnchorSideLeft.Control = DiffLabel + AnchorSideTop.Control = ExcludeBlackCheck + AnchorSideTop.Side = asrBottom Left = 12 Height = 20 - Top = 268 + Top = 199 Width = 212 - ItemHeight = 0 + BorderSpacing.Top = 4 + ItemHeight = 26 Items.Strings = ( 'Append to current VOI' 'Delete from current VOI' @@ -127,31 +176,52 @@ object AutoROIForm: TAutoROIForm ParentColor = True Style = csDropDownList TabOrder = 5 + Text = '0' end object OriginBtn: TButton - Left = 7 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner + Left = 8 Height = 25 - Top = 5 + Top = 8 Width = 114 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 Caption = 'Reset origin' OnClick = OriginBtnClick TabOrder = 6 end object AutoROIBtn: TButton - Left = 54 - Height = 25 - Top = 302 - Width = 64 + AnchorSideTop.Control = ROIconstraint + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 183 + Height = 20 + Top = 225 + Width = 100 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Top = 6 + BorderSpacing.Right = 6 Caption = 'Apply' + Constraints.MinWidth = 100 OnClick = AutoROIBtnClick TabOrder = 7 end object CancelBtn: TButton - Left = 128 - Height = 25 - Top = 302 - Width = 64 + AnchorSideTop.Control = AutoROIBtn + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = AutoROIBtn + Left = 77 + Height = 20 + Top = 225 + Width = 100 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Right = 6 Caption = 'Cancel' + Constraints.MinWidth = 100 OnClick = CancelBtnClick TabOrder = 8 end @@ -159,7 +229,7 @@ object AutoROIForm: TAutoROIForm Enabled = False Interval = 400 OnTimer = Timer1Timer - left = 40 - top = 34 + left = 168 + top = 24 end end diff --git a/autoroi.lrs b/autoroi.lrs index fb9b2a9..6f4a301 100755 --- a/autoroi.lrs +++ b/autoroi.lrs @@ -1,44 +1,77 @@ { This is an automatically generated lazarus resource file } LazarusResources.Add('TAutoROIForm','FORMDATA',[ - 'TPF0'#12'TAutoROIForm'#11'AutoROIForm'#4'Left'#3#17#3#6'Height'#3'c'#1#3'Top' - +#3#200#0#5'Width'#3#9#1#18'HorzScrollBar.Page'#3#8#1#18'VertScrollBar.Page'#3 - +'b'#1#13'ActiveControl'#7#12'VarianceEdit'#11'BorderStyle'#7#8'bsDialog'#7'C' - +'aption'#6#10'Create ROI'#12'ClientHeight'#3'c'#1#11'ClientWidth'#3#9#1#8'On' - +'Create'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#6'OnHide'#7#8'FormH' - +'ide'#6'OnShow'#7#8'FormShow'#8'Position'#7#14'poScreenCenter'#10'LCLVersion' - +#6#7'1.9.0.0'#0#6'TLabel'#11'OriginLabel'#4'Left'#2#4#6'Height'#2#16#3'Top'#2 - +'*'#5'Width'#2'/'#7'Caption'#6#8'Origin: '#11'ParentColor'#8#0#0#6'TLabel'#9 - +'DiffLabel'#4'Left'#2#12#6'Height'#2#16#3'Top'#2'b'#5'Width'#3#140#0#7'Capti' - +'on'#6#22'Difference from origin'#11'ParentColor'#8#0#0#6'TLabel'#6'Label1'#4 - +'Left'#2#12#6'Height'#2#16#3'Top'#3#132#0#5'Width'#2's'#7'Caption'#6#18'Diff' - +'erence at edge'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#12#6'He' - +'ight'#2#16#3'Top'#3#167#0#5'Width'#2'O'#7'Caption'#6#11'Radius (mm)'#11'Par' - +'entColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2#12#6'Height'#2#16#3'Top'#3#202 - +#0#5'Width'#2'w'#7'Caption'#6#19'Erode/dilate cycles'#11'ParentColor'#8#0#0#6 - +'TLabel'#6'Label4'#4'Left'#2#4#6'Height'#2#16#3'Top'#2'J'#5'Width'#2'H'#7'Ca' - +'ption'#6#11'Constraints'#11'ParentColor'#8#0#0#9'TCheckBox'#17'ExcludeBlack' - +'Check'#4'Left'#2#12#6'Height'#2#18#3'Top'#3#236#0#5'Width'#3#204#0#7'Captio' - +'n'#6#30'Zero intensity constrains edge'#7'OnClick'#7#13'AutoROIchange'#8'Ta' - +'bOrder'#2#0#0#0#9'TSpinEdit'#12'VarianceEdit'#4'Left'#3#173#0#6'Height'#2#16 - +#3'Top'#2'Z'#5'Width'#2'H'#8'MaxValue'#3#255#0#8'OnChange'#7#13'AutoROIchang' - +'e'#8'TabOrder'#2#1#5'Value'#2#16#0#0#9'TSpinEdit'#8'EdgeEdit'#4'Left'#3#173 - +#0#6'Height'#2#16#3'Top'#2'~'#5'Width'#2'H'#8'MaxValue'#3#255#0#8'OnChange'#7 - +#13'AutoROIchange'#8'TabOrder'#2#2#5'Value'#2#16#0#0#9'TSpinEdit'#10'RadiusE' - +'dit'#4'Left'#3#173#0#6'Height'#2#16#3'Top'#3#161#0#5'Width'#2'H'#8'MaxValue' - +#3#15''''#8'OnChange'#7#13'AutoROIchange'#8'TabOrder'#2#3#5'Value'#2' '#0#0#9 - +'TSpinEdit'#9'ErodeEdit'#4'Left'#3#173#0#6'Height'#2#16#3'Top'#3#196#0#5'Wid' - +'th'#2'H'#8'MaxValue'#2#12#8'OnChange'#7#13'AutoROIchange'#8'TabOrder'#2#4#0 - +#0#9'TComboBox'#13'ROIconstraint'#4'Left'#2#12#6'Height'#2#20#3'Top'#3#12#1#5 - +'Width'#3#212#0#10'ItemHeight'#2#0#13'Items.Strings'#1#6#21'Append to curren' - +'t VOI'#6#23'Delete from current VOI'#6#26'Constrain with current VOI'#0#8'O' - +'nChange'#7#13'AutoROIchange'#11'ParentColor'#9#5'Style'#7#14'csDropDownList' - +#8'TabOrder'#2#5#0#0#7'TButton'#9'OriginBtn'#4'Left'#2#7#6'Height'#2#25#3'To' - +'p'#2#5#5'Width'#2'r'#7'Caption'#6#12'Reset origin'#7'OnClick'#7#14'OriginBt' - +'nClick'#8'TabOrder'#2#6#0#0#7'TButton'#10'AutoROIBtn'#4'Left'#2'6'#6'Height' - +#2#25#3'Top'#3'.'#1#5'Width'#2'@'#7'Caption'#6#5'Apply'#7'OnClick'#7#15'Auto' - +'ROIBtnClick'#8'TabOrder'#2#7#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#128#0#6 - +'Height'#2#25#3'Top'#3'.'#1#5'Width'#2'@'#7'Caption'#6#6'Cancel'#7'OnClick'#7 - +#14'CancelBtnClick'#8'TabOrder'#2#8#0#0#6'TTimer'#6'Timer1'#7'Enabled'#8#8'I' - +'nterval'#3#144#1#7'OnTimer'#7#11'Timer1Timer'#4'left'#2'('#3'top'#2'"'#0#0#0 + 'TPF0'#12'TAutoROIForm'#11'AutoROIForm'#4'Left'#3#245#2#6'Height'#3#2#1#3'Top' + +#3#200#0#5'Width'#3'%'#1#18'HorzScrollBar.Page'#3#8#1#18'VertScrollBar.Page' + +#3'b'#1#13'ActiveControl'#7#12'VarianceEdit'#8'AutoSize'#9#11'BorderStyle'#7 + +#8'bsDialog'#11'BorderWidth'#2#4#7'Caption'#6#10'Create ROI'#12'ClientHeight' + +#3#2#1#11'ClientWidth'#3'%'#1#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11 + +'FormDestroy'#6'OnHide'#7#8'FormHide'#6'OnShow'#7#8'FormShow'#8'Position'#7 + +#14'poScreenCenter'#10'LCLVersion'#6#7'2.1.0.0'#0#6'TLabel'#11'OriginLabel' + +#22'AnchorSideLeft.Control'#7#9'OriginBtn'#21'AnchorSideTop.Control'#7#9'Ori' + +'ginBtn'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#16#3 + +'Top'#2'%'#5'Width'#2','#17'BorderSpacing.Top'#2#4#7'Caption'#6#8'Origin: ' + +#11'ParentColor'#8#0#0#6'TLabel'#9'DiffLabel'#22'AnchorSideLeft.Control'#7#6 + +'Label4'#21'AnchorSideTop.Control'#7#12'VarianceEdit'#18'AnchorSideTop.Side' + +#7#9'asrCenter'#4'Left'#2#12#6'Height'#2#16#3'Top'#2'O'#5'Width'#3#132#0#18 + +'BorderSpacing.Left'#2#4#17'BorderSpacing.Top'#2#4#7'Caption'#6#22'Differenc' + +'e from origin'#11'ParentColor'#8#0#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.' + +'Control'#7#9'DiffLabel'#21'AnchorSideTop.Control'#7#8'EdgeEdit'#18'AnchorSi' + +'deTop.Side'#7#9'asrCenter'#4'Left'#2#12#6'Height'#2#16#3'Top'#2'h'#5'Width' + +#2'p'#7'Caption'#6#18'Difference at edge'#11'ParentColor'#8#0#0#6'TLabel'#6 + +'Label2'#22'AnchorSideLeft.Control'#7#9'DiffLabel'#21'AnchorSideTop.Control' + +#7#10'RadiusEdit'#4'Left'#2#12#6'Height'#2#16#3'Top'#2#127#5'Width'#2'M'#7'C' + +'aption'#6#11'Radius (mm)'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#22'Anch' + +'orSideLeft.Control'#7#9'DiffLabel'#21'AnchorSideTop.Control'#7#9'ErodeEdit' + +#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#12#6'Height'#2#16#3'Top'#3 + +#154#0#5'Width'#2's'#7'Caption'#6#19'Erode/dilate cycles'#11'ParentColor'#8#0 + +#0#6'TLabel'#6'Label4'#22'AnchorSideLeft.Control'#7#9'OriginBtn'#21'AnchorSi' + +'deTop.Control'#7#11'OriginLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Le' + +'ft'#2#8#6'Height'#2#16#3'Top'#2'9'#5'Width'#2'F'#17'BorderSpacing.Top'#2#4#7 + +'Caption'#6#11'Constraints'#11'ParentColor'#8#0#0#9'TCheckBox'#17'ExcludeBla' + +'ckCheck'#22'AnchorSideLeft.Control'#7#9'DiffLabel'#21'AnchorSideTop.Control' + +#7#9'ErodeEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height' + +#2#18#3'Top'#3#177#0#5'Width'#3#194#0#17'BorderSpacing.Top'#2#4#7'Caption'#6 + +#30'Zero intensity constrains edge'#7'OnClick'#7#13'AutoROIchange'#8'TabOrde' + +'r'#2#0#0#0#9'TSpinEdit'#12'VarianceEdit'#22'AnchorSideLeft.Control'#7#9'Dif' + +'fLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#6 + +'Label4'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#152#0#6'Height'#2#21 + +#3'Top'#2'M'#5'Width'#2'H'#18'BorderSpacing.Left'#2#8#17'BorderSpacing.Top'#2 + +#4#8'MaxValue'#3#255#0#8'OnChange'#7#13'AutoROIchange'#8'TabOrder'#2#1#5'Val' + +'ue'#2#16#0#0#9'TSpinEdit'#8'EdgeEdit'#22'AnchorSideLeft.Control'#7#12'Varia' + +'nceEdit'#21'AnchorSideTop.Control'#7#12'VarianceEdit'#18'AnchorSideTop.Side' + +#7#9'asrBottom'#4'Left'#3#152#0#6'Height'#2#21#3'Top'#2'f'#5'Width'#2'H'#17 + +'BorderSpacing.Top'#2#4#8'MaxValue'#3#255#0#8'OnChange'#7#13'AutoROIchange'#8 + +'TabOrder'#2#2#5'Value'#2#16#0#0#9'TSpinEdit'#10'RadiusEdit'#22'AnchorSideLe' + +'ft.Control'#7#12'VarianceEdit'#21'AnchorSideTop.Control'#7#8'EdgeEdit'#18'A' + +'nchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#152#0#6'Height'#2#21#3'Top'#2 + +#127#5'Width'#2'H'#17'BorderSpacing.Top'#2#4#8'MaxValue'#3#15''''#8'OnChange' + +#7#13'AutoROIchange'#8'TabOrder'#2#3#5'Value'#2' '#0#0#9'TSpinEdit'#9'ErodeE' + +'dit'#22'AnchorSideLeft.Control'#7#12'VarianceEdit'#21'AnchorSideTop.Control' + +#7#10'RadiusEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#152#0#6'He' + +'ight'#2#21#3'Top'#3#152#0#5'Width'#2'H'#17'BorderSpacing.Top'#2#4#8'MaxValu' + +'e'#2#12#8'OnChange'#7#13'AutoROIchange'#8'TabOrder'#2#4#0#0#9'TComboBox'#13 + +'ROIconstraint'#22'AnchorSideLeft.Control'#7#9'DiffLabel'#21'AnchorSideTop.C' + +'ontrol'#7#17'ExcludeBlackCheck'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Lef' + +'t'#2#12#6'Height'#2#20#3'Top'#3#199#0#5'Width'#3#212#0#17'BorderSpacing.Top' + +#2#4#10'ItemHeight'#2#26#13'Items.Strings'#1#6#21'Append to current VOI'#6#23 + +'Delete from current VOI'#6#26'Constrain with current VOI'#0#8'OnChange'#7#13 + +'AutoROIchange'#11'ParentColor'#9#5'Style'#7#14'csDropDownList'#8'TabOrder'#2 + +#5#4'Text'#6#1'0'#0#0#7'TButton'#9'OriginBtn'#22'AnchorSideLeft.Control'#7#5 + +'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#8#6'Height'#2#25#3'To' + +'p'#2#8#5'Width'#2'r'#18'BorderSpacing.Left'#2#4#17'BorderSpacing.Top'#2#4#7 + +'Caption'#6#12'Reset origin'#7'OnClick'#7#14'OriginBtnClick'#8'TabOrder'#2#6 + +#0#0#7'TButton'#10'AutoROIBtn'#21'AnchorSideTop.Control'#7#13'ROIconstraint' + +#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner' + +#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#183#0#6'Height'#2#20#3'To' + +'p'#3#225#0#5'Width'#2'd'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9 + ,#17'BorderSpacing.Top'#2#6#19'BorderSpacing.Right'#2#6#7'Caption'#6#5'Apply' + +#20'Constraints.MinWidth'#2'd'#7'OnClick'#7#15'AutoROIBtnClick'#8'TabOrder'#2 + +#7#0#0#7'TButton'#9'CancelBtn'#21'AnchorSideTop.Control'#7#10'AutoROIBtn'#18 + +'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#10'AutoROI' + +'Btn'#4'Left'#2'M'#6'Height'#2#20#3'Top'#3#225#0#5'Width'#2'd'#7'Anchors'#11 + +#5'akTop'#7'akRight'#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#6#7'Caption'#6 + +#6'Cancel'#20'Constraints.MinWidth'#2'd'#7'OnClick'#7#14'CancelBtnClick'#8'T' + +'abOrder'#2#8#0#0#6'TTimer'#6'Timer1'#7'Enabled'#8#8'Interval'#3#144#1#7'OnT' + +'imer'#7#11'Timer1Timer'#4'left'#3#168#0#3'top'#2#24#0#0#0 ]); diff --git a/bet.pas b/bet.pas index 3554062..8a6097c 100755 --- a/bet.pas +++ b/bet.pas @@ -54,6 +54,37 @@ function PathExists (lCmd: string): boolean; result := true; end; +{$IFDEF Windows} +procedure riteln(S: string); +begin + //showmessage(S); +end; +procedure RunCmd (lCmd: string); +const + FSLOUTPUTTYPE = 'FSLOUTPUTTYPE=NIFTI_GZ'; + var + AProcess: TProcess; + i: integer; + AStringList: TStringList; + //PATH,FSLDIR,lS,FULL,FSLDIRBIN: string; + begin + AProcess := TProcess.Create(nil); + AStringList := TStringList.Create; + AProcess.Environment.Add(FSLOUTPUTTYPE); + AProcess.CommandLine := lCmd; + AProcess.Options := AProcess.Options + [poNoConsole,poWaitOnExit, poStderrToOutPut, poUsePipes]; + riteln(AProcess.CommandLine); + {$IFDEF GUI}application.processmessages;{$ENDIF} + AProcess.Execute; + AStringList.LoadFromStream(AProcess.Output); + if AStringList.Count > 0 then + for i := 1 to AStringList.Count do + riteln(AStringList.Strings[i-1]); + AStringList.Free; + AProcess.Free; +end; + +{$ELSE} procedure RunCmd (lCmd: string); var AProcess: TProcess; @@ -133,7 +164,7 @@ procedure RunCmd (lCmd: string); AStringList.Free; AProcess.Free; end; - + {$ENDIF} (*procedure RunCmdX; var AProcess: TProcess; @@ -165,15 +196,20 @@ function DoBET(lInFile,lOutFile: string; lFrac: single):boolean; lCmd: string; begin result := false; - lCmd := extractfilepath(paramstr(0))+'bet'; + {$IFNDEF Unix} + lCmd := extractfilepath(paramstr(0))+'Resources'+pathdelim+'bet2.exe'; + if not fileexists(lCmd) then + lCmd := extractfilepath(paramstr(0))+'bet2.exe'; + lCmd := lCmd+' "'+lInFile+'" "'+lOutFile +'" -f '+floattostr(lFrac); + {$ELSE} + lCmd := extractfilepath(paramstr(0))+'Resources'+pathdelim+'bet'; + if not fileexists(lCmd) then + lCmd := extractfilepath(paramstr(0))+'bet'; {$IFDEF Darwin} if not fileexists(lCmd) then lCmd := AppDir + 'bet'; //showmessage(gTemplateDir); {$ENDIF} - {$IFNDEF Unix} - lCmd := lCmd+'.exe'; - {$ELSE} if not fileexists(lCmd) then begin lCmd := (gBGImg.FSLBASE+'/bin/bet'); if fileexists(lCmd) then @@ -182,7 +218,7 @@ function DoBET(lInFile,lOutFile: string; lFrac: single):boolean; BETForm.Memo1.Lines.Add('Unable to find executable suggested by mricron.ini file [FSLBASE] '+lCmd) end; - {$ENDIF} + if not PathExists (lCmd) then begin lCmd := '/usr/local/fsl/bin/bet_8UI'; if not PathExists (lCmd) then begin @@ -191,7 +227,8 @@ function DoBET(lInFile,lOutFile: string; lFrac: single):boolean; exit; end; end; //no bet in home folder... - lCmd := lCmd+' "'+lInFile+'" "'+lOutFile +'" -R -f '+floattostr(lFrac); + lCmd := lCmd+' "'+lInFile+'" "'+lOutFile +'" -R -f '+floattostr(lFrac); + {$ENDIF} RunCmd(lCmd); (*AProcess := TProcess.Create(nil); diff --git a/common/define_types.pas b/common/define_types.pas index 93e569b..f7fb0e4 100755 --- a/common/define_types.pas +++ b/common/define_types.pas @@ -20,7 +20,7 @@ interface {$IFDEF GUI} forms,userdir, dialogs{$ELSE}dialogsx{$ENDIF}; const //kMRIcronVersDate = '3MAY2016'; - kVers = 'v1.0.20180622'; + kVers = 'v1.0.20181114'; {$IFDEF LCLCocoa} kMRIcronAPI = 'Cocoa'; {$ELSE} diff --git a/cropedges.lfm b/cropedges.lfm index 4e81de4..06bf9d8 100755 --- a/cropedges.lfm +++ b/cropedges.lfm @@ -1,81 +1,119 @@ object CropEdgeForm: TCropEdgeForm - Left = 872 - Height = 142 - Top = 203 + Left = 631 + Height = 146 + Top = 197 Width = 398 ActiveControl = DEdit + AutoSize = True BorderIcons = [biSystemMenu] BorderStyle = bsDialog + BorderWidth = 4 Caption = 'Crop Edges' - ClientHeight = 142 + ClientHeight = 146 ClientWidth = 398 - Constraints.MaxHeight = 321 - Constraints.MaxWidth = 398 - Constraints.MinHeight = 12 - Constraints.MinWidth = 398 OnCreate = FormCreate OnHide = FormHide OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.9.0.0' + LCLVersion = '2.1.0.0' object CancelBtn: TSpeedButton - Left = 320 - Height = 25 - Top = 104 - Width = 65 - Caption = 'Cancel' + AnchorSideTop.Control = VEdit + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 310 + Height = 20 + Top = 75 + Width = 80 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 + Constraints.MinWidth = 80 + Caption = ' Cancel ' OnClick = CancelBtnClick end object ApplyBtn: TSpeedButton - Left = 256 - Height = 25 - Top = 104 - Width = 65 - Caption = 'Apply' + AnchorSideTop.Control = CancelBtn + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = CancelBtn + Left = 226 + Height = 20 + Top = 75 + Width = 80 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Right = 4 + Constraints.MinWidth = 80 + Caption = ' Apply ' OnClick = ApplyBtnClick end object CropFileSzBtn: TSpeedButton - Left = 136 - Height = 25 - Top = 104 - Width = 105 - Caption = 'Save Cropped' + AnchorSideTop.Control = CancelBtn + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = ApplyBtn + Left = 126 + Height = 20 + Top = 75 + Width = 96 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Right = 4 + Constraints.MinWidth = 80 + Caption = ' Save Cropped ' OnClick = CropFileSzBtnClick end object DEdit: TSpinEdit - Left = 57 - Height = 16 + AnchorSideLeft.Control = PEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Owner + Left = 84 + Height = 21 Top = 8 Width = 72 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 MaxValue = 9999 OnChange = CropEditChange TabOrder = 0 Value = 8 end object PEdit: TSpinEdit + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = DEdit + AnchorSideTop.Side = asrBottom Left = 8 - Height = 16 - Top = 41 + Height = 21 + Top = 29 Width = 72 + BorderSpacing.Left = 4 MaxValue = 9999 OnChange = CropEditChange TabOrder = 1 Value = 8 end object AEdit: TSpinEdit - Left = 104 - Height = 16 - Top = 41 + AnchorSideLeft.Control = DEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = PEdit + AnchorSideTop.Side = asrCenter + Left = 160 + Height = 21 + Top = 29 Width = 72 + BorderSpacing.Left = 4 MaxValue = 9999 OnChange = CropEditChange TabOrder = 2 Value = 8 end object VEdit: TSpinEdit - Left = 57 - Height = 16 - Top = 73 + AnchorSideLeft.Control = DEdit + AnchorSideTop.Control = PEdit + AnchorSideTop.Side = asrBottom + Left = 84 + Height = 21 + Top = 50 Width = 72 MaxValue = 9999 OnChange = CropEditChange @@ -83,20 +121,30 @@ object CropEdgeForm: TCropEdgeForm Value = 8 end object REdit: TSpinEdit - Left = 311 - Height = 16 - Top = 41 + AnchorSideLeft.Control = LEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = PEdit + AnchorSideTop.Side = asrCenter + Left = 326 + Height = 21 + Top = 29 Width = 72 + BorderSpacing.Left = 4 MaxValue = 9999 OnChange = CropEditChange TabOrder = 4 Value = 8 end object LEdit: TSpinEdit - Left = 224 - Height = 16 - Top = 41 + AnchorSideLeft.Control = AEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = PEdit + AnchorSideTop.Side = asrCenter + Left = 250 + Height = 21 + Top = 29 Width = 72 + BorderSpacing.Left = 18 MaxValue = 9999 OnChange = CropEditChange TabOrder = 5 @@ -106,7 +154,7 @@ object CropEdgeForm: TCropEdgeForm Enabled = False Interval = 150 OnTimer = Timer1Timer - left = 328 - top = 72 + left = 24 + top = 56 end end diff --git a/cropedges.lrs b/cropedges.lrs index cfb7890..310e654 100755 --- a/cropedges.lrs +++ b/cropedges.lrs @@ -1,32 +1,54 @@ { This is an automatically generated lazarus resource file } LazarusResources.Add('TCropEdgeForm','FORMDATA',[ - 'TPF0'#13'TCropEdgeForm'#12'CropEdgeForm'#4'Left'#3'h'#3#6'Height'#3#142#0#3 - +'Top'#3#203#0#5'Width'#3#142#1#13'ActiveControl'#7#5'DEdit'#11'BorderIcons' - +#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#10'Crop Ed' - +'ges'#12'ClientHeight'#3#142#0#11'ClientWidth'#3#142#1#21'Constraints.MaxHei' - +'ght'#3'A'#1#20'Constraints.MaxWidth'#3#142#1#21'Constraints.MinHeight'#2#12 - +#20'Constraints.MinWidth'#3#142#1#8'OnCreate'#7#10'FormCreate'#6'OnHide'#7#8 - +'FormHide'#6'OnShow'#7#8'FormShow'#8'Position'#7#14'poScreenCenter'#10'LCLVe' - +'rsion'#6#7'1.9.0.0'#0#12'TSpeedButton'#9'CancelBtn'#4'Left'#3'@'#1#6'Height' - +#2#25#3'Top'#2'h'#5'Width'#2'A'#7'Caption'#6#6'Cancel'#7'OnClick'#7#14'Cance' - +'lBtnClick'#0#0#12'TSpeedButton'#8'ApplyBtn'#4'Left'#3#0#1#6'Height'#2#25#3 - +'Top'#2'h'#5'Width'#2'A'#7'Caption'#6#5'Apply'#7'OnClick'#7#13'ApplyBtnClick' - +#0#0#12'TSpeedButton'#13'CropFileSzBtn'#4'Left'#3#136#0#6'Height'#2#25#3'Top' - +#2'h'#5'Width'#2'i'#7'Caption'#6#12'Save Cropped'#7'OnClick'#7#18'CropFileSz' - +'BtnClick'#0#0#9'TSpinEdit'#5'DEdit'#4'Left'#2'9'#6'Height'#2#16#3'Top'#2#8#5 - +'Width'#2'H'#8'MaxValue'#3#15''''#8'OnChange'#7#14'CropEditChange'#8'TabOrde' - +'r'#2#0#5'Value'#2#8#0#0#9'TSpinEdit'#5'PEdit'#4'Left'#2#8#6'Height'#2#16#3 - +'Top'#2')'#5'Width'#2'H'#8'MaxValue'#3#15''''#8'OnChange'#7#14'CropEditChang' - +'e'#8'TabOrder'#2#1#5'Value'#2#8#0#0#9'TSpinEdit'#5'AEdit'#4'Left'#2'h'#6'He' - +'ight'#2#16#3'Top'#2')'#5'Width'#2'H'#8'MaxValue'#3#15''''#8'OnChange'#7#14 - +'CropEditChange'#8'TabOrder'#2#2#5'Value'#2#8#0#0#9'TSpinEdit'#5'VEdit'#4'Le' - +'ft'#2'9'#6'Height'#2#16#3'Top'#2'I'#5'Width'#2'H'#8'MaxValue'#3#15''''#8'On' - +'Change'#7#14'CropEditChange'#8'TabOrder'#2#3#5'Value'#2#8#0#0#9'TSpinEdit'#5 - +'REdit'#4'Left'#3'7'#1#6'Height'#2#16#3'Top'#2')'#5'Width'#2'H'#8'MaxValue'#3 + 'TPF0'#13'TCropEdgeForm'#12'CropEdgeForm'#4'Left'#3'w'#2#6'Height'#3#146#0#3 + +'Top'#3#197#0#5'Width'#3#142#1#13'ActiveControl'#7#5'DEdit'#8'AutoSize'#9#11 + +'BorderIcons'#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#11'BorderW' + +'idth'#2#4#7'Caption'#6#10'Crop Edges'#12'ClientHeight'#3#146#0#11'ClientWid' + +'th'#3#142#1#8'OnCreate'#7#10'FormCreate'#6'OnHide'#7#8'FormHide'#6'OnShow'#7 + +#8'FormShow'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.1.0.0'#0 + +#12'TSpeedButton'#9'CancelBtn'#21'AnchorSideTop.Control'#7#5'VEdit'#18'Ancho' + +'rSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'Anc' + +'horSideRight.Side'#7#9'asrBottom'#4'Left'#3'6'#1#6'Height'#2#20#3'Top'#2'K' + +#5'Width'#2'P'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#17'BorderSp' + +'acing.Top'#2#4#19'BorderSpacing.Right'#2#4#20'Constraints.MinWidth'#2'P'#7 + +'Caption'#6#8' Cancel '#7'OnClick'#7#14'CancelBtnClick'#0#0#12'TSpeedButton' + +#8'ApplyBtn'#21'AnchorSideTop.Control'#7#9'CancelBtn'#18'AnchorSideTop.Side' + +#7#9'asrCenter'#23'AnchorSideRight.Control'#7#9'CancelBtn'#4'Left'#3#226#0#6 + +'Height'#2#20#3'Top'#2'K'#5'Width'#2'P'#7'Anchors'#11#5'akTop'#7'akRight'#0#8 + +'AutoSize'#9#19'BorderSpacing.Right'#2#4#20'Constraints.MinWidth'#2'P'#7'Cap' + +'tion'#6#7' Apply '#7'OnClick'#7#13'ApplyBtnClick'#0#0#12'TSpeedButton'#13'C' + +'ropFileSzBtn'#21'AnchorSideTop.Control'#7#9'CancelBtn'#18'AnchorSideTop.Sid' + +'e'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#8'ApplyBtn'#4'Left'#2'~'#6 + +'Height'#2#20#3'Top'#2'K'#5'Width'#2'`'#7'Anchors'#11#5'akTop'#7'akRight'#0#8 + +'AutoSize'#9#19'BorderSpacing.Right'#2#4#20'Constraints.MinWidth'#2'P'#7'Cap' + +'tion'#6#14' Save Cropped '#7'OnClick'#7#18'CropFileSzBtnClick'#0#0#9'TSpinE' + +'dit'#5'DEdit'#22'AnchorSideLeft.Control'#7#5'PEdit'#19'AnchorSideLeft.Side' + +#7#9'asrBottom'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2'T'#6'Height'#2 + +#21#3'Top'#2#8#5'Width'#2'H'#18'BorderSpacing.Left'#2#4#17'BorderSpacing.Top' + +#2#4#8'MaxValue'#3#15''''#8'OnChange'#7#14'CropEditChange'#8'TabOrder'#2#0#5 + +'Value'#2#8#0#0#9'TSpinEdit'#5'PEdit'#22'AnchorSideLeft.Control'#7#5'Owner' + +#21'AnchorSideTop.Control'#7#5'DEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4 + +'Left'#2#8#6'Height'#2#21#3'Top'#2#29#5'Width'#2'H'#18'BorderSpacing.Left'#2 + +#4#8'MaxValue'#3#15''''#8'OnChange'#7#14'CropEditChange'#8'TabOrder'#2#1#5'V' + +'alue'#2#8#0#0#9'TSpinEdit'#5'AEdit'#22'AnchorSideLeft.Control'#7#5'DEdit'#19 + +'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#5'PEdit'#18 + +'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#160#0#6'Height'#2#21#3'Top'#2 + +#29#5'Width'#2'H'#18'BorderSpacing.Left'#2#4#8'MaxValue'#3#15''''#8'OnChange' + +#7#14'CropEditChange'#8'TabOrder'#2#2#5'Value'#2#8#0#0#9'TSpinEdit'#5'VEdit' + +#22'AnchorSideLeft.Control'#7#5'DEdit'#21'AnchorSideTop.Control'#7#5'PEdit' + +#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'T'#6'Height'#2#21#3'Top'#2 + +'2'#5'Width'#2'H'#8'MaxValue'#3#15''''#8'OnChange'#7#14'CropEditChange'#8'Ta' + +'bOrder'#2#3#5'Value'#2#8#0#0#9'TSpinEdit'#5'REdit'#22'AnchorSideLeft.Contro' + +'l'#7#5'LEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Contr' + +'ol'#7#5'PEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3'F'#1#6'Heigh' + +'t'#2#21#3'Top'#2#29#5'Width'#2'H'#18'BorderSpacing.Left'#2#4#8'MaxValue'#3 +#15''''#8'OnChange'#7#14'CropEditChange'#8'TabOrder'#2#4#5'Value'#2#8#0#0#9 - +'TSpinEdit'#5'LEdit'#4'Left'#3#224#0#6'Height'#2#16#3'Top'#2')'#5'Width'#2'H' - +#8'MaxValue'#3#15''''#8'OnChange'#7#14'CropEditChange'#8'TabOrder'#2#5#5'Val' - +'ue'#2#8#0#0#6'TTimer'#6'Timer1'#7'Enabled'#8#8'Interval'#3#150#0#7'OnTimer' - +#7#11'Timer1Timer'#4'left'#3'H'#1#3'top'#2'H'#0#0#0 + +'TSpinEdit'#5'LEdit'#22'AnchorSideLeft.Control'#7#5'AEdit'#19'AnchorSideLeft' + +'.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#5'PEdit'#18'AnchorSideTop' + +'.Side'#7#9'asrCenter'#4'Left'#3#250#0#6'Height'#2#21#3'Top'#2#29#5'Width'#2 + +'H'#18'BorderSpacing.Left'#2#18#8'MaxValue'#3#15''''#8'OnChange'#7#14'CropEd' + +'itChange'#8'TabOrder'#2#5#5'Value'#2#8#0#0#6'TTimer'#6'Timer1'#7'Enabled'#8 + +#8'Interval'#3#150#0#7'OnTimer'#7#11'Timer1Timer'#4'left'#2#24#3'top'#2'8'#0 + +#0#0 ]); diff --git a/cutout.lfm b/cutout.lfm index 2526250..fc365d9 100755 --- a/cutout.lfm +++ b/cutout.lfm @@ -1,140 +1,201 @@ object CutoutForm: TCutoutForm - Left = 384 + Left = 492 Height = 334 - Top = 175 + Top = 173 Width = 334 HorzScrollBar.Page = 335 VertScrollBar.Page = 316 ActiveControl = RenderCutoutCheck + AutoSize = True BorderIcons = [biSystemMenu, biMinimize] BorderStyle = bsSingle + BorderWidth = 4 Caption = 'Cutouts' ClientHeight = 334 ClientWidth = 334 - Constraints.MaxHeight = 334 - Constraints.MaxWidth = 334 - Constraints.MinHeight = 334 - Constraints.MinWidth = 334 OnClose = FormClose OnShow = FormShow Position = poScreenCenter - LCLVersion = '0.9.29' + LCLVersion = '2.1.0.0' object RenderCutoutCheck: TCheckBox - Left = 16 - Height = 17 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner + Left = 8 + Height = 18 Top = 8 - Width = 80 + Width = 93 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 Caption = 'Show cutout' OnClick = RenderCutoutCheckClick TabOrder = 0 end object CutoutBox: TGroupBox - Left = 16 - Height = 224 - Top = 32 - Width = 304 - ClientHeight = 206 - ClientWidth = 300 + AnchorSideLeft.Control = RenderCutoutCheck + AnchorSideTop.Control = RenderCutoutCheck + AnchorSideTop.Side = asrBottom + Left = 8 + Height = 147 + Top = 30 + Width = 301 + AutoSize = True + BorderSpacing.Top = 4 + BorderSpacing.InnerBorder = 4 + ClientHeight = 129 + ClientWidth = 293 TabOrder = 5 object Label1: TLabel - Left = 14 - Height = 14 - Top = 8 - Width = 58 + AnchorSideLeft.Control = CutoutBox + AnchorSideTop.Control = XLo + AnchorSideTop.Side = asrCenter + Left = 4 + Height = 16 + Top = 6 + Width = 70 + BorderSpacing.Left = 4 Caption = 'X [low=left]' ParentColor = False end object Label2: TLabel - Left = 14 - Height = 14 - Top = 48 - Width = 85 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = YLo + Left = 4 + Height = 16 + Top = 29 + Width = 105 Caption = 'Y [low=posterior]' ParentColor = False end object Label3: TLabel - Left = 14 - Height = 14 - Top = 88 - Width = 76 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = ZLo + AnchorSideTop.Side = asrCenter + Left = 4 + Height = 16 + Top = 56 + Width = 91 Caption = 'Z [low=ventral]' ParentColor = False end object Label4: TLabel - Left = 14 - Height = 14 - Top = 135 - Width = 55 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = CutoutBiasDrop + AnchorSideTop.Side = asrCenter + Left = 4 + Height = 16 + Top = 80 + Width = 68 Caption = 'Cutout Tint' ParentColor = False end object Label5: TLabel - Left = 14 - Height = 14 - Top = 175 - Width = 62 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = CutoutLUTDrop + AnchorSideTop.Side = asrCenter + Left = 4 + Height = 16 + Top = 103 + Width = 77 Caption = 'Cutout Color' ParentColor = False end object XLo: TSpinEdit - Left = 118 + AnchorSideLeft.Control = Label2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = CutoutBox + Left = 113 Height = 21 - Top = 0 - Width = 82 + Top = 4 + Width = 84 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 + Constraints.MinWidth = 84 MaxValue = 1000 OnChange = PreviewClick TabOrder = 0 end object XHi: TSpinEdit - Left = 206 + AnchorSideLeft.Control = XLo + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = XLo + AnchorSideTop.Side = asrCenter + Left = 201 Height = 21 - Top = 0 - Width = 82 + Top = 4 + Width = 84 + BorderSpacing.Left = 4 + Constraints.MinWidth = 84 MaxValue = 1000 OnChange = PreviewClick TabOrder = 1 end object YLo: TSpinEdit - Left = 118 + AnchorSideLeft.Control = XLo + AnchorSideTop.Control = XLo + AnchorSideTop.Side = asrBottom + Left = 113 Height = 21 - Top = 40 - Width = 82 + Top = 29 + Width = 84 + BorderSpacing.Top = 4 + Constraints.MinWidth = 84 MaxValue = 1000 OnChange = PreviewClick TabOrder = 2 end object YHi: TSpinEdit - Left = 206 + AnchorSideLeft.Control = YLo + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = YLo + AnchorSideTop.Side = asrCenter + Left = 201 Height = 21 - Top = 40 - Width = 82 + Top = 29 + Width = 84 + BorderSpacing.Left = 4 + Constraints.MinWidth = 84 MaxValue = 1000 OnChange = PreviewClick TabOrder = 3 end object ZLo: TSpinEdit - Left = 118 + AnchorSideLeft.Control = XLo + AnchorSideTop.Control = YLo + AnchorSideTop.Side = asrBottom + Left = 113 Height = 21 - Top = 88 - Width = 82 + Top = 54 + Width = 84 + BorderSpacing.Top = 4 + Constraints.MinWidth = 84 MaxValue = 1000 OnChange = PreviewClick TabOrder = 4 end object ZHi: TSpinEdit - Left = 206 + AnchorSideLeft.Control = ZLo + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ZLo + AnchorSideTop.Side = asrCenter + Left = 201 Height = 21 - Top = 88 - Width = 82 + Top = 54 + Width = 84 + BorderSpacing.Left = 4 + Constraints.MinWidth = 84 MaxValue = 1000 OnChange = PreviewClick TabOrder = 5 end object CutoutBiasDrop: TComboBox - Left = 118 + AnchorSideLeft.Control = XLo + AnchorSideTop.Control = ZLo + AnchorSideTop.Side = asrBottom + Left = 113 Height = 19 - Top = 128 + Top = 79 Width = 170 + BorderSpacing.Top = 4 ItemHeight = 13 Items.Strings = ( '0.1 Dark' @@ -150,52 +211,89 @@ object CutoutForm: TCutoutForm OnChange = PreviewClick Style = csOwnerDrawFixed TabOrder = 6 + Text = '0' end object CutoutLUTDrop: TComboBox - Left = 118 + AnchorSideLeft.Control = CutoutBiasDrop + AnchorSideTop.Control = CutoutBiasDrop + AnchorSideTop.Side = asrBottom + Left = 113 Height = 19 - Top = 168 + Top = 102 Width = 170 + BorderSpacing.Top = 4 ItemHeight = 13 OnChange = PreviewClick Style = csOwnerDrawFixed TabOrder = 7 + Text = '0' end end object PreviewBtn: TButton - Left = 128 - Height = 25 - Top = 304 - Width = 75 - Caption = 'Preview' + AnchorSideTop.Control = OKBtn + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = PreviewBtn1 + Left = -36 + Height = 20 + Top = 181 + Width = 123 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Right = 4 + Caption = 'PreviewUnused' + Constraints.MinWidth = 72 OnClick = PreviewClick TabOrder = 2 Visible = False end object DefBtn: TButton - Left = 128 - Height = 25 - Top = 272 - Width = 75 + AnchorSideTop.Control = OKBtn + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = OKBtn + Left = 171 + Height = 20 + Top = 181 + Width = 79 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Right = 4 Caption = 'Defaults' + Constraints.MinWidth = 72 OnClick = DefBtnClick TabOrder = 3 end object OKBtn: TButton - Left = 237 - Height = 25 - Top = 272 - Width = 75 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = CutoutBox + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 254 + Height = 20 + Top = 181 + Width = 72 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 Caption = 'OK' + Constraints.MinWidth = 72 OnClick = OKBtnClick TabOrder = 4 end object PreviewBtn1: TButton - Left = 16 - Height = 25 - Top = 272 - Width = 75 + AnchorSideTop.Control = OKBtn + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = DefBtn + Left = 91 + Height = 20 + Top = 181 + Width = 76 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Right = 4 Caption = 'Preview' + Constraints.MinWidth = 72 OnClick = PreviewBtn1Click TabOrder = 1 end diff --git a/cutout.lrs b/cutout.lrs index 110c613..38c44b9 100755 --- a/cutout.lrs +++ b/cutout.lrs @@ -1,50 +1,95 @@ +{ This is an automatically generated lazarus resource file } + LazarusResources.Add('TCutoutForm','FORMDATA',[ - 'TPF0'#11'TCutoutForm'#10'CutoutForm'#4'Left'#3#128#1#6'Height'#3'N'#1#3'Top' - +#3#175#0#5'Width'#3'N'#1#18'HorzScrollBar.Page'#3'O'#1#18'VertScrollBar.Page' - +#3'<'#1#13'ActiveControl'#7#17'RenderCutoutCheck'#11'BorderIcons'#11#12'biSy' - +'stemMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7'Caption'#6#7'Cut' - +'outs'#12'ClientHeight'#3'N'#1#11'ClientWidth'#3'N'#1#21'Constraints.MaxHeig' - +'ht'#3'N'#1#20'Constraints.MaxWidth'#3'N'#1#21'Constraints.MinHeight'#3'N'#1 - +#20'Constraints.MinWidth'#3'N'#1#7'OnClose'#7#9'FormClose'#6'OnShow'#7#8'For' - +'mShow'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.29'#0#9'TChe' - +'ckBox'#17'RenderCutoutCheck'#4'Left'#2#16#6'Height'#2#17#3'Top'#2#8#5'Width' - +#2'P'#7'Caption'#6#11'Show cutout'#7'OnClick'#7#22'RenderCutoutCheckClick'#8 - +'TabOrder'#2#0#0#0#9'TGroupBox'#9'CutoutBox'#4'Left'#2#16#6'Height'#3#224#0#3 - +'Top'#2' '#5'Width'#3'0'#1#12'ClientHeight'#3#206#0#11'ClientWidth'#3','#1#8 - +'TabOrder'#2#5#0#6'TLabel'#6'Label1'#4'Left'#2#14#6'Height'#2#14#3'Top'#2#8#5 - +'Width'#2':'#7'Caption'#6#12'X [low=left]'#11'ParentColor'#8#0#0#6'TLabel'#6 - +'Label2'#4'Left'#2#14#6'Height'#2#14#3'Top'#2'0'#5'Width'#2'U'#7'Caption'#6 - +#17'Y [low=posterior]'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2#14 - +#6'Height'#2#14#3'Top'#2'X'#5'Width'#2'L'#7'Caption'#6#15'Z [low=ventral]'#11 - +'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#2#14#6'Height'#2#14#3'Top'#3 - +#135#0#5'Width'#2'7'#7'Caption'#6#11'Cutout Tint'#11'ParentColor'#8#0#0#6'TL' - +'abel'#6'Label5'#4'Left'#2#14#6'Height'#2#14#3'Top'#3#175#0#5'Width'#2'>'#7 - +'Caption'#6#12'Cutout Color'#11'ParentColor'#8#0#0#9'TSpinEdit'#3'XLo'#4'Lef' - +'t'#2'v'#6'Height'#2#21#3'Top'#2#0#5'Width'#2'R'#8'MaxValue'#3#232#3#8'OnCha' - +'nge'#7#12'PreviewClick'#8'TabOrder'#2#0#0#0#9'TSpinEdit'#3'XHi'#4'Left'#3 - +#206#0#6'Height'#2#21#3'Top'#2#0#5'Width'#2'R'#8'MaxValue'#3#232#3#8'OnChang' - +'e'#7#12'PreviewClick'#8'TabOrder'#2#1#0#0#9'TSpinEdit'#3'YLo'#4'Left'#2'v'#6 - +'Height'#2#21#3'Top'#2'('#5'Width'#2'R'#8'MaxValue'#3#232#3#8'OnChange'#7#12 - +'PreviewClick'#8'TabOrder'#2#2#0#0#9'TSpinEdit'#3'YHi'#4'Left'#3#206#0#6'Hei' - +'ght'#2#21#3'Top'#2'('#5'Width'#2'R'#8'MaxValue'#3#232#3#8'OnChange'#7#12'Pr' - +'eviewClick'#8'TabOrder'#2#3#0#0#9'TSpinEdit'#3'ZLo'#4'Left'#2'v'#6'Height'#2 - +#21#3'Top'#2'X'#5'Width'#2'R'#8'MaxValue'#3#232#3#8'OnChange'#7#12'PreviewCl' - +'ick'#8'TabOrder'#2#4#0#0#9'TSpinEdit'#3'ZHi'#4'Left'#3#206#0#6'Height'#2#21 - +#3'Top'#2'X'#5'Width'#2'R'#8'MaxValue'#3#232#3#8'OnChange'#7#12'PreviewClick' - +#8'TabOrder'#2#5#0#0#9'TComboBox'#14'CutoutBiasDrop'#4'Left'#2'v'#6'Height'#2 - +#19#3'Top'#3#128#0#5'Width'#3#170#0#10'ItemHeight'#2#13#13'Items.Strings'#1#6 - +#8'0.1 Dark'#6#3'0.2'#6#3'0.3'#6#3'0.4'#6#3'0.5'#6#3'0.6'#6#3'0.7'#6#3'0.8'#6 - +#9'0.9 Light'#0#8'OnChange'#7#12'PreviewClick'#5'Style'#7#16'csOwnerDrawFixe' - +'d'#8'TabOrder'#2#6#0#0#9'TComboBox'#13'CutoutLUTDrop'#4'Left'#2'v'#6'Height' - +#2#19#3'Top'#3#168#0#5'Width'#3#170#0#10'ItemHeight'#2#13#8'OnChange'#7#12'P' - +'reviewClick'#5'Style'#7#16'csOwnerDrawFixed'#8'TabOrder'#2#7#0#0#0#7'TButto' - +'n'#10'PreviewBtn'#4'Left'#3#128#0#6'Height'#2#25#3'Top'#3'0'#1#5'Width'#2'K' - +#7'Caption'#6#7'Preview'#7'OnClick'#7#12'PreviewClick'#8'TabOrder'#2#2#7'Vis' - +'ible'#8#0#0#7'TButton'#6'DefBtn'#4'Left'#3#128#0#6'Height'#2#25#3'Top'#3#16 - +#1#5'Width'#2'K'#7'Caption'#6#8'Defaults'#7'OnClick'#7#11'DefBtnClick'#8'Tab' - +'Order'#2#3#0#0#7'TButton'#5'OKBtn'#4'Left'#3#237#0#6'Height'#2#25#3'Top'#3 - +#16#1#5'Width'#2'K'#7'Caption'#6#2'OK'#7'OnClick'#7#10'OKBtnClick'#8'TabOrde' - +'r'#2#4#0#0#7'TButton'#11'PreviewBtn1'#4'Left'#2#16#6'Height'#2#25#3'Top'#3 - +#16#1#5'Width'#2'K'#7'Caption'#6#7'Preview'#7'OnClick'#7#16'PreviewBtn1Click' - +#8'TabOrder'#2#1#0#0#0 + 'TPF0'#11'TCutoutForm'#10'CutoutForm'#4'Left'#3#236#1#6'Height'#3'N'#1#3'Top' + +#3#173#0#5'Width'#3'N'#1#18'HorzScrollBar.Page'#3'O'#1#18'VertScrollBar.Page' + +#3'<'#1#13'ActiveControl'#7#17'RenderCutoutCheck'#8'AutoSize'#9#11'BorderIco' + +'ns'#11#12'biSystemMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#11'B' + +'orderWidth'#2#4#7'Caption'#6#7'Cutouts'#12'ClientHeight'#3'N'#1#11'ClientWi' + +'dth'#3'N'#1#7'OnClose'#7#9'FormClose'#6'OnShow'#7#8'FormShow'#8'Position'#7 + +#14'poScreenCenter'#10'LCLVersion'#6#7'2.1.0.0'#0#9'TCheckBox'#17'RenderCuto' + +'utCheck'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5 + +'Owner'#4'Left'#2#8#6'Height'#2#18#3'Top'#2#8#5'Width'#2']'#18'BorderSpacing' + +'.Left'#2#4#17'BorderSpacing.Top'#2#4#7'Caption'#6#11'Show cutout'#7'OnClick' + +#7#22'RenderCutoutCheckClick'#8'TabOrder'#2#0#0#0#9'TGroupBox'#9'CutoutBox' + +#22'AnchorSideLeft.Control'#7#17'RenderCutoutCheck'#21'AnchorSideTop.Control' + +#7#17'RenderCutoutCheck'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6 + +'Height'#3#147#0#3'Top'#2#30#5'Width'#3'-'#1#8'AutoSize'#9#17'BorderSpacing.' + +'Top'#2#4#25'BorderSpacing.InnerBorder'#2#4#12'ClientHeight'#3#129#0#11'Clie' + +'ntWidth'#3'%'#1#8'TabOrder'#2#5#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Con' + +'trol'#7#9'CutoutBox'#21'AnchorSideTop.Control'#7#3'XLo'#18'AnchorSideTop.Si' + +'de'#7#9'asrCenter'#4'Left'#2#4#6'Height'#2#16#3'Top'#2#6#5'Width'#2'F'#18'B' + +'orderSpacing.Left'#2#4#7'Caption'#6#12'X [low=left]'#11'ParentColor'#8#0#0#6 + +'TLabel'#6'Label2'#22'AnchorSideLeft.Control'#7#6'Label1'#21'AnchorSideTop.C' + +'ontrol'#7#3'YLo'#4'Left'#2#4#6'Height'#2#16#3'Top'#2#29#5'Width'#2'i'#7'Cap' + +'tion'#6#17'Y [low=posterior]'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#22 + +'AnchorSideLeft.Control'#7#6'Label1'#21'AnchorSideTop.Control'#7#3'ZLo'#18'A' + +'nchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#4#6'Height'#2#16#3'Top'#2'8'#5 + +'Width'#2'['#7'Caption'#6#15'Z [low=ventral]'#11'ParentColor'#8#0#0#6'TLabel' + +#6'Label4'#22'AnchorSideLeft.Control'#7#6'Label1'#21'AnchorSideTop.Control'#7 + +#14'CutoutBiasDrop'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#4#6'Heig' + +'ht'#2#16#3'Top'#2'P'#5'Width'#2'D'#7'Caption'#6#11'Cutout Tint'#11'ParentCo' + +'lor'#8#0#0#6'TLabel'#6'Label5'#22'AnchorSideLeft.Control'#7#6'Label1'#21'An' + +'chorSideTop.Control'#7#13'CutoutLUTDrop'#18'AnchorSideTop.Side'#7#9'asrCent' + +'er'#4'Left'#2#4#6'Height'#2#16#3'Top'#2'g'#5'Width'#2'M'#7'Caption'#6#12'Cu' + +'tout Color'#11'ParentColor'#8#0#0#9'TSpinEdit'#3'XLo'#22'AnchorSideLeft.Con' + +'trol'#7#6'Label2'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.C' + +'ontrol'#7#9'CutoutBox'#4'Left'#2'q'#6'Height'#2#21#3'Top'#2#4#5'Width'#2'T' + +#18'BorderSpacing.Left'#2#4#17'BorderSpacing.Top'#2#4#20'Constraints.MinWidt' + +'h'#2'T'#8'MaxValue'#3#232#3#8'OnChange'#7#12'PreviewClick'#8'TabOrder'#2#0#0 + +#0#9'TSpinEdit'#3'XHi'#22'AnchorSideLeft.Control'#7#3'XLo'#19'AnchorSideLeft' + +'.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#3'XLo'#18'AnchorSideTop.S' + +'ide'#7#9'asrCenter'#4'Left'#3#201#0#6'Height'#2#21#3'Top'#2#4#5'Width'#2'T' + +#18'BorderSpacing.Left'#2#4#20'Constraints.MinWidth'#2'T'#8'MaxValue'#3#232#3 + +#8'OnChange'#7#12'PreviewClick'#8'TabOrder'#2#1#0#0#9'TSpinEdit'#3'YLo'#22'A' + +'nchorSideLeft.Control'#7#3'XLo'#21'AnchorSideTop.Control'#7#3'XLo'#18'Ancho' + +'rSideTop.Side'#7#9'asrBottom'#4'Left'#2'q'#6'Height'#2#21#3'Top'#2#29#5'Wid' + +'th'#2'T'#17'BorderSpacing.Top'#2#4#20'Constraints.MinWidth'#2'T'#8'MaxValue' + +#3#232#3#8'OnChange'#7#12'PreviewClick'#8'TabOrder'#2#2#0#0#9'TSpinEdit'#3'Y' + +'Hi'#22'AnchorSideLeft.Control'#7#3'YLo'#19'AnchorSideLeft.Side'#7#9'asrBott' + +'om'#21'AnchorSideTop.Control'#7#3'YLo'#18'AnchorSideTop.Side'#7#9'asrCenter' + +#4'Left'#3#201#0#6'Height'#2#21#3'Top'#2#29#5'Width'#2'T'#18'BorderSpacing.L' + +'eft'#2#4#20'Constraints.MinWidth'#2'T'#8'MaxValue'#3#232#3#8'OnChange'#7#12 + +'PreviewClick'#8'TabOrder'#2#3#0#0#9'TSpinEdit'#3'ZLo'#22'AnchorSideLeft.Con' + +'trol'#7#3'XLo'#21'AnchorSideTop.Control'#7#3'YLo'#18'AnchorSideTop.Side'#7#9 + +'asrBottom'#4'Left'#2'q'#6'Height'#2#21#3'Top'#2'6'#5'Width'#2'T'#17'BorderS' + +'pacing.Top'#2#4#20'Constraints.MinWidth'#2'T'#8'MaxValue'#3#232#3#8'OnChang' + +'e'#7#12'PreviewClick'#8'TabOrder'#2#4#0#0#9'TSpinEdit'#3'ZHi'#22'AnchorSide' + +'Left.Control'#7#3'ZLo'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSide' + +'Top.Control'#7#3'ZLo'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#201#0 + +#6'Height'#2#21#3'Top'#2'6'#5'Width'#2'T'#18'BorderSpacing.Left'#2#4#20'Cons' + +'traints.MinWidth'#2'T'#8'MaxValue'#3#232#3#8'OnChange'#7#12'PreviewClick'#8 + +'TabOrder'#2#5#0#0#9'TComboBox'#14'CutoutBiasDrop'#22'AnchorSideLeft.Control' + +#7#3'XLo'#21'AnchorSideTop.Control'#7#3'ZLo'#18'AnchorSideTop.Side'#7#9'asrB' + +'ottom'#4'Left'#2'q'#6'Height'#2#19#3'Top'#2'O'#5'Width'#3#170#0#17'BorderSp' + +'acing.Top'#2#4#10'ItemHeight'#2#13#13'Items.Strings'#1#6#8'0.1 Dark'#6#3'0.' + +'2'#6#3'0.3'#6#3'0.4'#6#3'0.5'#6#3'0.6'#6#3'0.7'#6#3'0.8'#6#9'0.9 Light'#0#8 + +'OnChange'#7#12'PreviewClick'#5'Style'#7#16'csOwnerDrawFixed'#8'TabOrder'#2#6 + ,#4'Text'#6#1'0'#0#0#9'TComboBox'#13'CutoutLUTDrop'#22'AnchorSideLeft.Control' + +#7#14'CutoutBiasDrop'#21'AnchorSideTop.Control'#7#14'CutoutBiasDrop'#18'Anch' + +'orSideTop.Side'#7#9'asrBottom'#4'Left'#2'q'#6'Height'#2#19#3'Top'#2'f'#5'Wi' + +'dth'#3#170#0#17'BorderSpacing.Top'#2#4#10'ItemHeight'#2#13#8'OnChange'#7#12 + +'PreviewClick'#5'Style'#7#16'csOwnerDrawFixed'#8'TabOrder'#2#7#4'Text'#6#1'0' + +#0#0#0#7'TButton'#10'PreviewBtn'#21'AnchorSideTop.Control'#7#5'OKBtn'#18'Anc' + +'horSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#11'PreviewBtn' + +'1'#4'Left'#2#220#6'Height'#2#20#3'Top'#3#181#0#5'Width'#2'{'#7'Anchors'#11#5 + +'akTop'#7'akRight'#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#4#7'Caption'#6 + +#13'PreviewUnused'#20'Constraints.MinWidth'#2'H'#7'OnClick'#7#12'PreviewClic' + +'k'#8'TabOrder'#2#2#7'Visible'#8#0#0#7'TButton'#6'DefBtn'#21'AnchorSideTop.C' + +'ontrol'#7#5'OKBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight' + +'.Control'#7#5'OKBtn'#4'Left'#3#171#0#6'Height'#2#20#3'Top'#3#181#0#5'Width' + +#2'O'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#19'BorderSpacing.Rig' + +'ht'#2#4#7'Caption'#6#8'Defaults'#20'Constraints.MinWidth'#2'H'#7'OnClick'#7 + +#11'DefBtnClick'#8'TabOrder'#2#3#0#0#7'TButton'#5'OKBtn'#22'AnchorSideLeft.C' + +'ontrol'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'CutoutBox'#18'AnchorSideTo' + +'p.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSide' + +'Right.Side'#7#9'asrBottom'#4'Left'#3#254#0#6'Height'#2#20#3'Top'#3#181#0#5 + +'Width'#2'H'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#17'BorderSpac' + +'ing.Top'#2#4#19'BorderSpacing.Right'#2#4#7'Caption'#6#2'OK'#20'Constraints.' + +'MinWidth'#2'H'#7'OnClick'#7#10'OKBtnClick'#8'TabOrder'#2#4#0#0#7'TButton'#11 + +'PreviewBtn1'#21'AnchorSideTop.Control'#7#5'OKBtn'#18'AnchorSideTop.Side'#7#9 + +'asrCenter'#23'AnchorSideRight.Control'#7#6'DefBtn'#4'Left'#2'['#6'Height'#2 + +#20#3'Top'#3#181#0#5'Width'#2'L'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoS' + +'ize'#9#19'BorderSpacing.Right'#2#4#7'Caption'#6#7'Preview'#20'Constraints.M' + +'inWidth'#2'H'#7'OnClick'#7#16'PreviewBtn1Click'#8'TabOrder'#2#1#0#0#0 ]); diff --git a/dcm2nii.lfm b/dcm2nii.lfm index 03edf46..510d8f8 100755 --- a/dcm2nii.lfm +++ b/dcm2nii.lfm @@ -1,15 +1,14 @@ object dcm2niiForm: Tdcm2niiForm - Left = 503 - Height = 1200 - Top = 192 - Width = 1950 + Left = 385 + Height = 352 + Top = 165 + Width = 772 AllowDropFiles = True Caption = 'dcm2niix' - ClientHeight = 1151 - ClientWidth = 1950 - Constraints.MinHeight = 300 - Constraints.MinWidth = 1600 - DesignTimePPI = 240 + ClientHeight = 352 + ClientWidth = 772 + Constraints.MinHeight = 120 + Constraints.MinWidth = 640 Menu = MainMenu1 OnClose = FormClose OnCreate = FormCreate @@ -17,22 +16,29 @@ object dcm2niiForm: Tdcm2niiForm OnResize = FormResize OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.9.0.0' + LCLVersion = '2.1.0.0' object Panel1: TPanel Left = 0 - Height = 85 + Height = 31 Top = 0 - Width = 1950 + Width = 772 Align = alTop - ClientHeight = 85 - ClientWidth = 1950 + AutoSize = True + BorderWidth = 2 + ClientHeight = 31 + ClientWidth = 772 ParentFont = False TabOrder = 0 object compressCheck: TCheckBox - Left = 185 - Height = 45 - Top = 22 - Width = 46 + AnchorSideLeft.Control = Label2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 70 + Height = 18 + Top = 6 + Width = 22 + BorderSpacing.Left = 2 Checked = True OnClick = compressCheckClick ParentFont = False @@ -41,10 +47,15 @@ object dcm2niiForm: Tdcm2niiForm TabOrder = 0 end object outnameLabel: TLabel - Left = 580 - Height = 41 - Top = 25 - Width = 182 + AnchorSideLeft.Control = bidsCheck + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 231 + Height = 16 + Top = 7 + Width = 81 + BorderSpacing.Left = 4 Caption = 'Output Name' ParentColor = False ParentFont = False @@ -52,11 +63,16 @@ object dcm2niiForm: Tdcm2niiForm ShowHint = True end object outnameEdit: TEdit - Left = 800 - Height = 49 + AnchorSideLeft.Control = outnameLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 314 + Height = 21 Hint = 'Name for NIfTI images. Special characters are %f (Folder name) %i (ID) %n (patient Name) %p (Protocol name) %s (Series number) %t (Time)' - Top = 15 - Width = 440 + Top = 5 + Width = 176 + BorderSpacing.Left = 2 OnKeyUp = outnameEditKeyUp ParentFont = False ParentShowHint = False @@ -65,11 +81,15 @@ object dcm2niiForm: Tdcm2niiForm Text = 'outnameEdit' end object Label2: TLabel - Left = 10 - Height = 41 + AnchorSideLeft.Control = Panel1 + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 7 + Height = 16 Hint = 'Set whether NIfTI images are compressed (.nii.gz) or not (.nii)' - Top = 25 - Width = 133 + Top = 7 + Width = 61 + BorderSpacing.Left = 4 Caption = 'Compress' ParentColor = False ParentFont = False @@ -77,20 +97,30 @@ object dcm2niiForm: Tdcm2niiForm ShowHint = True end object outputFolderLabel: TLabel - Left = 1260 - Height = 41 - Top = 25 - Width = 181 + AnchorSideLeft.Control = outnameEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 494 + Height = 16 + Top = 7 + Width = 81 + BorderSpacing.Left = 4 Caption = 'Output folder' ParentColor = False ParentFont = False end object outputFolderName: TButton - Left = 1500 - Height = 62 + AnchorSideLeft.Control = outputFolderLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 577 + Height = 25 Hint = 'NIfTI files will be saved to this folder. Press this button and click Cancel if you want files NIfTI images saved to same folder as DICOM input' - Top = 12 - Width = 450 + Top = 3 + Width = 180 + BorderSpacing.Left = 2 Caption = 'input folder' OnClick = outputFolderNameClick ParentFont = False @@ -99,11 +129,16 @@ object dcm2niiForm: Tdcm2niiForm TabOrder = 2 end object VerboseLabel: TLabel - Left = 240 - Height = 41 + AnchorSideLeft.Control = compressCheck + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 96 + Height = 16 Hint = 'Set whether NIfTI images are compressed (.nii.gz) or not (.nii)' - Top = 25 - Width = 108 + Top = 7 + Width = 50 + BorderSpacing.Left = 4 Caption = 'Verbose' ParentColor = False ParentFont = False @@ -111,10 +146,15 @@ object dcm2niiForm: Tdcm2niiForm ShowHint = True end object verboseCheck: TCheckBox - Left = 380 - Height = 45 - Top = 22 - Width = 46 + AnchorSideLeft.Control = VerboseLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 148 + Height = 18 + Top = 6 + Width = 22 + BorderSpacing.Left = 2 Checked = True OnClick = compressCheckClick ParentFont = False @@ -123,21 +163,31 @@ object dcm2niiForm: Tdcm2niiForm TabOrder = 3 end object bidsCheck: TCheckBox - Left = 525 - Height = 45 - Top = 20 - Width = 46 + AnchorSideLeft.Control = BIDSLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 205 + Height = 18 + Top = 6 + Width = 22 + BorderSpacing.Left = 2 OnClick = compressCheckClick ParentFont = False ParentBidiMode = False TabOrder = 4 end - object VerboseLabel1: TLabel - Left = 440 - Height = 41 + object BIDSLabel: TLabel + AnchorSideLeft.Control = verboseCheck + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 174 + Height = 16 Hint = 'Create Brain Imaging Data Structure file' - Top = 25 - Width = 62 + Top = 7 + Width = 29 + BorderSpacing.Left = 4 Caption = 'BIDS' ParentColor = False ParentFont = False @@ -147,17 +197,18 @@ object dcm2niiForm: Tdcm2niiForm end object Memo1: TMemo Left = 0 - Height = 1066 - Top = 85 - Width = 1950 + Height = 321 + Top = 31 + Width = 772 Align = alClient + Lines.Strings = ( ) ParentFont = False ScrollBars = ssAutoVertical TabOrder = 1 end object MainMenu1: TMainMenu - left = 60 - top = 120 + left = 24 + top = 48 object FileMenu: TMenuItem Caption = 'File' object DicomMenu: TMenuItem @@ -184,7 +235,7 @@ object dcm2niiForm: Tdcm2niiForm object OpenDialog1: TOpenDialog Filter = 'Philips research (*.par)|*.PAR;*.par' Options = [ofAllowMultiSelect, ofEnableSizing, ofViewDetail] - left = 240 - top = 120 + left = 96 + top = 48 end end diff --git a/dcm2nii.pas b/dcm2nii.pas index f79b493..9135d79 100755 --- a/dcm2nii.pas +++ b/dcm2nii.pas @@ -39,9 +39,9 @@ Tdcm2niiForm = class(TForm) VerboseCheck: TCheckBox; //bidsCheck: TCheckBox; VerboseLabel: TLabel; - VerboseLabel1: TLabel; + BIDSLabel: TLabel; bidsCheck: TCheckBox; - //VerboseLabel1: TLabel; + //BIDSLabel: TLabel; //verboseCheck: TCheckBox; //VerboseLabel: TLabel; procedure compressCheckClick(Sender: TObject); @@ -63,6 +63,7 @@ Tdcm2niiForm = class(TForm) function getExeName : string; //return path for command line tool procedure readIni (ForceReset: boolean); //load preferences procedure writeIni; //save preferences + function FindDicom2niixPath(const Executable: string): string; // procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES; private { private declarations } @@ -95,23 +96,32 @@ implementation isAppDoneInitializing : boolean = false; {$IFDEF FPC} -function FindDefaultExecutablePathX(const Executable: string): string; +function Tdcm2niiForm.FindDicom2niixPath(const Executable: string): string; +//function FindDicom2niixPath(const Executable: string): string; +var + s: string; begin {$IFDEF Darwin} result := AppDir + kExeName; if fileexists(result) then exit; {$ENDIF} result := FindDefaultExecutablePath(kExeName); + if result = '' then + result := FindDefaultExecutablePath(ExtractFilePath(paramstr(0))+'Resources'+pathdelim+kExeName); if result = '' then result := FindDefaultExecutablePath(ExtractFilePath (paramstr(0)) +kExeName); if result = '' then result := FindDefaultExecutablePath(kExeName); + {$IFDEF Unix} + if (result = '') and (fileexists('/usr/local/bin/'+kExeName)) then + result := '/usr/local/bin/'+kExeName; + {$ENDIF} //Env:=GetEnvironmentVariableUTF8('PATH'); //if result = '' then // showmessage('mango:'+GetEnvironmentVariableUTF8('HOME')); end; {$ELSE} -function FindDefaultExecutablePathX(const Executable: string): string; +function Tdcm2niiForm.FindDicom2niixPath(const Executable: string): string; begin result := extractfilepath(paramstr(0))+kExeName+'.exe'; end; @@ -121,7 +131,7 @@ function Tdcm2niiForm.getExeName : string; var lF: string; begin - result := FindDefaultExecutablePathX(kExeName); + result := FindDicom2niixPath(kExeName); if not fileexists(result) then begin lF := ExtractFilePath (paramstr(0)); result := lF+kExeName; diff --git a/dcm_load.pas b/dcm_load.pas new file mode 100755 index 0000000..1d05c57 --- /dev/null +++ b/dcm_load.pas @@ -0,0 +1,289 @@ +unit dcm_load; + +{$mode objfpc}{$H+} + +interface + +uses + {$IFNDEF UNIX} Windows, shlobj, {$ENDIF} + ClipBrd, ExtCtrls, StdCtrls, Forms, Controls, Classes, SysUtils, dialogs, Process; + + +function dcm2Nifti(dcm2niixExe, dicomDir: string): string; + +implementation + +{$ifdef LCLCocoa} +//uses mainunit; //darkmode +{$ENDIF} + +function seriesNum (s: string): single; //"601 myName" returns 601 +begin + result := StrToFloatDef(Copy(s, 1, pos(' ',s)-1),-1); +end; + +function seriesName (s: string): string; //"601 myName" returns 'myName' +var + delimPos: integer; +begin + delimPos := pos(' ',s); + if (delimPos < 1) or (delimPos >= length(s)) then exit; + result := Copy(s, delimPos+1, maxInt); +end; + +function compareSeries(List: TStringList; Index1, Index2: Integer): Integer; +var + n1, n2: single; +begin + n1 := seriesNum(List[Index1]); + n2 := seriesNum(List[Index2]); + if (n1 >= n2) then + result := 1 + else + result := -1; + //result := n1 - n2; +end; + +function dcmStr(s: string): string; +var + sl: TStringList; +begin + result := ''; + if (length(s) < 1) or (s[1] <> chr(9)) then exit; + sl := TStringList.Create; + sl.Delimiter := #9; //TAB + sl.DelimitedText := s; + if sl.Count >= 2 then begin + result := sl[0]+' '+extractfilename(sl[1]) ; + end else + result := ''; + sl.Free; +end; + + +function dcmList(dcm2niixExe, dicomDir: string): TStringList; +//make sure to free result! +//strList := dcmList(); strList.free; +var + hprocess: TProcess; + sData: TStringList; + s: string; + x: integer; +Begin + result := Tstringlist.Create; + if dcm2niixExe = '' then exit; + hProcess := TProcess.Create(nil); + hProcess.Executable := dcm2niixExe; + //hprocess.Parameters.Add('-d'); + //hprocess.Parameters.Add('1'); + hprocess.Parameters.Add('-n'); + hprocess.Parameters.Add('-1'); + hprocess.Parameters.Add('-f'); + hprocess.Parameters.Add('%p_%t'); + hprocess.Parameters.Add(dicomDir); + hProcess.Options := hProcess.Options + [poWaitOnExit, poUsePipes]; + hProcess.Execute; + sData := Tstringlist.Create; + sData.LoadFromStream(hProcess.Output); + for x := 0 to sData.Count -1 do begin + s := dcmStr(sData[x]); + if (s <> '') then + result.Add(s); + end; + //next: sort (optional) + sData.Clear; + sData.AddStrings(result); + sData.CustomSort(@compareSeries); + result.Clear; + result.AddStrings(sData); + //ClipBoard.AsText:=(sData.Text); + //release data + sData.Free; + hProcess.Free; +end; + + +function HomeDir: string; //set path to home if not provided +{$IFDEF UNIX} +begin + result := '/tmp/'; + if fileexists(result) then exit; + result := expandfilename('~/'); +end; +{$ELSE} +var + SpecialPath: PWideChar; +begin + Result := ''; + SpecialPath := WideStrAlloc(MAX_PATH); + try + FillChar(SpecialPath^, MAX_PATH, 0); + if SHGetSpecialFolderPathW(0, SpecialPath, CSIDL_PERSONAL, False) then + Result := SpecialPath+pathdelim; + finally + StrDispose(SpecialPath); + end; +end; +{$ENDIF} + +function dcmSeriesSelectForm(dcm2niixExe, dicomDir: string): string; +const + kMaxItems = 16; +var + PrefForm: TForm; + rg: TRadioGroup; + dcmStrings: TStringlist; + OKBtn, CancelBtn: TButton; + w,h: integer; +label + 123; +begin + result := ''; + dcmStrings := dcmList(dcm2niixExe, dicomDir); + if dcmStrings.Count < 1 then goto 123; //no files + if dcmStrings.Count = 1 then begin + result := dcmStrings[0];//seriesNum(dcmStrings[0]); + goto 123; + end; + PrefForm:=TForm.Create(nil); + PrefForm.SetBounds(100, 100, 520, 212); + //PrefForm.Caption:='DICOM Loading '+dcm2niixExe; + PrefForm.Caption:='Save converted images to '+HomeDir; + PrefForm.Position := poScreenCenter; + PrefForm.BorderStyle := bsDialog; + PrefForm.BorderWidth:= 4; + {$IFNDEF FPC}PrefForm.AutoSize := true;{$ENDIF} + //radio group + rg := TRadioGroup.create(PrefForm); + rg.align := alTop; + rg.AutoSize:=false; + rg.parent := PrefForm; + rg.caption := 'Select DICOM Series'; + if dcmStrings.Count > (kMaxItems) then begin + rg.caption := rg.caption + ' (Partial Listing)'; + while (dcmStrings.Count > kMaxItems) do + dcmStrings.Delete(dcmStrings.Count-1); + end; + rg.items := dcmStrings; + rg.BorderSpacing.Around := 8; + rg.BorderWidth:=4; + rg.AutoSize := true; + rg.HandleNeeded; + rg.GetPreferredSize(w, h); + rg.AutoSize := false; + rg.Align := alTop; + rg.Height := h; + rg.ItemIndex:=0; + //OK button + OkBtn:=TButton.create(PrefForm); + OkBtn.Caption:='OK'; + OkBtn.AutoSize := true; + //OkBtn.Left := PrefForm.Width - 128; + //OkBtn.Width:= 100; + //OkBtn.Top := rg.Height+rg.Top+4; + OkBtn.AnchorSideTop.Control := rg; + OkBtn.AnchorSideTop.Side := asrBottom; + OkBtn.AnchorSideRight.Control := PrefForm; + OkBtn.AnchorSideRight.Side := asrBottom; + OkBtn.BorderSpacing.Right := 4; + OkBtn.Anchors := [akTop, akRight]; + OkBtn.Parent:=PrefForm; + OkBtn.ModalResult:= mrOK; + //Cancel button + CancelBtn:=TButton.create(PrefForm); + CancelBtn.AutoSize := true; + CancelBtn.Caption:='Cancel'; + //CancelBtn.Left := 28; + //CancelBtn.Width:= 100; + //CancelBtn.Top := rg.Height+rg.Top+4; + CancelBtn.AnchorSideTop.Control := OkBtn; + CancelBtn.AnchorSideTop.Side := asrCenter; + CancelBtn.AnchorSideRight.Control := OkBtn; + CancelBtn.BorderSpacing.Right := 4; + CancelBtn.Anchors := [akTop, akRight]; + CancelBtn.Parent:=PrefForm; + CancelBtn.ModalResult:= mrCancel; + PrefForm.AutoSize:= true; + //PrefForm.Height:= OkBtn.Top + OkBtn.Height+4; + //{$IFDEF LCLCocoa}GLForm1.SetFormDarkMode(PrefForm); {$ENDIF} + PrefForm.ShowModal; + result := rg.Items[rg.ItemIndex];//seriesNum(rg.Items[rg.ItemIndex]); + if PrefForm.ModalResult = mrCancel then + result := ''; + FreeAndNil(PrefForm); + 123: //cleanup + dcmStrings.Free; +end; // PrefMenuClick() + +function findNiiFile(baseName: string): string; +//if baseName '~/d/img.nii' does not exist but '~/d/img_e1.nii' does +var + searchResult : tsearchrec; +begin + result := basename; + if FindFirst(changefileext(baseName, '*.nii'), faAnyFile, searchResult) = 0 then begin + result := ExtractFilePath(basename) + searchResult.Name; + FindClose(searchResult); + end; +end; + +function dcm2niiSeries(dcm2niixExe, dicomDir, series_name: string): string; +const + kdcmLoadTempStr = 'MRIcroGLTemp_'; +var + hprocess: TProcess; + series: single; + //isTemp: boolean = false; +Begin + result := ''; + //showmessage(dcm2niixExe+'>'+dicomDir+' >> '+ HomeDir); + if dcm2niixExe = '' then exit; + series := seriesNum(series_name); + if series < 1 then exit; + result := seriesName(series_name); + if result = '' then exit; + result := HomeDir+ result+'.nii'; + {$IFDEF UNIX} + if HomeDir = '/tmp/' then + //ignore + else + {$ENDIF} + if (fileexists(result)) then begin //if we do over-write, make sure temp in filename + if MessageDlg('Overwrite image '+result+'?',mtInformation,[mbAbort, mbOK],0) = mrAbort then + exit; + end; + hProcess := TProcess.Create(nil); + hProcess.Executable := dcm2niixExe; + hprocess.Parameters.Add('-n'); + hprocess.Parameters.Add(format('%g', [series])); + hprocess.Parameters.Add('-f'); + //if isTemp then + // hprocess.Parameters.Add(kdcmLoadTempStr+'%p_%t') + //else + hprocess.Parameters.Add('%p_%t'); + hprocess.Parameters.Add('-b'); + hprocess.Parameters.Add('n'); + hprocess.Parameters.Add('-z'); + hprocess.Parameters.Add('n'); + hprocess.Parameters.Add('-o'); + hprocess.Parameters.Add(HomeDir); + hprocess.Parameters.Add(dicomDir); + hProcess.Options := hProcess.Options + [poWaitOnExit, poUsePipes]; + hProcess.Execute; + hProcess.Free; + if fileexists(result) then exit; + result := findNiiFile(result); //error handling for multiple echo or coil images +end; + +function dcm2Nifti(dcm2niixExe, dicomDir: string): string; +begin + result := ''; + if dcm2niixExe = '' then exit; + result := dcmSeriesSelectForm(dcm2niixExe, dicomDir); + if result = '' then exit; + result := dcm2niiSeries(dcm2niixExe, dicomDir, result); + //showmessage(dicomDir); +end; + +end. + diff --git a/graphx.lfm b/graphx.lfm index 86cf1c2..10f8004 100755 --- a/graphx.lfm +++ b/graphx.lfm @@ -1,7 +1,7 @@ object Graph4DForm: TGraph4DForm - Left = 345 + Left = 233 Height = 429 - Top = 123 + Top = 287 Width = 1097 ActiveControl = TREdit Caption = '4D Timeline Viewer' @@ -14,73 +14,102 @@ object Graph4DForm: TGraph4DForm OnResize = FormResize OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.9.0.0' + LCLVersion = '2.1.0.0' object Image1: TImage Left = 0 - Height = 375 - Top = 36 + Height = 371 + Top = 40 Width = 1097 Align = alClient end object FourDBar: TPanel Left = 0 - Height = 36 + Height = 40 Top = 0 Width = 1097 Align = alTop + AutoSize = True BevelOuter = bvNone - ClientHeight = 36 + ClientHeight = 40 ClientWidth = 1097 TabOrder = 0 object OpenDataBtn: TSpeedButton - Left = 11 + AnchorSideLeft.Control = FourDBar + AnchorSideTop.Control = RefreshToolbar + AnchorSideTop.Side = asrCenter + Left = 4 Height = 25 - Top = 7 + Top = 6 Width = 95 + BorderSpacing.Left = 4 Caption = 'Open Data' OnClick = OpenDataClick end object TRLabel: TLabel - Left = 152 + AnchorSideLeft.Control = RefreshToolbar + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RefreshToolbar + AnchorSideTop.Side = asrCenter + Left = 149 Height = 16 - Top = 15 + Top = 10 Width = 51 + BorderSpacing.Left = 4 Caption = 'TR (sec)' ParentColor = False end object PlotBtn: TSpeedButton - Left = 488 + AnchorSideLeft.Control = HSpeedDrop + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RefreshToolbar + AnchorSideTop.Side = asrCenter + Left = 418 Height = 25 - Top = 7 + Top = 6 Width = 63 + BorderSpacing.Left = 6 Caption = 'Plot' OnClick = PSPlotClick end object TextBtn: TSpeedButton - Left = 560 + AnchorSideLeft.Control = PlotBtn + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RefreshToolbar + AnchorSideTop.Side = asrCenter + Left = 487 Height = 25 - Top = 7 + Top = 6 Width = 80 + BorderSpacing.Left = 6 Caption = 'Text' OnClick = PSTextClick end object TREdit: TFloatSpinEdit - Left = 240 + AnchorSideLeft.Control = TRLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RefreshToolbar + AnchorSideTop.Side = asrCenter + Left = 204 Height = 21 - Top = 9 + Top = 8 Width = 82 + BorderSpacing.Left = 4 DecimalPlaces = 4 - Increment = 1 MaxValue = 100000000 MinValue = 0 TabOrder = 0 Value = 0 end object HSpeedDrop: TComboBox - Left = 352 - Height = 26 - Top = 5 + AnchorSideLeft.Control = TREdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RefreshToolbar + AnchorSideTop.Side = asrCenter + Left = 292 + Height = 20 + Top = 8 Width = 120 + BorderSpacing.Left = 6 ItemHeight = 26 Items.Strings = ( 'To Fit' @@ -101,45 +130,60 @@ object Graph4DForm: TGraph4DForm Text = '0' end object MinEdit: TFloatSpinEdit - Left = 656 + AnchorSideLeft.Control = TextBtn + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RefreshToolbar + AnchorSideTop.Side = asrCenter + Left = 573 Height = 21 - Top = 6 + Top = 8 Width = 82 + BorderSpacing.Left = 6 DecimalPlaces = 4 - Increment = 1 MaxValue = 100000 MinValue = 0 TabOrder = 2 Value = 0 end object MaxEdit: TFloatSpinEdit - Left = 768 + AnchorSideLeft.Control = MinEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RefreshToolbar + AnchorSideTop.Side = asrCenter + Left = 659 Height = 21 - Top = 6 + Top = 8 Width = 82 + BorderSpacing.Left = 4 DecimalPlaces = 4 - Increment = 1 MaxValue = 100000 MinValue = 0 TabOrder = 3 Value = 0 end object TrackBar1: TTrackBar - Left = 864 + AnchorSideLeft.Control = MaxEdit + AnchorSideLeft.Side = asrBottom + Left = 747 Height = 38 Top = 2 Width = 204 OnChange = TrackBar1Change Position = 0 + BorderSpacing.Left = 6 TabOrder = 4 Visible = False end object RefreshToolbar: TToolBar - Left = 108 + AnchorSideLeft.Control = OpenDataBtn + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = FourDBar + Left = 103 Height = 36 Top = 0 Width = 42 Align = alNone + BorderSpacing.Left = 4 ButtonHeight = 32 ButtonWidth = 32 Caption = 'RefreshToolbar' @@ -215,6 +259,7 @@ object Graph4DForm: TGraph4DForm end end object SelectDirectoryDialog1: TSelectDirectoryDialog - left = 184 + left = 96 + top = 48 end end diff --git a/graphx.lrs b/graphx.lrs index 721c405..d44d569 100755 --- a/graphx.lrs +++ b/graphx.lrs @@ -1,49 +1,71 @@ { This is an automatically generated lazarus resource file } LazarusResources.Add('TGraph4DForm','FORMDATA',[ - 'TPF0'#12'TGraph4DForm'#11'Graph4DForm'#4'Left'#3'Y'#1#6'Height'#3#173#1#3'To' - +'p'#2'{'#5'Width'#3'I'#4#13'ActiveControl'#7#6'TREdit'#7'Caption'#6#18'4D Ti' - +'meline Viewer'#12'ClientHeight'#3#173#1#11'ClientWidth'#3'I'#4#4'Menu'#7#9 - +'MainMenu1'#7'OnClose'#7#9'FormClose'#8'OnCreate'#7#10'FormCreate'#6'OnHide' - +#7#8'FormHide'#8'OnResize'#7#10'FormResize'#6'OnShow'#7#8'FormShow'#8'Positi' - +'on'#7#14'poScreenCenter'#10'LCLVersion'#6#7'1.9.0.0'#0#6'TImage'#6'Image1'#4 - +'Left'#2#0#6'Height'#3'w'#1#3'Top'#2'$'#5'Width'#3'I'#4#5'Align'#7#8'alClien' - +'t'#0#0#6'TPanel'#8'FourDBar'#4'Left'#2#0#6'Height'#2'$'#3'Top'#2#0#5'Width' - +#3'I'#4#5'Align'#7#5'alTop'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2'$' - +#11'ClientWidth'#3'I'#4#8'TabOrder'#2#0#0#12'TSpeedButton'#11'OpenDataBtn'#4 - +'Left'#2#11#6'Height'#2#25#3'Top'#2#7#5'Width'#2'_'#7'Caption'#6#9'Open Data' - +#7'OnClick'#7#13'OpenDataClick'#0#0#6'TLabel'#7'TRLabel'#4'Left'#3#152#0#6'H' - +'eight'#2#16#3'Top'#2#15#5'Width'#2'3'#7'Caption'#6#8'TR (sec)'#11'ParentCol' - +'or'#8#0#0#12'TSpeedButton'#7'PlotBtn'#4'Left'#3#232#1#6'Height'#2#25#3'Top' - +#2#7#5'Width'#2'?'#7'Caption'#6#4'Plot'#7'OnClick'#7#11'PSPlotClick'#0#0#12 - +'TSpeedButton'#7'TextBtn'#4'Left'#3'0'#2#6'Height'#2#25#3'Top'#2#7#5'Width'#2 - +'P'#7'Caption'#6#4'Text'#7'OnClick'#7#11'PSTextClick'#0#0#14'TFloatSpinEdit' - +#6'TREdit'#4'Left'#3#240#0#6'Height'#2#21#3'Top'#2#9#5'Width'#2'R'#13'Decima' - +'lPlaces'#2#4#9'Increment'#5#0#0#0#0#0#0#0#128#255'?'#8'MaxValue'#5#0#0#0#0#0 + 'TPF0'#12'TGraph4DForm'#11'Graph4DForm'#4'Left'#3#233#0#6'Height'#3#173#1#3'T' + +'op'#3#31#1#5'Width'#3'I'#4#13'ActiveControl'#7#6'TREdit'#7'Caption'#6#18'4D' + +' Timeline Viewer'#12'ClientHeight'#3#173#1#11'ClientWidth'#3'I'#4#4'Menu'#7 + +#9'MainMenu1'#7'OnClose'#7#9'FormClose'#8'OnCreate'#7#10'FormCreate'#6'OnHid' + +'e'#7#8'FormHide'#8'OnResize'#7#10'FormResize'#6'OnShow'#7#8'FormShow'#8'Pos' + +'ition'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.1.0.0'#0#6'TImage'#6'Image' + +'1'#4'Left'#2#0#6'Height'#3's'#1#3'Top'#2'('#5'Width'#3'I'#4#5'Align'#7#8'al' + +'Client'#0#0#6'TPanel'#8'FourDBar'#4'Left'#2#0#6'Height'#2'('#3'Top'#2#0#5'W' + +'idth'#3'I'#4#5'Align'#7#5'alTop'#8'AutoSize'#9#10'BevelOuter'#7#6'bvNone'#12 + +'ClientHeight'#2'('#11'ClientWidth'#3'I'#4#8'TabOrder'#2#0#0#12'TSpeedButton' + +#11'OpenDataBtn'#22'AnchorSideLeft.Control'#7#8'FourDBar'#21'AnchorSideTop.C' + +'ontrol'#7#14'RefreshToolbar'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2 + +#4#6'Height'#2#25#3'Top'#2#6#5'Width'#2'_'#18'BorderSpacing.Left'#2#4#7'Capt' + +'ion'#6#9'Open Data'#7'OnClick'#7#13'OpenDataClick'#0#0#6'TLabel'#7'TRLabel' + +#22'AnchorSideLeft.Control'#7#14'RefreshToolbar'#19'AnchorSideLeft.Side'#7#9 + +'asrBottom'#21'AnchorSideTop.Control'#7#14'RefreshToolbar'#18'AnchorSideTop.' + +'Side'#7#9'asrCenter'#4'Left'#3#149#0#6'Height'#2#16#3'Top'#2#10#5'Width'#2 + +'3'#18'BorderSpacing.Left'#2#4#7'Caption'#6#8'TR (sec)'#11'ParentColor'#8#0#0 + +#12'TSpeedButton'#7'PlotBtn'#22'AnchorSideLeft.Control'#7#10'HSpeedDrop'#19 + +'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#14'RefreshT' + +'oolbar'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#162#1#6'Height'#2#25 + +#3'Top'#2#6#5'Width'#2'?'#18'BorderSpacing.Left'#2#6#7'Caption'#6#4'Plot'#7 + +'OnClick'#7#11'PSPlotClick'#0#0#12'TSpeedButton'#7'TextBtn'#22'AnchorSideLef' + +'t.Control'#7#7'PlotBtn'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSid' + +'eTop.Control'#7#14'RefreshToolbar'#18'AnchorSideTop.Side'#7#9'asrCenter'#4 + +'Left'#3#231#1#6'Height'#2#25#3'Top'#2#6#5'Width'#2'P'#18'BorderSpacing.Left' + +#2#6#7'Caption'#6#4'Text'#7'OnClick'#7#11'PSTextClick'#0#0#14'TFloatSpinEdit' + +#6'TREdit'#22'AnchorSideLeft.Control'#7#7'TRLabel'#19'AnchorSideLeft.Side'#7 + +#9'asrBottom'#21'AnchorSideTop.Control'#7#14'RefreshToolbar'#18'AnchorSideTo' + +'p.Side'#7#9'asrCenter'#4'Left'#3#204#0#6'Height'#2#21#3'Top'#2#8#5'Width'#2 + +'R'#18'BorderSpacing.Left'#2#4#13'DecimalPlaces'#2#4#8'MaxValue'#5#0#0#0#0#0 +' '#188#190#25'@'#8'MinValue'#5#0#0#0#0#0#0#0#0#0#0#8'TabOrder'#2#0#5'Value' - +#5#0#0#0#0#0#0#0#0#0#0#0#0#9'TComboBox'#10'HSpeedDrop'#4'Left'#3'`'#1#6'Heig' - +'ht'#2#26#3'Top'#2#5#5'Width'#2'x'#10'ItemHeight'#2#26#13'Items.Strings'#1#6 - +#6'To Fit'#6#2'x1'#6#2'x2'#6#2'x3'#6#2'x4'#6#2'x5'#6#2'x6'#6#2'x7'#6#2'x8'#6 - +#2'x9'#6#3'x10'#0#8'OnChange'#7#15'TrackBar1Change'#5'Style'#7#14'csDropDown' - +'List'#8'TabOrder'#2#1#4'Text'#6#1'0'#0#0#14'TFloatSpinEdit'#7'MinEdit'#4'Le' - +'ft'#3#144#2#6'Height'#2#21#3'Top'#2#6#5'Width'#2'R'#13'DecimalPlaces'#2#4#9 - +'Increment'#5#0#0#0#0#0#0#0#128#255'?'#8'MaxValue'#5#0#0#0#0#0#0'P'#195#15'@' - +#8'MinValue'#5#0#0#0#0#0#0#0#0#0#0#8'TabOrder'#2#2#5'Value'#5#0#0#0#0#0#0#0#0 - +#0#0#0#0#14'TFloatSpinEdit'#7'MaxEdit'#4'Left'#3#0#3#6'Height'#2#21#3'Top'#2 - +#6#5'Width'#2'R'#13'DecimalPlaces'#2#4#9'Increment'#5#0#0#0#0#0#0#0#128#255 - +'?'#8'MaxValue'#5#0#0#0#0#0#0'P'#195#15'@'#8'MinValue'#5#0#0#0#0#0#0#0#0#0#0 - +#8'TabOrder'#2#3#5'Value'#5#0#0#0#0#0#0#0#0#0#0#0#0#9'TTrackBar'#9'TrackBar1' - +#4'Left'#3'`'#3#6'Height'#2'&'#3'Top'#2#2#5'Width'#3#204#0#8'OnChange'#7#15 - +'TrackBar1Change'#8'Position'#2#0#8'TabOrder'#2#4#7'Visible'#8#0#0#8'TToolBa' - +'r'#14'RefreshToolbar'#4'Left'#2'l'#6'Height'#2'$'#3'Top'#2#0#5'Width'#2'*'#5 - +'Align'#7#6'alNone'#12'ButtonHeight'#2' '#11'ButtonWidth'#2' '#7'Caption'#6 - +#14'RefreshToolbar'#6'Images'#7#18'ImgForm.ImageList1'#11'ImagesWidth'#2#28#8 - +'TabOrder'#2#5#0#11'TToolButton'#10'RefreshBtn'#4'Left'#2#1#3'Top'#2#2#10'Im' - +'ageIndex'#2#10#7'OnClick'#7#15'RefreshBtnClick'#11'OnMouseDown'#7#19'Refres' - +'hBtnMouseDown'#0#0#0#0#10'TStatusBar'#10'StatusBar1'#4'Left'#2#0#6'Height'#2 + +#5#0#0#0#0#0#0#0#0#0#0#0#0#9'TComboBox'#10'HSpeedDrop'#22'AnchorSideLeft.Con' + +'trol'#7#6'TREdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.C' + +'ontrol'#7#14'RefreshToolbar'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3 + +'$'#1#6'Height'#2#20#3'Top'#2#8#5'Width'#2'x'#18'BorderSpacing.Left'#2#6#10 + +'ItemHeight'#2#26#13'Items.Strings'#1#6#6'To Fit'#6#2'x1'#6#2'x2'#6#2'x3'#6#2 + +'x4'#6#2'x5'#6#2'x6'#6#2'x7'#6#2'x8'#6#2'x9'#6#3'x10'#0#8'OnChange'#7#15'Tra' + +'ckBar1Change'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#1#4'Text'#6#1'0'#0 + +#0#14'TFloatSpinEdit'#7'MinEdit'#22'AnchorSideLeft.Control'#7#7'TextBtn'#19 + +'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#14'RefreshT' + +'oolbar'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3'='#2#6'Height'#2#21 + +#3'Top'#2#8#5'Width'#2'R'#18'BorderSpacing.Left'#2#6#13'DecimalPlaces'#2#4#8 + +'MaxValue'#5#0#0#0#0#0#0'P'#195#15'@'#8'MinValue'#5#0#0#0#0#0#0#0#0#0#0#8'Ta' + +'bOrder'#2#2#5'Value'#5#0#0#0#0#0#0#0#0#0#0#0#0#14'TFloatSpinEdit'#7'MaxEdit' + +#22'AnchorSideLeft.Control'#7#7'MinEdit'#19'AnchorSideLeft.Side'#7#9'asrBott' + +'om'#21'AnchorSideTop.Control'#7#14'RefreshToolbar'#18'AnchorSideTop.Side'#7 + +#9'asrCenter'#4'Left'#3#147#2#6'Height'#2#21#3'Top'#2#8#5'Width'#2'R'#18'Bor' + +'derSpacing.Left'#2#4#13'DecimalPlaces'#2#4#8'MaxValue'#5#0#0#0#0#0#0'P'#195 + +#15'@'#8'MinValue'#5#0#0#0#0#0#0#0#0#0#0#8'TabOrder'#2#3#5'Value'#5#0#0#0#0#0 + +#0#0#0#0#0#0#0#9'TTrackBar'#9'TrackBar1'#22'AnchorSideLeft.Control'#7#7'MaxE' + +'dit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#235#2#6'Height'#2'&'#3 + +'Top'#2#2#5'Width'#3#204#0#8'OnChange'#7#15'TrackBar1Change'#8'Position'#2#0 + +#18'BorderSpacing.Left'#2#6#8'TabOrder'#2#4#7'Visible'#8#0#0#8'TToolBar'#14 + +'RefreshToolbar'#22'AnchorSideLeft.Control'#7#11'OpenDataBtn'#19'AnchorSideL' + +'eft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#8'FourDBar'#4'Left'#2 + +'g'#6'Height'#2'$'#3'Top'#2#0#5'Width'#2'*'#5'Align'#7#6'alNone'#18'BorderSp' + +'acing.Left'#2#4#12'ButtonHeight'#2' '#11'ButtonWidth'#2' '#7'Caption'#6#14 + +'RefreshToolbar'#6'Images'#7#18'ImgForm.ImageList1'#11'ImagesWidth'#2#28#8'T' + +'abOrder'#2#5#0#11'TToolButton'#10'RefreshBtn'#4'Left'#2#1#3'Top'#2#2#10'Ima' + +'geIndex'#2#10#7'OnClick'#7#15'RefreshBtnClick'#11'OnMouseDown'#7#19'Refresh' + +'BtnMouseDown'#0#0#0#0#10'TStatusBar'#10'StatusBar1'#4'Left'#2#0#6'Height'#2 +#18#3'Top'#3#155#1#5'Width'#3'I'#4#6'Panels'#14#1#5'Width'#3#250#0#0#1#5'Wid' +'th'#2'2'#0#0#11'SimplePanel'#8#0#0#9'TMainMenu'#9'MainMenu1'#4'left'#2#14#3 - +'top'#2#5#0#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#4'File'#0#9'TMenuItem'#8 + ,'top'#2#5#0#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#4'File'#0#9'TMenuItem'#8 +'OpenMenu'#7'Caption'#6#9'Open data'#8'ShortCut'#3'O@'#7'OnClick'#7#13'OpenD' +'ataClick'#0#0#9'TMenuItem'#7'FFTMenu'#7'Caption'#6#14'Power spectrum'#7'Vis' +'ible'#8#7'OnClick'#7#12'FFTitemClick'#0#0#9'TMenuItem'#8'SaveMenu'#7'Captio' @@ -55,6 +77,6 @@ LazarusResources.Add('TGraph4DForm','FORMDATA',[ +'enuItem'#9'CloseMenu'#7'Caption'#6#12'Close window'#8'ShortCut'#3'W@'#7'OnC' +'lick'#7#17'Closewindow1Click'#0#0#0#9'TMenuItem'#5'Edit1'#7'Caption'#6#4'Ed' +'it'#0#9'TMenuItem'#8'CopyMenu'#7'Caption'#6#4'Copy'#7'OnClick'#7#10'Copy1Cl' - +'ick'#0#0#0#0#22'TSelectDirectoryDialog'#22'SelectDirectoryDialog1'#4'left'#3 - +#184#0#0#0#0 + +'ick'#0#0#0#0#22'TSelectDirectoryDialog'#22'SelectDirectoryDialog1'#4'left'#2 + +'`'#3'top'#2'0'#0#0#0 ]); diff --git a/landmarks.lfm b/landmarks.lfm index 12cd6b2..169d81b 100755 --- a/landmarks.lfm +++ b/landmarks.lfm @@ -3,7 +3,9 @@ object AnatForm: TAnatForm Height = 27 Top = 394 Width = 360 + AutoSize = True BorderStyle = bsDialog + BorderWidth = 4 Caption = 'Landmarks' ClientHeight = 27 ClientWidth = 360 @@ -11,12 +13,12 @@ object AnatForm: TAnatForm FormStyle = fsStayOnTop OnCreate = FormCreate Position = poScreenCenter - LCLVersion = '1.9.0.0' + LCLVersion = '2.1.0.0' object ToolBar1: TToolBar - Left = 0 + Left = 4 Height = 22 - Top = 0 - Width = 360 + Top = 4 + Width = 352 AutoSize = True ButtonHeight = 21 ButtonWidth = 23 @@ -27,16 +29,16 @@ object AnatForm: TAnatForm Left = 1 Height = 20 Top = 2 - Width = 38 + Width = 37 AutoSize = True Caption = 'Open' OnClick = OpenBtnClick end object SaveBtn: TSpeedButton - Left = 39 + Left = 38 Height = 20 Top = 2 - Width = 32 + Width = 33 AutoSize = True Caption = 'Save' OnClick = SaveBtnClick @@ -47,34 +49,35 @@ object AnatForm: TAnatForm Top = 2 Width = 145 DropDownCount = 24 - ItemHeight = 0 + ItemHeight = 26 OnChange = ComboBox1Change Style = csDropDownList TabOrder = 0 + Text = '0' end object AddBtn: TSpeedButton Left = 216 Height = 20 Top = 2 - Width = 29 + Width = 28 AutoSize = True Caption = 'Add' OnClick = AddBtnClick end object UpdateBtn: TSpeedButton - Left = 245 + Left = 244 Height = 20 Top = 2 - Width = 49 + Width = 48 AutoSize = True Caption = 'Update' OnClick = UpdateBtnClick end object DeleteBtn: TSpeedButton - Left = 294 + Left = 292 Height = 20 Top = 2 - Width = 44 + Width = 43 AutoSize = True Caption = 'Delete' OnClick = DeleteBtnClick diff --git a/landmarks.lrs b/landmarks.lrs index 5dde8db..2cce924 100755 --- a/landmarks.lrs +++ b/landmarks.lrs @@ -2,23 +2,24 @@ LazarusResources.Add('TAnatForm','FORMDATA',[ 'TPF0'#9'TAnatForm'#8'AnatForm'#4'Left'#3'S'#2#6'Height'#2#27#3'Top'#3#138#1#5 - +'Width'#3'h'#1#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#9'Landmarks'#12'Cl' - +'ientHeight'#2#27#11'ClientWidth'#3'h'#1#11'Font.Height'#2#245#9'FormStyle'#7 - +#11'fsStayOnTop'#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreenCente' - +'r'#10'LCLVersion'#6#7'1.9.0.0'#0#8'TToolBar'#8'ToolBar1'#4'Left'#2#0#6'Heig' - +'ht'#2#22#3'Top'#2#0#5'Width'#3'h'#1#8'AutoSize'#9#12'ButtonHeight'#2#21#11 - +'ButtonWidth'#2#23#7'Caption'#6#8'ToolBar1'#10'ParentFont'#8#8'TabOrder'#2#0 - +#0#12'TSpeedButton'#7'OpenBtn'#4'Left'#2#1#6'Height'#2#20#3'Top'#2#2#5'Width' - +#2'&'#8'AutoSize'#9#7'Caption'#6#4'Open'#7'OnClick'#7#12'OpenBtnClick'#0#0#12 - +'TSpeedButton'#7'SaveBtn'#4'Left'#2''''#6'Height'#2#20#3'Top'#2#2#5'Width'#2 - +' '#8'AutoSize'#9#7'Caption'#6#4'Save'#7'OnClick'#7#12'SaveBtnClick'#0#0#9'T' - +'ComboBox'#9'ComboBox1'#4'Left'#2'G'#6'Height'#2#20#3'Top'#2#2#5'Width'#3#145 - +#0#13'DropDownCount'#2#24#10'ItemHeight'#2#0#8'OnChange'#7#15'ComboBox1Chang' - +'e'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#0#0#12'TSpeedButton'#6'Add' - +'Btn'#4'Left'#3#216#0#6'Height'#2#20#3'Top'#2#2#5'Width'#2#29#8'AutoSize'#9#7 - +'Caption'#6#3'Add'#7'OnClick'#7#11'AddBtnClick'#0#0#12'TSpeedButton'#9'Updat' - +'eBtn'#4'Left'#3#245#0#6'Height'#2#20#3'Top'#2#2#5'Width'#2'1'#8'AutoSize'#9 - +#7'Caption'#6#6'Update'#7'OnClick'#7#14'UpdateBtnClick'#0#0#12'TSpeedButton' - +#9'DeleteBtn'#4'Left'#3'&'#1#6'Height'#2#20#3'Top'#2#2#5'Width'#2','#8'AutoS' - +'ize'#9#7'Caption'#6#6'Delete'#7'OnClick'#7#14'DeleteBtnClick'#0#0#0#0 + +'Width'#3'h'#1#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#11'BorderWidth'#2 + +#4#7'Caption'#6#9'Landmarks'#12'ClientHeight'#2#27#11'ClientWidth'#3'h'#1#11 + +'Font.Height'#2#245#9'FormStyle'#7#11'fsStayOnTop'#8'OnCreate'#7#10'FormCrea' + +'te'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.1.0.0'#0#8'TToolB' + +'ar'#8'ToolBar1'#4'Left'#2#4#6'Height'#2#22#3'Top'#2#4#5'Width'#3'`'#1#8'Aut' + +'oSize'#9#12'ButtonHeight'#2#21#11'ButtonWidth'#2#23#7'Caption'#6#8'ToolBar1' + +#10'ParentFont'#8#8'TabOrder'#2#0#0#12'TSpeedButton'#7'OpenBtn'#4'Left'#2#1#6 + +'Height'#2#20#3'Top'#2#2#5'Width'#2'%'#8'AutoSize'#9#7'Caption'#6#4'Open'#7 + +'OnClick'#7#12'OpenBtnClick'#0#0#12'TSpeedButton'#7'SaveBtn'#4'Left'#2'&'#6 + +'Height'#2#20#3'Top'#2#2#5'Width'#2'!'#8'AutoSize'#9#7'Caption'#6#4'Save'#7 + +'OnClick'#7#12'SaveBtnClick'#0#0#9'TComboBox'#9'ComboBox1'#4'Left'#2'G'#6'He' + +'ight'#2#20#3'Top'#2#2#5'Width'#3#145#0#13'DropDownCount'#2#24#10'ItemHeight' + +#2#26#8'OnChange'#7#15'ComboBox1Change'#5'Style'#7#14'csDropDownList'#8'TabO' + +'rder'#2#0#4'Text'#6#1'0'#0#0#12'TSpeedButton'#6'AddBtn'#4'Left'#3#216#0#6'H' + +'eight'#2#20#3'Top'#2#2#5'Width'#2#28#8'AutoSize'#9#7'Caption'#6#3'Add'#7'On' + +'Click'#7#11'AddBtnClick'#0#0#12'TSpeedButton'#9'UpdateBtn'#4'Left'#3#244#0#6 + +'Height'#2#20#3'Top'#2#2#5'Width'#2'0'#8'AutoSize'#9#7'Caption'#6#6'Update'#7 + +'OnClick'#7#14'UpdateBtnClick'#0#0#12'TSpeedButton'#9'DeleteBtn'#4'Left'#3'$' + +#1#6'Height'#2#20#3'Top'#2#2#5'Width'#2'+'#8'AutoSize'#9#7'Caption'#6#6'Dele' + +'te'#7'OnClick'#7#14'DeleteBtnClick'#0#0#0#0 ]); diff --git a/mni.lfm b/mni.lfm index 1ce9cda..b770a8a 100755 --- a/mni.lfm +++ b/mni.lfm @@ -2,43 +2,62 @@ object MNIForm: TMNIForm Left = 333 Height = 27 Top = 225 - Width = 198 + Width = 337 HorzScrollBar.Page = 263 VertScrollBar.Page = 53 ActiveControl = XEdit + AutoSize = True BorderIcons = [biSystemMenu] BorderStyle = bsDialog + BorderWidth = 4 Caption = 'MNI position' ClientHeight = 27 - ClientWidth = 198 + ClientWidth = 337 OnCreate = FormCreate Position = poScreenCenter - LCLVersion = '1.7' + LCLVersion = '2.1.0.0' object XEdit: TSpinEdit - Left = 12 - Height = 16 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner + AnchorSideTop.Side = asrCenter + Left = 8 + Height = 21 Top = 3 - Width = 50 + Width = 80 + BorderSpacing.Left = 4 + Constraints.MinWidth = 80 MaxValue = 200 MinValue = -200 OnChange = XEditChange TabOrder = 0 end object YEdit: TSpinEdit - Left = 72 - Height = 16 + AnchorSideLeft.Control = XEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = XEdit + AnchorSideTop.Side = asrCenter + Left = 92 + Height = 21 Top = 3 - Width = 50 + Width = 80 + BorderSpacing.Left = 4 + Constraints.MinWidth = 80 MaxValue = 200 MinValue = -200 OnChange = XEditChange TabOrder = 1 end object ZEdit: TSpinEdit - Left = 132 - Height = 16 + AnchorSideLeft.Control = YEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = XEdit + AnchorSideTop.Side = asrCenter + Left = 176 + Height = 21 Top = 3 - Width = 50 + Width = 80 + BorderSpacing.Left = 4 + Constraints.MinWidth = 80 MaxValue = 200 MinValue = -200 OnChange = XEditChange diff --git a/mricron.lps b/mricron.lps index c312021..6b689ec 100644 --- a/mricron.lps +++ b/mricron.lps @@ -3,7 +3,7 @@ - + @@ -20,13 +20,11 @@ - + - - + + - - @@ -35,11 +33,13 @@ - + - - + + + + @@ -61,11 +61,12 @@ - + - - + + + @@ -86,9 +87,10 @@ + - - + + @@ -102,8 +104,8 @@ - - + + @@ -113,13 +115,11 @@ - + - + - - @@ -130,7 +130,7 @@ - + @@ -154,10 +154,13 @@ - + - + + + + @@ -180,13 +183,12 @@ - + - - + + - @@ -195,11 +197,12 @@ - + - + + @@ -210,8 +213,7 @@ - - + @@ -235,7 +237,7 @@ - + @@ -272,11 +274,12 @@ - + + @@ -317,26 +320,27 @@ - + - - - + + + + - + - + - - + + @@ -347,7 +351,7 @@ - + @@ -355,34 +359,34 @@ - + - + - + - + - + @@ -390,36 +394,35 @@ - + - + - - + - + - - - - + + + - + - - - + + + + @@ -428,24 +431,23 @@ - + - + - + - - + @@ -453,7 +455,7 @@ - + @@ -462,7 +464,7 @@ - + @@ -470,7 +472,7 @@ - + @@ -479,7 +481,7 @@ - + @@ -488,7 +490,7 @@ - + @@ -498,7 +500,7 @@ - + @@ -506,7 +508,7 @@ - + @@ -515,7 +517,7 @@ - + @@ -524,7 +526,7 @@ - + @@ -532,7 +534,7 @@ - + @@ -540,7 +542,7 @@ - + @@ -549,7 +551,7 @@ - + @@ -558,7 +560,7 @@ - + @@ -567,7 +569,7 @@ - + @@ -575,18 +577,16 @@ - + - - + - - - + + @@ -595,7 +595,7 @@ - + @@ -604,7 +604,7 @@ - + @@ -614,7 +614,7 @@ - + @@ -622,7 +622,7 @@ - + @@ -632,14 +632,14 @@ - + - + @@ -649,7 +649,7 @@ - + @@ -658,7 +658,7 @@ - + @@ -668,7 +668,7 @@ - + @@ -677,7 +677,7 @@ - + @@ -685,7 +685,7 @@ - + @@ -695,7 +695,7 @@ - + @@ -704,7 +704,7 @@ - + @@ -714,7 +714,7 @@ - + @@ -722,7 +722,7 @@ - + @@ -732,7 +732,8 @@ - + + @@ -742,7 +743,7 @@ - + @@ -750,141 +751,167 @@ - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + diff --git a/nifti_hdr_view.lfm b/nifti_hdr_view.lfm index b79e43a..317c88f 100755 --- a/nifti_hdr_view.lfm +++ b/nifti_hdr_view.lfm @@ -1,23 +1,27 @@ object HdrForm: THdrForm - Left = 606 - Height = 396 - Top = 154 - Width = 609 + Left = 554 + Height = 406 + Top = 118 + Width = 601 + AutoSize = True + BorderStyle = bsDialog Caption = 'NIfTI Header Information' - ClientHeight = 396 - ClientWidth = 609 - Menu = MainMenu1 + ClientHeight = 406 + ClientWidth = 601 + Constraints.MinHeight = 320 + Constraints.MinWidth = 540 + Menu = HdrMenu OnCreate = FormCreate OnHide = FormHide OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.9.0.0' + LCLVersion = '2.1.0.0' object PageControl1: TPageControl Left = 4 - Height = 366 + Height = 376 Top = 4 - Width = 601 - ActivePage = TabRequired + Width = 593 + ActivePage = DimensionSheet Align = alClient BorderSpacing.Left = 2 BorderSpacing.Top = 2 @@ -27,105 +31,147 @@ object HdrForm: THdrForm TabIndex = 0 TabOrder = 0 OnChange = PageControl1Change - object TabRequired: TTabSheet + object DimensionSheet: TTabSheet Caption = 'Dimensions' - ClientHeight = 327 - ClientWidth = 595 - OnContextPopup = TabRequiredContextPopup + ClientHeight = 346 + ClientWidth = 587 + OnContextPopup = DimensionSheetContextPopup object Label21: TLabel + AnchorSideLeft.Control = DimensionSheet + AnchorSideTop.Control = DimensionSheet Left = 6 Height = 16 Top = 6 - Width = 79 + Width = 77 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 Caption = 'Header Type' ParentColor = False end object Label1: TLabel - Left = 14 + AnchorSideLeft.Control = DimensionSheet + AnchorSideTop.Control = HeaderMagicDrop + AnchorSideTop.Side = asrBottom + Left = 10 Height = 16 - Top = 35 - Width = 268 + Top = 30 + Width = 251 + BorderSpacing.Left = 10 + BorderSpacing.Top = 6 Caption = 'Dimension Length Spacing Unit' ParentColor = False end object Label2: TLabel - Left = 16 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = Xmm + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 67 - Width = 44 + Top = 54 + Width = 45 Caption = 'I Space' ParentColor = False end object Label3: TLabel - Left = 16 + AnchorSideLeft.Control = Label2 + AnchorSideTop.Control = Ymm + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 97 - Width = 44 + Top = 81 + Width = 48 Caption = 'J Space' ParentColor = False end object Label4: TLabel - Left = 16 + AnchorSideLeft.Control = Label2 + AnchorSideTop.Control = Zmm + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 131 - Width = 49 + Top = 108 + Width = 50 Caption = 'K Space' ParentColor = False end object Label8: TLabel - Left = 6 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = fTypeDrop + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 297 - Width = 29 + Top = 243 + Width = 28 Caption = 'Data' ParentColor = False end object Label7: TLabel - Left = 294 + AnchorSideLeft.Control = PixDim7 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = PixDim7 + AnchorSideTop.Side = asrCenter + Left = 296 Height = 16 - Top = 235 + Top = 216 Width = 38 + BorderSpacing.Left = 30 Caption = 'Offset' ParentColor = False end object Label44: TLabel - Left = 16 + AnchorSideLeft.Control = Label2 + AnchorSideTop.Control = TSec + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 166 - Width = 31 + Top = 135 + Width = 30 Caption = 'Time' ParentColor = False end object Label29: TLabel - Left = 16 + AnchorSideLeft.Control = Label2 + AnchorSideTop.Control = PixDim5 + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 198 - Width = 51 + Top = 162 + Width = 48 Caption = '5th Dim' ParentColor = False end object Label41: TLabel - Left = 16 + AnchorSideLeft.Control = Label2 + AnchorSideTop.Control = PixDim6 + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 230 - Width = 51 + Top = 189 + Width = 48 Caption = '6th Dim' ParentColor = False end object Label42: TLabel - Left = 16 + AnchorSideLeft.Control = Label2 + AnchorSideTop.Control = PixDim7 + Left = 10 Height = 16 - Top = 265 - Width = 51 + Top = 214 + Width = 47 Caption = '7th Dim' ParentColor = False end object HeaderMagicDrop: TComboBox - Left = 108 + AnchorSideLeft.Control = Label21 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Label21 + AnchorSideTop.Side = asrCenter + Left = 89 Height = 20 - Top = 2 + Top = 4 Width = 239 - ItemHeight = 0 + BorderSpacing.Left = 6 + ItemHeight = 26 Items.Strings = ( 'Unknown' 'ni1: NIfTI separate file (hdr+.img)' @@ -136,27 +182,40 @@ object HdrForm: THdrForm OnSelect = HeaderMagicDropSelect Style = csDropDownList TabOrder = 15 + Text = '0' end object Endian: TComboBox - Left = 231 + AnchorSideLeft.Control = fTypeDrop + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = fTypeDrop + AnchorSideTop.Side = asrCenter + Left = 202 Height = 20 - Top = 291 + Top = 241 Width = 210 - ItemHeight = 0 + BorderSpacing.Left = 6 + ItemHeight = 26 Items.Strings = ( 'Native Endian' 'Swapped Endian' ) Style = csDropDownList TabOrder = 16 + Text = '0' end object fTypeDrop: TComboBox - Left = 56 + AnchorSideLeft.Control = Label8 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = PixDim7 + AnchorSideTop.Side = asrBottom + Left = 44 Height = 20 - Top = 291 + Top = 241 Width = 152 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 DropDownCount = 20 - ItemHeight = 0 + ItemHeight = 26 Items.Strings = ( 'binary' '8-bit S' @@ -175,16 +234,21 @@ object HdrForm: THdrForm '128-bit complex' '256-bit complex' ) - OnSelect = ImageSzChange Style = csDropDownList TabOrder = 17 + Text = '0' end object xyzt_sizeDrop: TComboBox - Left = 262 + AnchorSideLeft.Control = Ymm + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Ymm + AnchorSideTop.Side = asrCenter + Left = 272 Height = 20 - Top = 87 + Top = 79 Width = 128 - ItemHeight = 0 + BorderSpacing.Left = 6 + ItemHeight = 26 Items.Strings = ( 'Unknown' 'Meter' @@ -194,13 +258,19 @@ object HdrForm: THdrForm ) Style = csDropDownList TabOrder = 18 + Text = '0' end object xyzt_timeDrop: TComboBox - Left = 262 + AnchorSideLeft.Control = TSec + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = TSec + AnchorSideTop.Side = asrCenter + Left = 272 Height = 20 - Top = 157 + Top = 133 Width = 128 - ItemHeight = 0 + BorderSpacing.Left = 6 + ItemHeight = 26 Items.Strings = ( 'Unknown' 'Second' @@ -212,47 +282,61 @@ object HdrForm: THdrForm ) Style = csDropDownList TabOrder = 19 + Text = '0' end object Xdim: TSpinEdit - Left = 80 - Height = 16 - Top = 59 + AnchorSideLeft.Control = Label1 + AnchorSideLeft.Side = asrCenter + AnchorSideTop.Control = Xmm + AnchorSideTop.Side = asrCenter + Left = 98 + Height = 21 + Top = 52 Width = 74 MaxValue = 9999 MinValue = 1 - OnExit = ImageSzChange TabOrder = 0 Value = 2 end object Ydim: TSpinEdit - Left = 80 - Height = 16 - Top = 89 + AnchorSideLeft.Control = Xdim + AnchorSideTop.Control = Ymm + AnchorSideTop.Side = asrCenter + Left = 98 + Height = 21 + Top = 79 Width = 74 MaxValue = 9999 MinValue = 1 - OnChange = ImageSzChange - OnExit = ImageSzChange TabOrder = 1 Value = 2 end object Zdim: TSpinEdit - Left = 80 - Height = 16 - Top = 123 + AnchorSideLeft.Control = Xdim + AnchorSideTop.Control = Zmm + AnchorSideTop.Side = asrCenter + Left = 98 + Height = 21 + Top = 106 Width = 74 MaxValue = 9999 MinValue = 1 - OnChange = ImageSzChange - OnExit = ImageSzChange TabOrder = 2 Value = 1 end object Xmm: TFloatSpinEdit - Left = 164 - Height = 16 - Top = 59 + AnchorSideLeft.Control = Xdim + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Label1 + AnchorSideRight.Side = asrBottom + Left = 178 + Height = 21 + Top = 52 Width = 88 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 DecimalPlaces = 4 MaxValue = 99999999 MinValue = -99999999 @@ -260,10 +344,14 @@ object HdrForm: THdrForm Value = 0 end object Ymm: TFloatSpinEdit - Left = 164 - Height = 16 - Top = 89 + AnchorSideLeft.Control = Xmm + AnchorSideTop.Control = Xmm + AnchorSideTop.Side = asrBottom + Left = 178 + Height = 21 + Top = 79 Width = 88 + BorderSpacing.Top = 6 DecimalPlaces = 4 MaxValue = 99999999 MinValue = -99999999 @@ -271,10 +359,14 @@ object HdrForm: THdrForm Value = 0 end object Zmm: TFloatSpinEdit - Left = 164 - Height = 16 - Top = 123 + AnchorSideLeft.Control = Xmm + AnchorSideTop.Control = Ymm + AnchorSideTop.Side = asrBottom + Left = 178 + Height = 21 + Top = 106 Width = 88 + BorderSpacing.Top = 6 DecimalPlaces = 4 MaxValue = 99999999 MinValue = -99999999 @@ -282,32 +374,41 @@ object HdrForm: THdrForm Value = 0 end object OffsetEdit: TSpinEdit - Left = 342 - Height = 16 - Top = 230 + AnchorSideLeft.Control = Label7 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Label7 + AnchorSideTop.Side = asrCenter + Left = 340 + Height = 21 + Top = 214 Width = 94 + BorderSpacing.Left = 6 MaxValue = 999999 - OnExit = ImageSzChange TabOrder = 14 Value = 1 end object TDim: TSpinEdit - Left = 80 - Height = 16 - Top = 157 + AnchorSideLeft.Control = Xdim + AnchorSideTop.Control = TSec + AnchorSideTop.Side = asrCenter + Left = 98 + Height = 21 + Top = 133 Width = 74 MaxValue = 9999 MinValue = 1 - OnChange = ImageSzChange - OnExit = ImageSzChange TabOrder = 3 Value = 1 end object TSec: TFloatSpinEdit - Left = 164 - Height = 16 - Top = 157 + AnchorSideLeft.Control = Xmm + AnchorSideTop.Control = Zmm + AnchorSideTop.Side = asrBottom + Left = 178 + Height = 21 + Top = 133 Width = 88 + BorderSpacing.Top = 6 DecimalPlaces = 4 MaxValue = 99999999 MinValue = -99999999 @@ -315,46 +416,53 @@ object HdrForm: THdrForm Value = 0 end object Dim5Edit: TSpinEdit - Left = 80 - Height = 16 - Top = 191 + AnchorSideLeft.Control = Xdim + AnchorSideTop.Control = PixDim5 + AnchorSideTop.Side = asrCenter + Left = 98 + Height = 21 + Top = 160 Width = 74 MaxValue = 35000 MinValue = 1 - OnChange = ImageSzChange - OnExit = ImageSzChange TabOrder = 4 Value = 1 end object Dim6Edit: TSpinEdit - Left = 80 - Height = 16 - Top = 223 + AnchorSideLeft.Control = Xdim + AnchorSideTop.Control = PixDim6 + AnchorSideTop.Side = asrCenter + Left = 98 + Height = 21 + Top = 187 Width = 74 MaxValue = 35000 MinValue = 1 - OnChange = ImageSzChange - OnExit = ImageSzChange TabOrder = 5 Value = 1 end object Dim7Edit: TSpinEdit - Left = 80 - Height = 16 - Top = 258 + AnchorSideLeft.Control = Xdim + AnchorSideTop.Control = PixDim7 + AnchorSideTop.Side = asrCenter + Left = 98 + Height = 21 + Top = 214 Width = 74 MaxValue = 35000 MinValue = 1 - OnChange = ImageSzChange - OnExit = ImageSzChange TabOrder = 9 Value = 1 end object PixDim5: TFloatSpinEdit - Left = 164 - Height = 16 - Top = 191 + AnchorSideLeft.Control = Xmm + AnchorSideTop.Control = TSec + AnchorSideTop.Side = asrBottom + Left = 178 + Height = 21 + Top = 160 Width = 88 + BorderSpacing.Top = 6 DecimalPlaces = 4 MaxValue = 99999999 MinValue = -99999999 @@ -362,10 +470,14 @@ object HdrForm: THdrForm Value = 0 end object PixDim6: TFloatSpinEdit - Left = 164 - Height = 16 - Top = 223 + AnchorSideLeft.Control = Xmm + AnchorSideTop.Control = PixDim5 + AnchorSideTop.Side = asrBottom + Left = 178 + Height = 21 + Top = 187 Width = 88 + BorderSpacing.Top = 6 DecimalPlaces = 4 MaxValue = 99999999 MinValue = -99999999 @@ -373,10 +485,14 @@ object HdrForm: THdrForm Value = 0 end object PixDim7: TFloatSpinEdit - Left = 164 - Height = 16 - Top = 258 + AnchorSideLeft.Control = Xmm + AnchorSideTop.Control = PixDim6 + AnchorSideTop.Side = asrBottom + Left = 178 + Height = 21 + Top = 214 Width = 88 + BorderSpacing.Top = 6 DecimalPlaces = 4 MaxValue = 99999999 MinValue = -99999999 @@ -384,115 +500,162 @@ object HdrForm: THdrForm Value = 0 end end - object TabSheet4: TTabSheet + object ReorientSheet: TTabSheet Caption = 'Reorient' - ClientHeight = 327 + ClientHeight = 336 ClientWidth = 595 object Label24: TLabel - Left = 10 + AnchorSideLeft.Control = Label46 + AnchorSideTop.Control = srow_x0Edit + AnchorSideTop.Side = asrCenter + Left = 12 Height = 16 - Top = 184 - Width = 8 + Top = 141 + Width = 9 Caption = 'X' ParentColor = False end object Label36: TLabel - Left = 10 + AnchorSideLeft.Control = Label46 + AnchorSideTop.Control = srow_y0Edit + AnchorSideTop.Side = asrCenter + Left = 12 Height = 16 - Top = 218 + Top = 168 Width = 8 Caption = 'Y' ParentColor = False end object Label37: TLabel - Left = 10 + AnchorSideLeft.Control = Label46 + AnchorSideTop.Control = srow_z0Edit + AnchorSideTop.Side = asrCenter + Left = 12 Height = 16 - Top = 251 - Width = 8 + Top = 195 + Width = 9 Caption = 'Z' ParentColor = False end object Label39: TLabel - Left = 10 + AnchorSideLeft.Control = Label46 + AnchorSideTop.Control = qoffset_x_Edit + AnchorSideTop.Side = asrCenter + Left = 12 Height = 16 - Top = 123 - Width = 59 + Top = 88 + Width = 58 Caption = 'Q Offsets' ParentColor = False end object Label40: TLabel - Left = 10 + AnchorSideLeft.Control = Label46 + AnchorSideTop.Control = quatern_bEdit + AnchorSideTop.Side = asrCenter + Left = 12 Height = 16 - Top = 86 - Width = 77 + Top = 61 + Width = 74 Caption = 'Quaternions' ParentColor = False end object Label46: TLabel - Left = 10 + AnchorSideLeft.Control = Label38 + AnchorSideTop.Control = QFacEdit + AnchorSideTop.Side = asrCenter + Left = 12 Height = 16 - Top = 46 - Width = 105 + Top = 34 + Width = 97 + BorderSpacing.Left = 6 Caption = 'qFactor [1 or -1]' ParentColor = False end object Label38: TLabel - Left = 4 + AnchorSideLeft.Control = ReorientSheet + AnchorSideTop.Control = QFormDrop + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 9 - Width = 150 + Top = 8 + Width = 143 + BorderSpacing.Left = 6 Caption = 'Quaternion parameters ' ParentColor = False end object Label47: TLabel - Left = 4 + AnchorSideLeft.Control = Label38 + AnchorSideTop.Control = SFormDrop + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 157 - Width = 117 + Top = 115 + Width = 112 Caption = 'Affine parameters ' ParentColor = False end object QFormDrop: TComboBox - Left = 176 + AnchorSideLeft.Control = Label38 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ReorientSheet + Left = 155 Height = 20 - Top = 5 + Top = 6 Width = 260 - ItemHeight = 0 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + Constraints.MinWidth = 260 + ItemHeight = 26 Items.Strings = ( 'None' 'Scanner Position' 'Coregistrationon' 'Normalized Tal' - 'Normalzied mni152ach' - 'Normalzied mni152' + 'Normalized mni152ach' + 'Normalized mni152' ) OnSelect = HeaderMagicDropSelect Style = csDropDownList TabOrder = 19 + Text = '0' end object SFormDrop: TComboBox - Left = 145 + AnchorSideLeft.Control = Label47 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = qoffset_x_Edit + AnchorSideTop.Side = asrBottom + Left = 124 Height = 20 - Top = 150 - Width = 204 - ItemHeight = 0 + Top = 113 + Width = 260 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + Constraints.MinWidth = 260 + ItemHeight = 26 Items.Strings = ( 'None' 'Scanner Position' 'Coregistrationon' 'Normalized Tal' - 'Normalzied mni152ach' - 'Normalzied mni152' + 'Normalized mni152ach' + 'Normalized mni152' ) OnSelect = HeaderMagicDropSelect Style = csDropDownList TabOrder = 20 + Text = '0' end object srow_x0Edit: TFloatSpinEdit - Left = 40 - Height = 16 - Top = 188 + AnchorSideLeft.Control = Label24 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = SFormDrop + AnchorSideTop.Side = asrBottom + Left = 27 + Height = 21 + Top = 139 Width = 100 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -500,10 +663,15 @@ object HdrForm: THdrForm Value = 1 end object srow_x1Edit: TFloatSpinEdit - Left = 148 - Height = 16 - Top = 188 + AnchorSideLeft.Control = srow_x0Edit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = srow_x0Edit + AnchorSideTop.Side = asrCenter + Left = 133 + Height = 21 + Top = 139 Width = 100 + BorderSpacing.Left = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -511,10 +679,15 @@ object HdrForm: THdrForm Value = 0 end object srow_x2Edit: TFloatSpinEdit - Left = 260 - Height = 16 - Top = 188 + AnchorSideLeft.Control = srow_x1Edit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = srow_x0Edit + AnchorSideTop.Side = asrCenter + Left = 239 + Height = 21 + Top = 139 Width = 100 + BorderSpacing.Left = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -522,10 +695,14 @@ object HdrForm: THdrForm Value = 0 end object srow_y0Edit: TFloatSpinEdit - Left = 40 - Height = 16 - Top = 222 + AnchorSideLeft.Control = srow_x0Edit + AnchorSideTop.Control = srow_x0Edit + AnchorSideTop.Side = asrBottom + Left = 27 + Height = 21 + Top = 166 Width = 100 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -533,9 +710,12 @@ object HdrForm: THdrForm Value = 0 end object srow_y1Edit: TFloatSpinEdit - Left = 148 - Height = 16 - Top = 222 + AnchorSideLeft.Control = srow_x1Edit + AnchorSideTop.Control = srow_y0Edit + AnchorSideTop.Side = asrCenter + Left = 133 + Height = 21 + Top = 166 Width = 100 DecimalPlaces = 5 MaxValue = 9999999999999 @@ -544,9 +724,12 @@ object HdrForm: THdrForm Value = 1 end object srow_y2Edit: TFloatSpinEdit - Left = 260 - Height = 16 - Top = 222 + AnchorSideLeft.Control = srow_x2Edit + AnchorSideTop.Control = srow_y0Edit + AnchorSideTop.Side = asrCenter + Left = 239 + Height = 21 + Top = 166 Width = 100 DecimalPlaces = 5 MaxValue = 9999999999999 @@ -555,10 +738,14 @@ object HdrForm: THdrForm Value = 0 end object srow_z0Edit: TFloatSpinEdit - Left = 40 - Height = 16 - Top = 255 + AnchorSideLeft.Control = srow_x0Edit + AnchorSideTop.Control = srow_y0Edit + AnchorSideTop.Side = asrBottom + Left = 27 + Height = 21 + Top = 193 Width = 100 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -566,9 +753,12 @@ object HdrForm: THdrForm Value = 0 end object srow_z1Edit: TFloatSpinEdit - Left = 148 - Height = 16 - Top = 255 + AnchorSideLeft.Control = srow_x1Edit + AnchorSideTop.Control = srow_z0Edit + AnchorSideTop.Side = asrCenter + Left = 133 + Height = 21 + Top = 193 Width = 100 DecimalPlaces = 5 MaxValue = 9999999999999 @@ -577,9 +767,11 @@ object HdrForm: THdrForm Value = 0 end object srow_z2Edit: TFloatSpinEdit - Left = 260 - Height = 16 - Top = 255 + AnchorSideLeft.Control = srow_x2Edit + AnchorSideTop.Control = srow_z0Edit + Left = 239 + Height = 21 + Top = 193 Width = 100 DecimalPlaces = 5 MaxValue = 9999999999999 @@ -588,10 +780,15 @@ object HdrForm: THdrForm Value = 1 end object srow_x3Edit: TFloatSpinEdit - Left = 372 - Height = 16 - Top = 188 + AnchorSideLeft.Control = srow_x2Edit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = srow_x0Edit + AnchorSideTop.Side = asrCenter + Left = 345 + Height = 21 + Top = 139 Width = 100 + BorderSpacing.Left = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -599,9 +796,12 @@ object HdrForm: THdrForm Value = 0 end object srow_y3Edit: TFloatSpinEdit - Left = 372 - Height = 16 - Top = 222 + AnchorSideLeft.Control = srow_x3Edit + AnchorSideTop.Control = srow_y0Edit + AnchorSideTop.Side = asrCenter + Left = 345 + Height = 21 + Top = 166 Width = 100 DecimalPlaces = 5 MaxValue = 9999999999999 @@ -610,9 +810,12 @@ object HdrForm: THdrForm Value = 0 end object srow_z3Edit: TFloatSpinEdit - Left = 372 - Height = 16 - Top = 255 + AnchorSideLeft.Control = srow_x3Edit + AnchorSideTop.Control = srow_z0Edit + AnchorSideTop.Side = asrCenter + Left = 345 + Height = 21 + Top = 193 Width = 100 DecimalPlaces = 5 MaxValue = 9999999999999 @@ -621,10 +824,16 @@ object HdrForm: THdrForm Value = 0 end object quatern_bEdit: TFloatSpinEdit - Left = 104 - Height = 16 - Top = 84 + AnchorSideLeft.Control = Label40 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = QFacEdit + AnchorSideTop.Side = asrBottom + Left = 92 + Height = 21 + Top = 59 Width = 100 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -632,10 +841,15 @@ object HdrForm: THdrForm Value = 0 end object quatern_cEdit: TFloatSpinEdit - Left = 222 - Height = 16 - Top = 84 + AnchorSideLeft.Control = quatern_bEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = quatern_bEdit + AnchorSideTop.Side = asrCenter + Left = 198 + Height = 21 + Top = 59 Width = 100 + BorderSpacing.Left = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -643,10 +857,15 @@ object HdrForm: THdrForm Value = 0 end object quatern_dEdit: TFloatSpinEdit - Left = 342 - Height = 16 - Top = 84 + AnchorSideLeft.Control = quatern_cEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = quatern_bEdit + AnchorSideTop.Side = asrCenter + Left = 304 + Height = 21 + Top = 59 Width = 100 + BorderSpacing.Left = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -654,10 +873,14 @@ object HdrForm: THdrForm Value = 0 end object qoffset_x_Edit: TFloatSpinEdit - Left = 104 - Height = 16 - Top = 117 + AnchorSideLeft.Control = quatern_bEdit + AnchorSideTop.Control = quatern_bEdit + AnchorSideTop.Side = asrBottom + Left = 92 + Height = 21 + Top = 86 Width = 100 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -665,9 +888,12 @@ object HdrForm: THdrForm Value = 0 end object qoffset_y_Edit: TFloatSpinEdit - Left = 222 - Height = 16 - Top = 117 + AnchorSideLeft.Control = quatern_cEdit + AnchorSideTop.Control = qoffset_x_Edit + AnchorSideTop.Side = asrCenter + Left = 198 + Height = 21 + Top = 86 Width = 100 DecimalPlaces = 5 MaxValue = 9999999999999 @@ -676,9 +902,12 @@ object HdrForm: THdrForm Value = 0 end object qoffset_z_Edit: TFloatSpinEdit - Left = 342 - Height = 16 - Top = 117 + AnchorSideLeft.Control = quatern_dEdit + AnchorSideTop.Control = qoffset_x_Edit + AnchorSideTop.Side = asrCenter + Left = 304 + Height = 21 + Top = 86 Width = 100 DecimalPlaces = 5 MaxValue = 9999999999999 @@ -687,10 +916,16 @@ object HdrForm: THdrForm Value = 0 end object QFacEdit: TFloatSpinEdit - Left = 140 - Height = 16 - Top = 46 + AnchorSideLeft.Control = Label46 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = QFormDrop + AnchorSideTop.Side = asrBottom + Left = 115 + Height = 21 + Top = 32 Width = 100 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 1 MinValue = -1 @@ -698,63 +933,88 @@ object HdrForm: THdrForm Value = 1 end end - object TabSheet3: TTabSheet + object IntensitySheet: TTabSheet Caption = 'Image Intensity' - ClientHeight = 389 - ClientWidth = 595 - object Label12: TLabel - Left = 24 + ClientHeight = 320 + ClientWidth = 581 + object MaxLabel: TLabel + AnchorSideLeft.Control = SlopeLabel + AnchorSideTop.Control = cmax + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 163 - Width = 62 + Top = 133 + Width = 58 Caption = 'Maximum' ParentColor = False end - object Label13: TLabel - Left = 24 + object MinLabel: TLabel + AnchorSideLeft.Control = SlopeLabel + AnchorSideTop.Control = cmin + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 129 - Width = 59 + Top = 106 + Width = 55 Caption = 'Minimum' ParentColor = False end - object Label23: TLabel - Left = 24 + object SlopeLabel: TLabel + AnchorSideLeft.Control = CalLabel + AnchorSideTop.Control = Scale + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 28 + Top = 30 Width = 34 + BorderSpacing.Left = 6 Caption = 'Slope' ParentColor = False end - object Label22: TLabel - Left = 24 + object InterceptLabel: TLabel + AnchorSideLeft.Control = SlopeLabel + AnchorSideTop.Control = Intercept + AnchorSideTop.Side = asrCenter + Left = 10 Height = 16 - Top = 64 - Width = 56 + Top = 57 + Width = 55 Caption = 'Intercept' ParentColor = False end - object Label30: TLabel - Left = 6 + object CalLabel: TLabel + AnchorSideLeft.Control = IntensitySheet + AnchorSideTop.Control = IntensitySheet + Left = 4 Height = 16 - Top = 4 - Width = 118 + Top = 6 + Width = 113 + BorderSpacing.Left = 4 + BorderSpacing.Top = 6 Caption = 'Calibration Scaling' ParentColor = False end - object Label33: TLabel - Left = 6 + object DisplayLabel: TLabel + AnchorSideLeft.Control = CalLabel + AnchorSideTop.Control = Intercept + AnchorSideTop.Side = asrBottom + Left = 4 Height = 16 - Top = 103 - Width = 199 + Top = 82 + Width = 192 + BorderSpacing.Top = 6 Caption = 'Display Range (calibrated units)' ParentColor = False end object cmax: TFloatSpinEdit - Left = 94 - Height = 16 - Top = 165 + AnchorSideLeft.Control = cmin + AnchorSideTop.Control = cmin + AnchorSideTop.Side = asrBottom + Left = 71 + Height = 21 + Top = 131 Width = 110 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 99999999 MinValue = -99999999 @@ -762,10 +1022,16 @@ object HdrForm: THdrForm Value = 0 end object cmin: TFloatSpinEdit - Left = 94 - Height = 16 - Top = 129 + AnchorSideLeft.Control = MinLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = DisplayLabel + AnchorSideTop.Side = asrBottom + Left = 71 + Height = 21 + Top = 104 Width = 110 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 99999999 MinValue = -99999999 @@ -773,10 +1039,16 @@ object HdrForm: THdrForm Value = 0 end object Scale: TFloatSpinEdit - Left = 94 - Height = 16 + AnchorSideLeft.Control = InterceptLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = CalLabel + AnchorSideTop.Side = asrBottom + Left = 71 + Height = 21 Top = 28 Width = 110 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 99999999 MinValue = -99999999 @@ -784,10 +1056,14 @@ object HdrForm: THdrForm Value = 0 end object Intercept: TFloatSpinEdit - Left = 94 - Height = 16 - Top = 64 + AnchorSideLeft.Control = Scale + AnchorSideTop.Control = Scale + AnchorSideTop.Side = asrBottom + Left = 71 + Height = 21 + Top = 55 Width = 110 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 99999999 MinValue = -99999999 @@ -795,49 +1071,65 @@ object HdrForm: THdrForm Value = 0 end end - object TabSheet1: TTabSheet + object StatSheet: TTabSheet Caption = 'Statistics' - ClientHeight = 327 - ClientWidth = 595 - object Label35: TLabel - Left = 8 + ClientHeight = 320 + ClientWidth = 581 + object IntentLabel: TLabel + AnchorSideLeft.Control = StatSheet + AnchorSideTop.Control = IntentCodeDrop + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 14 - Width = 57 + Top = 11 + Width = 53 + BorderSpacing.Left = 6 Caption = 'Intention' ParentColor = False end - object Label25: TLabel - Left = 24 + object Intent1Label: TLabel + AnchorSideLeft.Control = IntentLabel + AnchorSideTop.Control = intent_p1Edit + AnchorSideTop.Side = asrCenter + Left = 12 Height = 16 - Top = 48 - Width = 76 + Top = 40 + Width = 72 + BorderSpacing.Left = 6 Caption = 'Parameter 1' ParentColor = False end - object Label27: TLabel - Left = 24 + object Intent2Label: TLabel + AnchorSideLeft.Control = Intent1Label + AnchorSideTop.Control = intent_p2Edit + AnchorSideTop.Side = asrCenter + Left = 12 Height = 16 - Top = 85 - Width = 76 + Top = 67 + Width = 74 Caption = 'Parameter 2' ParentColor = False end - object Label28: TLabel - Left = 24 + object Intent3Label: TLabel + AnchorSideLeft.Control = Intent1Label + AnchorSideTop.Control = intent_p3Edit + AnchorSideTop.Side = asrCenter + Left = 12 Height = 16 - Top = 120 - Width = 76 + Top = 94 + Width = 74 Caption = 'Parameter 3' ParentColor = False end object IntentCodeDrop: TComboBox + AnchorSideTop.Control = StatSheet Left = 76 - Height = 20 - Top = 8 + Height = 26 + Top = 6 Width = 218 + BorderSpacing.Top = 6 DropDownCount = 44 - ItemHeight = 0 + ItemHeight = 26 Items.Strings = ( 'Not statistics' 'Correlation coefficient ' @@ -879,12 +1171,19 @@ object HdrForm: THdrForm ) Style = csDropDownList TabOrder = 3 + Text = '0' end object intent_p1Edit: TFloatSpinEdit - Left = 128 - Height = 16 - Top = 46 + AnchorSideLeft.Control = Intent1Label + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = IntentCodeDrop + AnchorSideTop.Side = asrBottom + Left = 90 + Height = 21 + Top = 38 Width = 138 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 99999999 MinValue = -99999999 @@ -892,10 +1191,14 @@ object HdrForm: THdrForm Value = 0 end object intent_p2Edit: TFloatSpinEdit - Left = 128 - Height = 16 - Top = 83 + AnchorSideLeft.Control = intent_p1Edit + AnchorSideTop.Control = intent_p1Edit + AnchorSideTop.Side = asrBottom + Left = 90 + Height = 21 + Top = 65 Width = 138 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 99999999 MinValue = -99999999 @@ -903,10 +1206,14 @@ object HdrForm: THdrForm Value = 0 end object intent_p3Edit: TFloatSpinEdit - Left = 128 - Height = 16 - Top = 119 + AnchorSideLeft.Control = intent_p1Edit + AnchorSideTop.Control = intent_p2Edit + AnchorSideTop.Side = asrBottom + Left = 90 + Height = 21 + Top = 92 Width = 138 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 99999999 MinValue = -99999999 @@ -914,80 +1221,111 @@ object HdrForm: THdrForm Value = 0 end end - object TabSheet2: TTabSheet + object fmriSheet: TTabSheet Caption = 'fMRI' - ClientHeight = 327 - ClientWidth = 595 - object Label11: TLabel - Left = 12 + ClientHeight = 320 + ClientWidth = 581 + object OrderLabel: TLabel + AnchorSideLeft.Control = TimeLabel + AnchorSideTop.Control = SliceCodeDrop + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 145 - Width = 69 + Top = 119 + Width = 67 Caption = 'Slice Order' ParentColor = False end - object Label16: TLabel - Left = 12 + object TimeLabel: TLabel + AnchorSideLeft.Control = fmriSheet + AnchorSideTop.Control = toffsetEdit + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 Top = 8 - Width = 73 + Width = 71 + BorderSpacing.Left = 6 Caption = 'Time Offset' ParentColor = False end - object Label17: TLabel - Left = 14 + object DurationLabel: TLabel + AnchorSideLeft.Control = TimeLabel + AnchorSideTop.Control = Slice_durationEdit + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 39 - Width = 86 + Top = 35 + Width = 83 Caption = 'Slice duration' ParentColor = False end - object Label32: TLabel - Left = 12 + object StartLabel: TLabel + AnchorSideLeft.Control = TimeLabel + AnchorSideTop.Control = slice_startEdit + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 74 - Width = 62 + Top = 62 + Width = 63 Caption = 'Slice Start' ParentColor = False end - object Label20: TLabel - Left = 12 + object EndLabel: TLabel + AnchorSideLeft.Control = TimeLabel + AnchorSideTop.Control = slice_endEdit + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 105 + Top = 89 Width = 56 Caption = 'Slice End' ParentColor = False end - object Label31: TLabel - Left = 12 + object FreqLabel: TLabel + AnchorSideLeft.Control = TimeLabel + AnchorSideTop.Control = FreqDimDrop + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 178 - Width = 136 + Top = 151 + Width = 131 Caption = 'Frequency Dimension' ParentColor = False end - object Label43: TLabel - Left = 12 + object PhaseLabel: TLabel + AnchorSideLeft.Control = TimeLabel + AnchorSideTop.Control = PhaseDimDrop + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 214 - Width = 108 + Top = 183 + Width = 104 Caption = 'Phase Dimension' ParentColor = False end - object Label45: TLabel - Left = 12 + object SliceLabel: TLabel + AnchorSideLeft.Control = TimeLabel + AnchorSideTop.Control = SliceDimDrop + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 250 - Width = 100 + Top = 215 + Width = 96 Caption = 'Slice Dimension' ParentColor = False end object SliceCodeDrop: TComboBox - Left = 120 - Height = 20 - Top = 136 + AnchorSideLeft.Control = OrderLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = slice_endEdit + AnchorSideTop.Side = asrBottom + Left = 79 + Height = 26 + Top = 114 Width = 274 - ItemHeight = 0 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + ItemHeight = 26 Items.Strings = ( 'Unknown' 'Sequential Increasing (1 2 3 4)' @@ -997,71 +1335,93 @@ object HdrForm: THdrForm 'Interleaved Increasing2 (2 4 1 3)' 'Interleaved Decreasing2 (3 1 4 2)' ) - OnSelect = ImageSzChange Style = csDropDownList TabOrder = 4 + Text = '0' end object FreqDimDrop: TComboBox - Left = 179 - Height = 20 - Top = 173 + AnchorSideLeft.Control = FreqLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = SliceCodeDrop + AnchorSideTop.Side = asrBottom + Left = 143 + Height = 26 + Top = 146 Width = 215 - ItemHeight = 0 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + ItemHeight = 26 Items.Strings = ( 'Unknown' 'I' 'J' 'K' ) - OnSelect = ImageSzChange Style = csDropDownList TabOrder = 5 + Text = '0' end object PhaseDimDrop: TComboBox - Left = 179 - Height = 20 - Top = 209 + AnchorSideLeft.Control = FreqDimDrop + AnchorSideTop.Control = FreqDimDrop + AnchorSideTop.Side = asrBottom + Left = 143 + Height = 26 + Top = 178 Width = 215 - ItemHeight = 0 + BorderSpacing.Top = 6 + ItemHeight = 26 Items.Strings = ( 'Unknown' 'I' 'J' 'K' ) - OnSelect = ImageSzChange Style = csDropDownList TabOrder = 6 + Text = '0' end object SliceDimDrop: TComboBox - Left = 179 - Height = 20 - Top = 245 + AnchorSideLeft.Control = FreqDimDrop + AnchorSideTop.Control = PhaseDimDrop + AnchorSideTop.Side = asrBottom + Left = 143 + Height = 26 + Top = 210 Width = 215 - ItemHeight = 0 + BorderSpacing.Top = 6 + ItemHeight = 26 Items.Strings = ( 'Unknown' 'I' 'J' 'K' ) - OnSelect = ImageSzChange Style = csDropDownList TabOrder = 7 + Text = '0' end object slice_startEdit: TSpinEdit - Left = 120 - Height = 16 - Top = 73 + AnchorSideLeft.Control = toffsetEdit + AnchorSideTop.Control = Slice_durationEdit + AnchorSideTop.Side = asrBottom + Left = 95 + Height = 21 + Top = 60 Width = 112 + BorderSpacing.Top = 6 TabOrder = 2 Value = 1 end object Slice_durationEdit: TFloatSpinEdit - Left = 120 - Height = 16 - Top = 38 + AnchorSideLeft.Control = toffsetEdit + AnchorSideTop.Control = toffsetEdit + AnchorSideTop.Side = asrBottom + Left = 95 + Height = 21 + Top = 33 Width = 112 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -1069,10 +1429,15 @@ object HdrForm: THdrForm Value = 1 end object toffsetEdit: TFloatSpinEdit - Left = 120 - Height = 16 - Top = 7 + AnchorSideLeft.Control = DurationLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = fmriSheet + Left = 95 + Height = 21 + Top = 6 Width = 112 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 DecimalPlaces = 5 MaxValue = 9999999999999 MinValue = -9999999999999 @@ -1080,180 +1445,257 @@ object HdrForm: THdrForm Value = 1 end object slice_endEdit: TSpinEdit - Left = 120 - Height = 16 - Top = 104 + AnchorSideLeft.Control = toffsetEdit + AnchorSideTop.Control = slice_startEdit + AnchorSideTop.Side = asrBottom + Left = 95 + Height = 21 + Top = 87 Width = 112 + BorderSpacing.Top = 6 TabOrder = 3 Value = 1 end end - object TabUnused: TTabSheet + object OptionalSheet: TTabSheet Caption = 'Optional' - ClientHeight = 389 - ClientWidth = 595 - object Label34: TLabel - Left = 3 + ClientHeight = 346 + ClientWidth = 587 + object DataLabel: TLabel + AnchorSideLeft.Control = IntentStrLabel + AnchorSideTop.Control = data_typeEdit + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 43 - Width = 64 + Top = 35 + Width = 61 Caption = 'Data Type' ParentColor = False end - object Label5: TLabel - Left = 3 + object IntentStrLabel: TLabel + AnchorSideLeft.Control = OptionalSheet + AnchorSideTop.Control = intent_nameEdit + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 Top = 8 - Width = 57 + Width = 53 + BorderSpacing.Left = 6 Caption = 'Intention' ParentColor = False end - object Label6: TLabel - Left = 268 + object ExtentLabel: TLabel + AnchorSideLeft.Control = GMinLabel + AnchorSideTop.Control = ext + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 116 - Width = 47 + Top = 224 + Width = 45 Caption = 'Extents' ParentColor = False end - object Label9: TLabel - Left = 268 + object SessErrLabel: TLabel + AnchorSideLeft.Control = GMinLabel + AnchorSideTop.Control = ses + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 76 - Width = 82 + Top = 197 + Width = 81 Caption = 'Session Error' ParentColor = False end - object Label10: TLabel - Left = 268 + object RegLabel: TLabel + AnchorSideLeft.Control = GMinLabel + AnchorSideTop.Control = reg + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 148 - Width = 85 + Top = 251 + Width = 80 Caption = 'Regular [114]' ParentColor = False end - object Label14: TLabel - Left = 268 + object GMinLabel: TLabel + AnchorSideLeft.Control = IntentStrLabel + AnchorSideTop.Control = gmin + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 8 - Width = 37 + Top = 143 + Width = 35 Caption = 'G Min' ParentColor = False end - object Label15: TLabel - Left = 268 + object GMaxLabel: TLabel + AnchorSideLeft.Control = GMinLabel + AnchorSideTop.Control = gmax + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 43 - Width = 40 + Top = 170 + Width = 38 Caption = 'G Max' ParentColor = False end - object Label18: TLabel - Left = 3 + object AuxLabel: TLabel + AnchorSideLeft.Control = IntentStrLabel + AnchorSideTop.Control = aux + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 148 - Width = 51 + Top = 116 + Width = 47 Caption = 'Aux File' ParentColor = False end - object Label19: TLabel - Left = 3 + object DBLabel: TLabel + AnchorSideLeft.Control = IntentStrLabel + AnchorSideTop.Control = db_ + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 111 + Top = 89 Width = 57 Caption = 'DB Name' ParentColor = False end - object Label26: TLabel - Left = 3 + object NotesLabel: TLabel + AnchorSideLeft.Control = IntentStrLabel + AnchorSideTop.Control = CommentEdit + AnchorSideTop.Side = asrCenter + Left = 6 Height = 16 - Top = 76 + Top = 62 Width = 36 Caption = 'Notes' ParentColor = False end object intent_nameEdit: TEdit - Left = 76 - Height = 22 + AnchorSideLeft.Control = SessErrLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = OptionalSheet + Left = 93 + Height = 21 Top = 6 - Width = 152 + Width = 360 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 MaxLength = 16 TabOrder = 0 Text = 'intent_name' end object data_typeEdit: TEdit - Left = 76 - Height = 22 - Top = 41 - Width = 152 + AnchorSideLeft.Control = intent_nameEdit + AnchorSideTop.Control = intent_nameEdit + AnchorSideTop.Side = asrBottom + Left = 93 + Height = 21 + Top = 33 + Width = 360 + BorderSpacing.Top = 6 MaxLength = 10 TabOrder = 1 Text = 'data_type' end object CommentEdit: TEdit - Left = 76 - Height = 22 - Top = 74 - Width = 152 + AnchorSideLeft.Control = intent_nameEdit + AnchorSideTop.Control = data_typeEdit + AnchorSideTop.Side = asrBottom + Left = 93 + Height = 21 + Top = 60 + Width = 360 + BorderSpacing.Top = 6 MaxLength = 80 TabOrder = 2 Text = 'CommentEdit' end object db_: TEdit - Left = 76 - Height = 22 - Top = 109 - Width = 152 + AnchorSideLeft.Control = intent_nameEdit + AnchorSideTop.Control = CommentEdit + AnchorSideTop.Side = asrBottom + Left = 93 + Height = 21 + Top = 87 + Width = 360 + BorderSpacing.Top = 6 MaxLength = 18 TabOrder = 3 Text = 'db_' end object aux: TEdit - Left = 76 - Height = 22 - Top = 148 - Width = 152 + AnchorSideLeft.Control = intent_nameEdit + AnchorSideTop.Control = db_ + AnchorSideTop.Side = asrBottom + Left = 93 + Height = 21 + Top = 114 + Width = 360 + BorderSpacing.Top = 6 MaxLength = 24 TabOrder = 4 Text = 'aux' end object gmax: TSpinEdit - Left = 366 - Height = 16 - Top = 44 + AnchorSideLeft.Control = gmin + AnchorSideTop.Control = gmin + AnchorSideTop.Side = asrBottom + Left = 99 + Height = 21 + Top = 168 Width = 66 + BorderSpacing.Top = 6 TabOrder = 6 Value = 1 end object gmin: TSpinEdit - Left = 366 - Height = 16 - Top = 9 + AnchorSideLeft.Control = intent_nameEdit + AnchorSideTop.Control = aux + AnchorSideTop.Side = asrBottom + Left = 99 + Height = 21 + Top = 141 Width = 66 + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 TabOrder = 5 Value = 1 end object ses: TSpinEdit - Left = 366 - Height = 16 - Top = 77 + AnchorSideLeft.Control = gmin + AnchorSideTop.Control = gmax + AnchorSideTop.Side = asrBottom + Left = 99 + Height = 21 + Top = 195 Width = 66 + BorderSpacing.Top = 6 TabOrder = 7 Value = 1 end object ext: TSpinEdit - Left = 366 - Height = 16 - Top = 117 + AnchorSideLeft.Control = gmin + AnchorSideTop.Control = ses + AnchorSideTop.Side = asrBottom + Left = 99 + Height = 21 + Top = 222 Width = 66 + BorderSpacing.Top = 6 TabOrder = 8 Value = 1 end object reg: TSpinEdit - Left = 366 - Height = 16 - Top = 151 + AnchorSideLeft.Control = gmin + AnchorSideTop.Control = ext + AnchorSideTop.Side = asrBottom + Left = 99 + Height = 21 + Top = 249 Width = 66 + BorderSpacing.Top = 6 MaxValue = 255 TabOrder = 9 Value = 1 @@ -1263,8 +1705,8 @@ object HdrForm: THdrForm object StatusBar1: TStatusBar Left = 0 Height = 22 - Top = 374 - Width = 609 + Top = 384 + Width = 601 AutoSize = False Panels = < item @@ -1275,16 +1717,11 @@ object HdrForm: THdrForm end> SimplePanel = False end - object MainMenu1: TMainMenu - left = 424 - top = 72 + object HdrMenu: TMainMenu + left = 472 + top = 280 object File1: TMenuItem Caption = '&File' - object Open1: TMenuItem - Caption = 'Open header' - ShortCut = 16463 - OnClick = Open1Click - end object Save1: TMenuItem Caption = 'Save header' ShortCut = 16467 @@ -1335,18 +1772,17 @@ object HdrForm: THdrForm end end end - object OpenHdrDlg: TOpenDialog - FilterIndex = 0 - Options = [ofFileMustExist] - left = 456 - top = 72 - end object SaveHdrDlg: TSaveDialog OnClose = SaveHdrDlgClose - Width = 52 + Title = 'Save NIfTI header' Filter = 'NIfTI embedded header (*.nii)|*.nii|NIfTI separate header (*.hdr)|*.hdr' + left = 544 + top = 272 + end + object OpenHdrDlg: TOpenDialog FilterIndex = 0 - left = 496 + Options = [ofFileMustExist] + left = 456 top = 72 end end diff --git a/nifti_hdr_view.pas b/nifti_hdr_view.pas index 964df1b..e490fd7 100755 --- a/nifti_hdr_view.pas +++ b/nifti_hdr_view.pas @@ -3,29 +3,24 @@ interface {$H+} {$MODE DELPHI} uses -{$IFNDEF FPC} - RXSpin,capmenu, -{$ELSE} -LResources, Spin, -{$ENDIF} -{$IFNDEF Unix} ShellAPI, {$ENDIF} +LResources, Spin, + {$IFNDEF Unix} ShellAPI, {$ENDIF} SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, nifti_hdr, Menus, ComCtrls, Buttons, define_types, nifti_types; + StdCtrls, Menus, ComCtrls, Buttons, nifti_hdr, define_types, nifti_types; type { THdrForm } THdrForm = class(TForm) + OpenHdrDlg: TOpenDialog; Ymm: TFloatSpinEdit; - MainMenu1: TMainMenu; + HdrMenu: TMainMenu; File1: TMenuItem; - Open1: TMenuItem; Exit1: TMenuItem; Save1: TMenuItem; - OpenHdrDlg: TOpenDialog; SaveHdrDlg: TSaveDialog; PageControl1: TPageControl; - TabRequired: TTabSheet; - TabUnused: TTabSheet; + DimensionSheet: TTabSheet; + OptionalSheet: TTabSheet; intent_nameEdit: TEdit; data_typeEdit: TEdit; CommentEdit: TEdit; @@ -36,16 +31,16 @@ THdrForm = class(TForm) ses: TSpinEdit; ext: TSpinEdit; reg: TSpinEdit; - Label34: TLabel; - Label5: TLabel; - Label6: TLabel; - Label9: TLabel; - Label10: TLabel; - Label14: TLabel; - Label15: TLabel; - Label18: TLabel; - Label19: TLabel; - Label26: TLabel; + DataLabel: TLabel; + IntentStrLabel: TLabel; + ExtentLabel: TLabel; + SessErrLabel: TLabel; + RegLabel: TLabel; + GMinLabel: TLabel; + GMaxLabel: TLabel; + AuxLabel: TLabel; + DBLabel: TLabel; + NotesLabel: TLabel; HeaderMagicDrop: TComboBox; Label21: TLabel; Label1: TLabel; @@ -70,41 +65,41 @@ THdrForm = class(TForm) StatusBar1: TStatusBar; Label29: TLabel; Dim5Edit: TSpinEdit; - TabSheet1: TTabSheet; - Label35: TLabel; + StatSheet: TTabSheet; + IntentLabel: TLabel; IntentCodeDrop: TComboBox; intent_p1Edit: TFloatSpinEdit; intent_p2Edit: TFloatSpinEdit; intent_p3Edit: TFloatSpinEdit; - Label25: TLabel; - Label27: TLabel; - Label28: TLabel; - TabSheet2: TTabSheet; - Label11: TLabel; - Label16: TLabel; - Label17: TLabel; - Label32: TLabel; + Intent1Label: TLabel; + Intent2Label: TLabel; + Intent3Label: TLabel; + fmriSheet: TTabSheet; + OrderLabel: TLabel; + TimeLabel: TLabel; + DurationLabel: TLabel; + StartLabel: TLabel; slice_startEdit: TSpinEdit; Slice_durationEdit: TFloatSpinEdit; toffsetEdit: TFloatSpinEdit; - TabSheet3: TTabSheet; + IntensitySheet: TTabSheet; cmax: TFloatSpinEdit; cmin: TFloatSpinEdit; - Label12: TLabel; - Label13: TLabel; + MaxLabel: TLabel; + MinLabel: TLabel; Scale: TFloatSpinEdit; - Label23: TLabel; + SlopeLabel: TLabel; Intercept: TFloatSpinEdit; - Label22: TLabel; - Label30: TLabel; - Label33: TLabel; + InterceptLabel: TLabel; + CalLabel: TLabel; + DisplayLabel: TLabel; Page1: TMenuItem; Dimensions1: TMenuItem; ImageIntensity1: TMenuItem; Statistics1: TMenuItem; FunctionalMRI1: TMenuItem; Optional1: TMenuItem; - TabSheet4: TTabSheet; + ReorientSheet: TTabSheet; Rotations1: TMenuItem; srow_x0Edit: TFloatSpinEdit; srow_x1Edit: TFloatSpinEdit; @@ -137,14 +132,14 @@ THdrForm = class(TForm) PixDim6: TFloatSpinEdit; PixDim7: TFloatSpinEdit; SliceCodeDrop: TComboBox; - Label20: TLabel; + EndLabel: TLabel; slice_endEdit: TSpinEdit; FreqDimDrop: TComboBox; PhaseDimDrop: TComboBox; SliceDimDrop: TComboBox; - Label31: TLabel; - Label43: TLabel; - Label45: TLabel; + FreqLabel: TLabel; + PhaseLabel: TLabel; + SliceLabel: TLabel; QFacEdit: TFloatSpinEdit; Label46: TLabel; QFormDrop: TComboBox; @@ -155,39 +150,34 @@ THdrForm = class(TForm) procedure FormShow(Sender: TObject); procedure PageControl1Change(Sender: TObject); procedure SaveHdrDlgClose(Sender: TObject); - procedure TabRequiredContextPopup(Sender: TObject; MousePos: TPoint; + procedure DimensionSheetContextPopup(Sender: TObject; MousePos: TPoint; var Handled: Boolean); procedure WriteHdrForm (var lHdr: TMRIcroHdr); procedure ReadHdrDimensionsOnly (var lHdr: TMRIcroHdr); //reads only size dimensions: useful for computing estimated filesize procedure ReadHdrForm (var lHdr: TMRIcroHdr); //reads entire header - procedure Open1Click(Sender: TObject); procedure Save1Click(Sender: TObject); procedure TabMenuClick(Sender: TObject); procedure Exit1Click(Sender: TObject); procedure FormCreate(Sender: TObject); - procedure ImageSzChange(Sender: TObject); procedure HeaderMagicDropSelect(Sender: TObject); function OpenAndDisplayHdr (var lFilename: string; var lHdr: TMRIcroHdr): boolean; private { Private declarations } -{$IFNDEF FPC} procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES; -{$ENDIF} + public { Public declarations } end; - function OpenDialogExecute (lFilter,lCaption: string; lAllowMultiSelect: boolean): boolean; + function OpenDialogExecute (lFilter,lCaption: string; lAllowMultiSelect: boolean): boolean; + var HdrForm: THdrForm; implementation - uses nifti_img_view, render,nifti_img; -{$IFDEF FPC} + + {$R *.lfm} -{$ELSE} -{$R *.DFM} -{$ENDIF} function OpenDialogExecute (lFilter,lCaption: string; lAllowMultiSelect: boolean): boolean; begin @@ -203,6 +193,27 @@ function OpenDialogExecute (lFilter,lCaption: string; lAllowMultiSelect: boolean HdrForm.OpenHdrDlg.Options := [ofFileMustExist]; end; +function THdrForm.OpenAndDisplayHdr (var lFilename: string; var lHdr: TMRIcroHdr): boolean; +var lFileDir: string; +begin + FreeImgMemory(lHdr); + result := false; + NIFTIhdr_ClearHdr(lHdr); + if not NIFTIhdr_LoadHdr(lFilename, lHdr) then exit; + WriteHdrForm (lHdr); + lFileDir := extractfiledir(lFilename); + if lFileDir <> gTemplateDir then + OpenHdrDlg.InitialDir := lFileDir; + SaveHdrDlg.InitialDir := lFileDir; + SaveHdrDlg.FileName := lFilename; //make this default file to write + if length(lFilename) < 79 then + StatusBar1.Panels[1].text := lFilename + else + StatusBar1.Panels[1].text := extractfilename(lFilename); + StatusBar1.Panels[0].text := 'Img= '+inttostr(ComputeImageDataBytes(lHdr)); + result := true; +end; + function DropItem2DataType(lItemIndex: integer): integer; //returns NIfTI datatype number begin case lItemIndex of @@ -301,6 +312,7 @@ function DropItem2time_units (lDropItemIndex: byte): integer; //convert ComboBox end; //case end; //func DropItem2time_units + procedure THdrForm.WriteHdrForm (var lHdr: TMRIcroHdr); //writes a header to the various controls var //lCStr: string[80]; lInc: Integer; @@ -450,7 +462,6 @@ procedure THdrForm.WriteHdrForm (var lHdr: TMRIcroHdr); //writes a header to the end; //with lHdr end; - (*procedure ApplySaveDlgFilter (lSaveDlg: TSaveDialog); var lLen,lPos,lPipes,lPipesReq: integer; @@ -485,7 +496,7 @@ procedure THdrForm.SaveHdrDlgClose(Sender: TObject); -procedure THdrForm.TabRequiredContextPopup(Sender: TObject; MousePos: TPoint; +procedure THdrForm.DimensionSheetContextPopup(Sender: TObject; MousePos: TPoint; var Handled: Boolean); begin @@ -496,15 +507,14 @@ procedure THdrForm.FormShow(Sender: TObject); // ImgForm.OnLaunch; end; -procedure THdrForm.FormHide(Sender: TObject); +procedure THdrForm.PageControl1Change(Sender: TObject); begin - {$IFDEF Darwin}Application.MainForm.SetFocus;{$ENDIF} -end; +end; -procedure THdrForm.PageControl1Change(Sender: TObject); +procedure THdrForm.FormHide(Sender: TObject); begin - + {$IFDEF Darwin}Application.MainForm.SetFocus;{$ENDIF} end; procedure THdrForm.ReadHdrDimensionsOnly (var lHdr: TMRIcroHdr); //reads only size dimensions: useful for computing estimated filesize @@ -528,10 +538,6 @@ procedure THdrForm.ReadHdrDimensionsOnly (var lHdr: TMRIcroHdr); //reads only si vox_offset := OffsetEdit.value; DataType := DropItem2DataType(FTypeDrop.ItemIndex); bitpix := DataType2BitsPerVoxel(DataType); - if Endian.ItemIndex = 0 then - lHdr.DiskDataNativeEndian := true - else - lHdr.DiskDataNativeEndian := false; end; //with NIfTIhdr end; //proc ReadHdrDimensionsOnly @@ -630,48 +636,32 @@ procedure THdrForm.ReadHdrForm (var lHdr: TMRIcroHdr); //read the values the use //zero_intercept := intercept.value; end; -function THdrForm.OpenAndDisplayHdr (var lFilename: string; var lHdr: TMRIcroHdr): boolean; -var lFileDir: string; -begin - FreeImgMemory(lHdr); - result := false; - NIFTIhdr_ClearHdr(lHdr); - if not NIFTIhdr_LoadHdr(lFilename, lHdr) then exit; - WriteHdrForm (lHdr); - lFileDir := extractfiledir(lFilename); - if lFileDir <> gTemplateDir then - OpenHdrDlg.InitialDir := lFileDir; - SaveHdrDlg.InitialDir := lFileDir; - SaveHdrDlg.FileName := lFilename; //make this default file to write - if length(lFilename) < 79 then - StatusBar1.Panels[1].text := lFilename - else - StatusBar1.Panels[1].text := extractfilename(lFilename); - StatusBar1.Panels[0].text := 'Img= '+inttostr(ComputeImageDataBytes(lHdr)); - result := true; -end; - -procedure THdrForm.Open1Click(Sender: TObject); -var lHdr: TMRIcroHdr; - lFilename: string; -begin - //NIfTI (*.hdr;*.nii)|*.hdr; *.nii; *.nii.gz|NIfTI separate header (*.hdr)|*.hdr|NIfTI embedded header|*.nii|NIfTI compressed|*.nii.gz - //if not OpenHdrDlg.Execute then exit; - if not OpenDialogExecute(kImgFilter,'Select header',false) then exit; - lFilename := OpenHdrDlg.Filename; - OpenAndDisplayHdr(lFilename,lHdr); -end; - procedure THdrForm.Save1Click(Sender: TObject); -var lHdr: TMRIcroHdr; - lFilename: string; +var + lHdr: TMRIcroHdr; + lFilename,lExt: string; begin NIFTIhdr_ClearHdr(lHdr); + if (HeaderMagicDrop.ItemIndex >= 3) then begin + showmessage('Unable to save NIfTI2 headers'); + exit; + end; if not SaveHdrDlg.Execute then exit; + lExt := upcase(ExtractFileExt(SaveHdrDlg.Filename)); + if (lExt = '.GZ') or (lExt = '.NII.GZ') then begin + showmessage('Unable to save .nii.gz headers (first ungzip your image if you wish to edit the header)'); + exit; + end; + NIFTIhdr_ClearHdr(lHdr); //important: reset values like first 4 bytes = 348 + ReadHdrForm (lHdr); + if (lExt <> '.HDR') and (lExt <> '.NII') then begin + if lHdr.NIFTIhdr.magic = kNIFTI_MAGIC_SEPARATE_HDR then + SaveHdrDlg.Filename := SaveHdrDlg.Filename +'.hdr' + else + SaveHdrDlg.Filename := SaveHdrDlg.Filename +'.nii'; + end; lFilename := SaveHdrDlg.Filename; - OpenHdrDlg.InitialDir := extractfiledir(lFilename); //999 ImgForm.SaveDialog1.InitialDir := extractfiledir(lFilename); - ReadHdrForm (lHdr); if not NIFTIhdr_SaveHdr (lFilename, lHdr,true) then exit; OpenHdrDlg.FileName := lFilename; //make this default file to open StatusBar1.Panels[1].text := 'wrote: '+lFilename; @@ -687,25 +677,6 @@ procedure THdrForm.Exit1Click(Sender: TObject); //Quit the program or form Close; end; - {$IFNDEF FPC} -procedure THdrForm.WMDropFiles(var Msg: TWMDropFiles); //implement drag and drop -//NOTE: requires 'ShellAPI' in uses clause -var lHdr: TMRIcroHdr; - CFileName: array[0..MAX_PATH] of Char; - lFilename: string; -begin - try - if DragQueryFile(Msg.Drop, 0, CFileName, MAX_PATH) > 0 then - begin - lFilename := CFilename; - OpenAndDisplayHdr(lFileName, lHdr); - Msg.Result := 0; - end; - finally - DragFinish(Msg.Drop); - end; -end; - {$ENDIF} procedure THdrForm.FormCreate(Sender: TObject); var lHdr: TMRIcroHdr; @@ -717,7 +688,7 @@ procedure THdrForm.FormCreate(Sender: TObject); HdrForm.WriteHdrForm (lHdr); //show default header {$IFDEF Darwin} {$IFNDEF LCLgtk} //only for Carbon compile - Open1.ShortCut := ShortCut(Word('O'), [ssMeta]); + //Open1.ShortCut := ShortCut(Word('O'), [ssMeta]); Save1.ShortCut := ShortCut(Word('S'), [ssMeta]); Exit1.ShortCut := ShortCut(Word('W'), [ssMeta]); Dimensions1.ShortCut := ShortCut(Word('A'), [ssMeta]); @@ -730,15 +701,6 @@ procedure THdrForm.FormCreate(Sender: TObject); {$ENDIF} end; -procedure THdrForm.ImageSzChange(Sender: TObject); //report size of image data -var - lHdr: TMRIcroHdr; -begin - NIFTIhdr_ClearHdr(lHdr); //important: reset values like first 4 bytes = 348 - ReadHdrDimensionsOnly(lHdr); - StatusBar1.Panels[0].text := 'Img= '+inttostr(ComputeImageDataBytes(lHdr)); -end; - procedure THdrForm.HeaderMagicDropSelect(Sender: TObject); var lHdrIndex: integer; begin diff --git a/nifti_img.pas b/nifti_img.pas index adcfd29..42d4df5 100755 --- a/nifti_img.pas +++ b/nifti_img.pas @@ -5577,10 +5577,12 @@ function OpenImg(var lBackgroundImg: TBGImg; var lImg2Load: TMRIcroHdr; lLoadBac else lFileSz := (lnVol * lMultiImgSz) + lOffset; lVol := 1; //assume 1st volume - if {not l4D} lBackgroundImg.Prompt4DVolume then begin + if lBackgroundImg.Prompt4DVolume then begin lVol := ReadIntForm.GetInt('Multi-volume file, please select volume to view.',1,1,lnVol); application.processmessages; end; + if (lVol < 1) then lVol := 1; + if (lVol > lnVol) then lVol := lnVol; end else lFileSz := lMultiImgSzOff; if ((lFileSz) > lFSz) and (lImg2Load.gzBytesX = K_gzBytes_headerAndImageUncompressed) then begin @@ -5902,9 +5904,10 @@ function OpenImg(var lBackgroundImg: TBGImg; var lImg2Load: TMRIcroHdr; lLoadBac createLutLabel (lImg2Load.LUT, 1.0); lImg2Load.WindowScaledMin := kMin8bit; lImg2Load.WindowScaledMax := 255; - (*lImg2Load.WindowScaledMin := 0;//kMin8bit; + lImg2Load.UsesCustomPaletteRandomRainbow := true;//must be done - see Inia template + lImg2Load.WindowScaledMin := 0;//kMin8bit; lImg2Load.WindowScaledMax := 100;//255; - lImg2Load.UsesCustomPaletteRandomRainbow := true; *) + (*lImg2Load.UsesCustomPaletteRandomRainbow := true; *) end else begin lImg2Load.WindowScaledMin := kMin8bit; lImg2Load.WindowScaledMax := 255; diff --git a/nifti_img_view.lfm b/nifti_img_view.lfm index 3696790..1c2165e 100755 --- a/nifti_img_view.lfm +++ b/nifti_img_view.lfm @@ -1,13 +1,13 @@ object ImgForm: TImgForm - Left = 162 - Height = 401 - Top = 212 - Width = 1018 + Left = 145 + Height = 480 + Top = 158 + Width = 1135 ActiveControl = ControlPanel AllowDropFiles = True Caption = 'MRIcron' - ClientHeight = 374 - ClientWidth = 1018 + ClientHeight = 480 + ClientWidth = 1135 KeyPreview = True Menu = MainMenu1 OnClose = FormClose @@ -19,17 +19,19 @@ object ImgForm: TImgForm OnResize = FormResize OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.9.0.0' + LCLVersion = '2.1.0.0' object ControlPanel: TPanel Tag = 1 Left = 0 - Height = 36 + Height = 38 Top = 0 - Width = 1018 + Width = 1135 Align = alTop + AutoSize = True BevelOuter = bvNone - ClientHeight = 36 - ClientWidth = 1018 + BorderWidth = 1 + ClientHeight = 38 + ClientWidth = 1135 ParentColor = False ParentFont = False ParentShowHint = False @@ -38,22 +40,31 @@ object ImgForm: TImgForm OnClick = ControlPanelClick OnDblClick = ControlPanelDblClick object LayerPanel: TPanel - Left = 274 + AnchorSideLeft.Control = SlicePanel + AnchorSideLeft.Side = asrBottom + Left = 364 Height = 36 - Top = 0 - Width = 410 + Top = 1 + Width = 454 + AutoSize = True + BorderSpacing.Left = 4 BevelOuter = bvNone ClientHeight = 36 - ClientWidth = 410 + ClientWidth = 454 ParentColor = False ParentFont = False TabOrder = 1 object LayerDrop: TComboBox - Left = 0 - Height = 25 - Top = 6 - Width = 104 - ItemHeight = 0 + AnchorSideLeft.Control = LayerPanel + AnchorSideTop.Control = LayerPanel + AnchorSideTop.Side = asrCenter + Left = 4 + Height = 20 + Top = 8 + Width = 128 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 + ItemHeight = 26 ItemIndex = 0 Items.Strings = ( 'Background' @@ -68,10 +79,15 @@ object ImgForm: TImgForm Text = 'Background' end object MinWindowEdit: TFloatSpinEdit - Left = 144 - Height = 29 - Top = 6 + AnchorSideLeft.Control = AutoContrastPanel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = LayerDrop + AnchorSideTop.Side = asrCenter + Left = 174 + Height = 21 + Top = 8 Width = 80 + BorderSpacing.Left = 4 DecimalPlaces = 5 MaxValue = 9999999 MinValue = -9999999 @@ -81,10 +97,15 @@ object ImgForm: TImgForm Value = 3 end object MaxWindowEdit: TFloatSpinEdit - Left = 228 - Height = 29 - Top = 6 + AnchorSideLeft.Control = MinWindowEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = LayerDrop + AnchorSideTop.Side = asrCenter + Left = 258 + Height = 21 + Top = 8 Width = 80 + BorderSpacing.Left = 4 DecimalPlaces = 5 MaxValue = 9999999 MinValue = -9999999 @@ -94,12 +115,16 @@ object ImgForm: TImgForm Value = 1 end object LUTdrop: TComboBox - Left = 308 - Height = 29 - Top = 6 - Width = 100 + AnchorSideLeft.Control = MaxWindowEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = LayerDrop + Left = 342 + Height = 20 + Top = 8 + Width = 112 + BorderSpacing.Left = 4 DropDownCount = 66 - ItemHeight = 0 + ItemHeight = 26 OnChange = LUTdropChange OnSelect = LUTdropSelect ParentFont = False @@ -107,12 +132,20 @@ object ImgForm: TImgForm ShowHint = True Style = csDropDownList TabOrder = 3 + Text = '0' end object AutoContrastPanel: TPanel - Left = 104 + AnchorSideLeft.Control = LayerDrop + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = LayerPanel + AnchorSideTop.Side = asrCenter + Left = 134 Height = 36 Top = 0 Width = 36 + AutoSize = True + BorderSpacing.Left = 2 + BorderSpacing.Top = 2 BevelOuter = bvNone ClientHeight = 36 ClientWidth = 36 @@ -123,7 +156,7 @@ object ImgForm: TImgForm Height = 36 Top = 0 Width = 36 - Align = alClient + Align = alNone ButtonHeight = 32 ButtonWidth = 32 Caption = 'AutoContrastToolBar' @@ -145,13 +178,18 @@ object ImgForm: TImgForm end end object ToolPanel: TPanel - Left = 820 + AnchorSideLeft.Control = ViewPanel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ControlPanel + Left = 960 Height = 36 - Top = 0 - Width = 170 + Top = 1 + Width = 168 + AutoSize = True + BorderSpacing.Left = 4 BevelOuter = bvNone ClientHeight = 36 - ClientWidth = 170 + ClientWidth = 168 ParentFont = False TabOrder = 0 Visible = False @@ -228,21 +266,27 @@ object ImgForm: TImgForm end end object ViewPanel: TPanel - Left = 688 + AnchorSideLeft.Control = LayerPanel + AnchorSideLeft.Side = asrBottom + Left = 820 Height = 36 - Top = 0 + Top = 1 Width = 136 + AutoSize = True + BorderSpacing.Left = 2 BevelOuter = bvNone ClientHeight = 36 ClientWidth = 136 ParentFont = False TabOrder = 2 object ViewToolBar: TToolBar + AnchorSideTop.Control = ViewPanel + AnchorSideTop.Side = asrCenter Left = 0 Height = 36 Top = 0 Width = 136 - Align = alClient + Align = alNone ButtonHeight = 32 ButtonWidth = 32 EdgeBorders = [] @@ -261,6 +305,8 @@ object ImgForm: TImgForm OnClick = LutFromZeroBtnClick end object ColorBarBtn: TToolButton + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Side = asrCenter Left = 33 Hint = 'Draw color range ' Top = 0 @@ -290,49 +336,71 @@ object ImgForm: TImgForm end end object SlicePanel: TPanel - Left = 0 - Height = 36 - Top = 0 - Width = 274 + AnchorSideTop.Control = ControlPanel + AnchorSideTop.Side = asrCenter + Left = 1 + Height = 22 + Top = 8 + Width = 359 + AutoSize = True BevelOuter = bvNone - ClientHeight = 36 - ClientWidth = 274 + ClientHeight = 22 + ClientWidth = 359 ParentFont = False TabOrder = 3 object LabelX: TLabel + AnchorSideLeft.Control = SlicePanel + AnchorSideTop.Control = XViewEdit + AnchorSideTop.Side = asrCenter Left = 4 - Height = 19 - Top = 10 - Width = 11 + Height = 16 + Top = 3 + Width = 9 + BorderSpacing.Left = 4 Caption = 'X' ParentColor = False ParentFont = False end object LabelY: TLabel - Left = 74 - Height = 19 - Top = 10 - Width = 10 + AnchorSideLeft.Control = XViewEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = XViewEdit + AnchorSideTop.Side = asrCenter + Left = 103 + Height = 16 + Top = 3 + Width = 8 + BorderSpacing.Left = 6 Caption = 'Y' ParentColor = False ParentFont = False end object LabelZ: TLabel - Left = 141 - Height = 19 - Top = 10 - Width = 11 + AnchorSideLeft.Control = YViewEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = XViewEdit + AnchorSideTop.Side = asrCenter + Left = 201 + Height = 16 + Top = 3 + Width = 9 + BorderSpacing.Left = 6 Caption = 'Z' ParentColor = False ParentFont = False end object ZoomDrop: TComboBox - Left = 212 - Height = 25 - Top = 6 + AnchorSideLeft.Control = ZViewEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = XViewEdit + AnchorSideTop.Side = asrCenter + Left = 300 + Height = 20 + Top = 1 Width = 59 + BorderSpacing.Left = 6 DropDownCount = 12 - ItemHeight = 0 + ItemHeight = 26 Items.Strings = ( 'Fit' 'Int' @@ -353,23 +421,34 @@ object ImgForm: TImgForm ShowHint = True Style = csDropDownList TabOrder = 0 + Text = '0' end object XViewEdit: TSpinEdit - Left = 18 - Height = 29 - Top = 9 - Width = 52 + AnchorSideLeft.Control = LabelX + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = SlicePanel + AnchorSideTop.Side = asrCenter + Left = 17 + Height = 21 + Top = 1 + Width = 80 + BorderSpacing.Left = 4 MinValue = 1 OnChange = XViewEditChange ParentFont = False TabOrder = 1 - Value = 100 + Value = 98 end object YViewEdit: TSpinEdit - Left = 86 - Height = 29 - Top = 9 - Width = 52 + AnchorSideLeft.Control = LabelY + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = XViewEdit + AnchorSideTop.Side = asrCenter + Left = 115 + Height = 21 + Top = 1 + Width = 80 + BorderSpacing.Left = 4 MinValue = 1 OnChange = XViewEditChange ParentFont = False @@ -377,10 +456,15 @@ object ImgForm: TImgForm Value = 30 end object ZViewEdit: TSpinEdit - Left = 153 - Height = 29 - Top = 9 - Width = 52 + AnchorSideLeft.Control = LabelZ + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = XViewEdit + AnchorSideTop.Side = asrCenter + Left = 214 + Height = 21 + Top = 1 + Width = 80 + BorderSpacing.Left = 4 MinValue = 1 OnChange = XViewEditChange ParentFont = False @@ -391,28 +475,28 @@ object ImgForm: TImgForm end object MagPanel: TPanel Left = 0 - Height = 20 - Top = 354 - Width = 1018 + Height = 16 + Top = 464 + Width = 1135 Align = alBottom AutoSize = True BevelOuter = bvNone - ClientHeight = 20 - ClientWidth = 1018 + ClientHeight = 16 + ClientWidth = 1135 ParentFont = False TabOrder = 1 object StatusLabel: TLabel Left = 0 - Height = 19 + Height = 16 Top = 0 - Width = 170 + Width = 127 Caption = ' No Images Loaded ' ParentColor = False ParentFont = False end object ProgressBar1: TProgressBar - Left = 906 - Height = 20 + Left = 1023 + Height = 16 Top = 0 Width = 112 Align = alRight @@ -423,26 +507,27 @@ object ImgForm: TImgForm end object Panel1: TPanel Left = 0 - Height = 318 - Top = 36 - Width = 1018 + Height = 426 + Top = 38 + Width = 1135 Align = alClient BevelOuter = bvNone - ClientHeight = 318 - ClientWidth = 1018 + ClientHeight = 426 + ClientWidth = 1135 ParentFont = False TabOrder = 2 object TriplePanel: TScrollBox Tag = 666 Left = 0 - Height = 318 + Height = 426 Top = 0 - Width = 1018 + Width = 1135 HorzScrollBar.Page = 584 VertScrollBar.Page = 190 Align = alClient - ClientHeight = 314 - ClientWidth = 1014 + BorderStyle = bsNone + ClientHeight = 426 + ClientWidth = 1135 Constraints.MinWidth = 4 Color = clBlack ParentColor = False diff --git a/nifti_img_view.pas b/nifti_img_view.pas index 07e3629..19fa4f5 100755 --- a/nifti_img_view.pas +++ b/nifti_img_view.pas @@ -1,5 +1,6 @@ unit nifti_img_view; {$mode delphi} +{$DEFINE DICOMdrop} //drag and drop DICOM interface {$IFDEF UNIX} {$IFNDEF ENDIAN_BIG}{$DEFINE COMPILEYOKE}{$ENDIF} //not supported on PPC @@ -18,6 +19,7 @@ interface {$IFDEF COMPILEYOKE} yokesharemem, {$ENDIF} +{$IFDEF DICOMdrop} dcm_load, {$ENDIF} {$IFDEF FPC} fphttpclient, strutils, {$ENDIF} LResources, fx8, cpucount, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Menus, ComCtrls, ExtCtrls, StdCtrls, GraphicsMathLibrary, ClipBrd, @@ -715,6 +717,7 @@ procedure WriteIni2Form (lBGImg: TBGImg); procedure TImgForm.SetIniMenus; begin XBarBtn.Down := gBGImg.XBarVisible; + CrossHair1.Checked:= XBarBtn.Down; YokeMenu.Checked := gYoke; if (gBGImg.StretchQuality = sqLow) then Menu2DSmooth.checked := false @@ -1459,11 +1462,22 @@ procedure TImgForm.OpenTemplateMRU(Sender: TObject);//open template or MRU function TImgForm.OpenAndDisplayImg(var lFilename: string; lAdd2MRU: boolean): boolean; var lVal: integer; + x: string; + isTempNii: boolean = false; begin Result := false; - + {$IFDEF DICOMdrop} + if not IsNIfTIHdrExt(lFilename) then begin + x := dcm2niiForm.FindDicom2niixPath(''); + if fileexists(x) then begin + lFilename := dcm2Nifti(x, lFilename); + if fileexists(lFilename) and (lFilename <> x) then + isTempNii := true; + end; + end; + {$ENDIF} + if (DirectoryExists(lFilename)) then exit; if (FSize(lFilename)) < 348 then exit; //to small to be a header or DICOM image - if not HdrForm.OpenAndDisplayHdr(lFilename,gMRIcroOverlay[kBGOverlayNum]) then exit; @@ -1517,6 +1531,8 @@ function TImgForm.OpenAndDisplayImg(var lFilename: string; lAdd2MRU: boolean): b {$ENDIF} //showmessage(lFilename+' 666 '+ChangeFileext(lFilename,'.anat')); AnatForm.OpenAnat( ChangeFileextx(lFilename,'.anat')); + if isTempNii then + deletefile(lFilename); end; //OpenAndDisplayImg {$IFNDEF FPC} @@ -1577,6 +1593,7 @@ procedure TImgForm.ToolSelectClick(Sender: TObject); case (Sender as TMenuItem).Tag of 0: begin XBarBtn.Down := not XBarBtn.Down; + CrossHair1.Checked := XBarBtn.Down; {$IFDEF Darwin} XBarbtnClick(nil); exit;{$ENDIF} end; 2: PenBtn.Down := true; @@ -1812,7 +1829,9 @@ procedure TImgForm.FormCreate(Sender: TObject); LoadMonochromeLUT(lInc,gBGImg,gMRIcroOverlay[kVOIOverlayNum]); SetBGImgDefaults(gBGImg); CloseImagesClick(nil); - gColorSchemeDir := extractfilepath(paramstr(0))+'lut'; + gColorSchemeDir := extractfilepath(paramstr(0))+'Resources'+pathdelim+'lut'; + if not fileexists(gColorSchemeDir) then + gColorSchemeDir := extractfilepath(paramstr(0))+'lut'; {$IFDEF Darwin} if not fileexists(gColorSchemeDir) then gColorSchemeDir := AppDir + 'lut'; @@ -1836,7 +1855,9 @@ procedure TImgForm.FormCreate(Sender: TObject); YokeMenu.visible := false; {$ENDIF} {$ENDIF} - gTemplateDir := extractfilepath(paramstr(0))+'templates'; + gTemplateDir := extractfilepath(paramstr(0))+'Resources'+pathdelim+'templates'; + if not fileexists(gTemplateDir) then + gTemplateDir := extractfilepath(paramstr(0))+'templates'; {$IFDEF Darwin} if not fileexists(gTemplateDir) then gTemplateDir := AppDir + 'templates'; @@ -2095,6 +2116,7 @@ procedure AdjustContrastRectangle (lImage: TImage); begin lPanel := SelectedImageNum; lLayer := ImgForm.ActiveLayer; + if gMRIcroOverlay[lLayer].UsesCustomPaletteRandomRainbow then exit; XYscrn2Img (lImage,lPanel,gSelectRect.Left,gSelectRect.Top, lXout,lYOut,lZOut); lMinInten := ImgIntensity(gMRIcroOverlay[lLayer],lXout,lYOut,lZOut); lMaxInten := lMinInten; @@ -2554,6 +2576,7 @@ procedure TImgForm.ColorBarBtnMouseDown(Sender: TObject; procedure TImgForm.XBarBtnClick(Sender: TObject); begin gBGImg.XBarVisible := XBarBtn.Down; + CrossHair1.Checked := XBarBtn.Down; RefreshImagesTimer.Enabled := true; end; @@ -5054,7 +5077,9 @@ procedure TImgForm.CheckForUpdates(Sender: TObject); {$IFDEF LCLCocoa} procedure TImgForm.SetDarkMode; begin - setThemeMode(Self.Handle, gBGImg.DarkMode); + //setThemeMode(Self.Handle, gBGImg.DarkMode); + setThemeMode(Self, gBGImg.DarkMode); + end; {$ENDIF} diff --git a/nsappkitext.pas b/nsappkitext.pas index 9dc4612..21629a0 100644 --- a/nsappkitext.pas +++ b/nsappkitext.pas @@ -6,92 +6,70 @@ interface uses - CocoaAll, LCLType; - -type - NSAppearance = objcclass external (NSObject, NSCodingProtocol) - private - _name : NSString; - _bundle : NSBundle; - _private : Pointer; - _reserved : id; - _auxilary : id; - {$ifdef CPU32} - _extra : array [0..1] of id; - {$endif} - - public - procedure encodeWithCoder(aCoder: NSCoder); message 'encodeWithCoder:'; - function initWithCoder(aDecoder: NSCoder): id; message 'initWithCoder:'; - - function name: NSString; message 'name'; - - // Setting and identifying the current appearance in the thread. - class function currentAppearance: NSAppearance; message 'currentAppearance'; - // nil is valid and indicates the default appearance. - class procedure setCurrentAppearance(appearance: NSAppearance); message 'setCurrentAppearance:'; - - // Finds and returns an NSAppearance based on the name. - // For standard appearances such as NSAppearanceNameAqua, a built-in appearance is returned. - // For other names, the main bundle is searched. - class function appearanceNamed(aname: NSString): NSAppearance; message 'appearanceNamed:'; - - {/* Creates an NSAppearance by searching the specified bundle for a file with the specified name (without path extension). - If bundle is nil, the main bundle is assumed. - */ - #if NS_APPEARANCE_DECLARES_DESIGNATED_INITIALIZERS - - (nullable instancetype)initWithAppearanceNamed:(NSString *)name bundle:(nullable NSBundle *)bundle NS_DESIGNATED_INITIALIZER; - - (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER; - #endif} - - // Query allowsVibrancy to see if the given appearance actually needs vibrant drawing. - // You may want to draw differently if the current apperance is vibrant. - function allowsVibrancy: Boolean; message 'allowsVibrancy'; - end; - procedure setThemeMode(FormHandle: HWND; isDarkMode: boolean); + CocoaAll, LCLType,Classes, SysUtils, Controls, LCLClasses; + + procedure setThemeMode(Owner: TComponent; isDarkMode: boolean); +implementation +function ComponentToNSWindow(Owner: TComponent): NSWindow; var - NSAppearanceNameAqua: NSString; cvar; external; - // Light content should use the default Aqua apppearance. - NSAppearanceNameLightContent: NSString; cvar; external; // deprecated - - // The following two Vibrant appearances should only be set on an NSVisualEffectView, or one of its container subviews. - NSAppearanceNameVibrantDark : NSString; cvar; external; - NSAppearanceNameVibrantLight: NSString; cvar; external; - -type - //it's actually a protocol! - NSAppearanceCustomization = objccategory external (NSObject) - procedure setAppearance(aappearance: NSAppearance); message 'setAppearance:'; - function appearance: NSAppearance; message 'appearance'; - - // This returns the appearance that would be used when drawing the receiver, taking inherited appearances into account. - // - function effectiveAppearance: NSAppearance; message 'effectiveAppearance'; - end; + obj : NSObject; +begin + Result := nil; + if not Assigned(Owner) or not (Owner is TWinControl) then Exit; + obj := NSObject(TWinControl(Owner).Handle); + if not Assigned(obj) then Exit; + + if obj.respondsToSelector(ObjCSelector('window')) then + Result := objc_msgSend(obj, ObjCSelector('window')); +end; + +const + macOSNSAppearanceNameAqua = 'NSAppearanceNameAqua'; + DefaultAppearance = macOSNSAppearanceNameAqua; + macOSNSAppearanceNameVibrantDark = 'NSAppearanceNameVibrantDark'; + macOSNSAppearanceNameVibrantLight = 'NSAppearanceNameVibrantLight'; -implementation -procedure setThemeMode(FormHandle: HWND; isDarkMode: boolean); +function UpdateAppearance(Owner: TComponent; const AAppearance: String): Boolean; var - theWindow : CocoaAll.NSWindow; + cls : id; + ap : string; + apr : id; + win : NSWindow; begin - theWindow := NSView(FormHandle).window; - if isDarkMode then - theWindow.setAppearance (NSAppearance.appearanceNamed(NSAppearanceNameVibrantDark)) - else - theWindow.setAppearance (NSAppearance.appearanceNamed(NSAppearanceNameAqua)); - theWindow.invalidateShadow; - //window.invalidateShadow() + Result := false; + + win := ComponentToNSWindow(Owner); + if not Assigned(win) then Exit; + if AAppearance = '' + then ap := DefaultAppearance + else ap := AAppearance; + + cls := NSClassFromString( NSSTR('NSAppearance')); + if not Assigned(cls) then Exit; // not suppored in OSX version + + apr := objc_msgSend(cls, ObjCSelector('appearanceNamed:'), NSSTR(@ap[1])); + if not Assigned(apr) then Exit; + + if win.respondsToSelector(ObjCSelector('setAppearance:')) then + begin + objc_msgSend(win, ObjCSelector('setAppearance:'), apr); + Result := true; + end; end; -(*{$IFDEF LCLCocoa} -{$mode objfpc}{$H+} -{$modeswitch objectivec2} -{$ENDIF} *) + +procedure setThemeMode(Owner: TComponent; isDarkMode: boolean); +begin + if (isDarkMode) then + UpdateAppearance(Owner, macOSNSAppearanceNameVibrantDark) + else + UpdateAppearance(Owner, DefaultAppearance); +end; end. diff --git a/nsappkitext_old.pas b/nsappkitext_old.pas new file mode 100644 index 0000000..9dc4612 --- /dev/null +++ b/nsappkitext_old.pas @@ -0,0 +1,97 @@ +unit nsappkitext; + +{$mode objfpc}{$H+} +{$modeswitch objectivec2} + +interface + +uses + CocoaAll, LCLType; + +type + NSAppearance = objcclass external (NSObject, NSCodingProtocol) + private + _name : NSString; + _bundle : NSBundle; + _private : Pointer; + _reserved : id; + _auxilary : id; + {$ifdef CPU32} + _extra : array [0..1] of id; + {$endif} + + public + procedure encodeWithCoder(aCoder: NSCoder); message 'encodeWithCoder:'; + function initWithCoder(aDecoder: NSCoder): id; message 'initWithCoder:'; + + function name: NSString; message 'name'; + + // Setting and identifying the current appearance in the thread. + class function currentAppearance: NSAppearance; message 'currentAppearance'; + // nil is valid and indicates the default appearance. + class procedure setCurrentAppearance(appearance: NSAppearance); message 'setCurrentAppearance:'; + + // Finds and returns an NSAppearance based on the name. + // For standard appearances such as NSAppearanceNameAqua, a built-in appearance is returned. + // For other names, the main bundle is searched. + class function appearanceNamed(aname: NSString): NSAppearance; message 'appearanceNamed:'; + + {/* Creates an NSAppearance by searching the specified bundle for a file with the specified name (without path extension). + If bundle is nil, the main bundle is assumed. + */ + #if NS_APPEARANCE_DECLARES_DESIGNATED_INITIALIZERS + - (nullable instancetype)initWithAppearanceNamed:(NSString *)name bundle:(nullable NSBundle *)bundle NS_DESIGNATED_INITIALIZER; + - (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER; + #endif} + + // Query allowsVibrancy to see if the given appearance actually needs vibrant drawing. + // You may want to draw differently if the current apperance is vibrant. + function allowsVibrancy: Boolean; message 'allowsVibrancy'; + end; + procedure setThemeMode(FormHandle: HWND; isDarkMode: boolean); + + +var + NSAppearanceNameAqua: NSString; cvar; external; + // Light content should use the default Aqua apppearance. + NSAppearanceNameLightContent: NSString; cvar; external; // deprecated + + // The following two Vibrant appearances should only be set on an NSVisualEffectView, or one of its container subviews. + NSAppearanceNameVibrantDark : NSString; cvar; external; + NSAppearanceNameVibrantLight: NSString; cvar; external; + +type + //it's actually a protocol! + NSAppearanceCustomization = objccategory external (NSObject) + procedure setAppearance(aappearance: NSAppearance); message 'setAppearance:'; + function appearance: NSAppearance; message 'appearance'; + + // This returns the appearance that would be used when drawing the receiver, taking inherited appearances into account. + // + function effectiveAppearance: NSAppearance; message 'effectiveAppearance'; + end; + + +implementation + +procedure setThemeMode(FormHandle: HWND; isDarkMode: boolean); +var + theWindow : CocoaAll.NSWindow; +begin + theWindow := NSView(FormHandle).window; + if isDarkMode then + theWindow.setAppearance (NSAppearance.appearanceNamed(NSAppearanceNameVibrantDark)) + else + theWindow.setAppearance (NSAppearance.appearanceNamed(NSAppearanceNameAqua)); + theWindow.invalidateShadow; + //window.invalidateShadow() + +end; + +(*{$IFDEF LCLCocoa} +{$mode objfpc}{$H+} +{$modeswitch objectivec2} +{$ENDIF} *) + +end. + diff --git a/perisettings.lfm b/perisettings.lfm index 56c68a2..1345648 100755 --- a/perisettings.lfm +++ b/perisettings.lfm @@ -1,125 +1,171 @@ object PSForm: TPSForm - Left = 1058 - Height = 398 - Top = 420 - Width = 370 + Left = 366 + Height = 246 + Top = 180 + Width = 334 HorzScrollBar.Page = 369 VertScrollBar.Page = 418 ActiveControl = BinWidthEdit + AutoSize = True + BorderWidth = 4 Caption = 'Peristimulus Plot' - ClientHeight = 398 - ClientWidth = 370 - Constraints.MaxHeight = 398 - Constraints.MaxWidth = 370 - Constraints.MinHeight = 398 - Constraints.MinWidth = 370 + ClientHeight = 246 + ClientWidth = 334 OnShow = FormShow Position = poScreenCenter - LCLVersion = '0.9.29' + LCLVersion = '2.1.0.0' object Label1: TLabel - Left = 40 - Height = 14 - Top = 25 - Width = 71 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = BinWidthEdit + AnchorSideTop.Side = asrCenter + Left = 8 + Height = 16 + Top = 10 + Width = 91 + BorderSpacing.Left = 4 Caption = 'Bin width (sec)' ParentColor = False end object Label2: TLabel - Left = 40 - Height = 14 - Top = 62 - Width = 134 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = PreBinEdit + AnchorSideTop.Side = asrCenter + Left = 8 + Height = 16 + Top = 35 + Width = 173 Caption = 'Number of pre-stimulus bins' ParentColor = False end object Label3: TLabel - Left = 40 - Height = 14 - Top = 101 - Width = 139 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = PostBinEdit + AnchorSideTop.Side = asrCenter + Left = 8 + Height = 16 + Top = 60 + Width = 180 Caption = 'Number of post-stimulus bins' ParentColor = False end object BinWidthEdit: TFloatSpinEdit - Left = 232 + AnchorSideLeft.Control = Label3 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Owner + Left = 194 Height = 21 - Top = 16 + Top = 8 Width = 130 + BorderSpacing.Left = 6 + BorderSpacing.Top = 4 DecimalPlaces = 4 - Increment = 1 - MaxValue = 100 MinValue = 0 TabOrder = 0 Value = 0 end object PreBinEdit: TSpinEdit - Left = 232 + AnchorSideLeft.Control = BinWidthEdit + AnchorSideTop.Control = BinWidthEdit + AnchorSideTop.Side = asrBottom + Left = 194 Height = 21 - Top = 53 + Top = 33 Width = 130 + BorderSpacing.Top = 4 MinValue = 1 TabOrder = 1 Value = 4 end object PostBinEdit: TSpinEdit - Left = 232 + AnchorSideLeft.Control = BinWidthEdit + AnchorSideTop.Control = PreBinEdit + AnchorSideTop.Side = asrBottom + Left = 194 Height = 21 - Top = 92 + Top = 58 Width = 130 + BorderSpacing.Top = 4 MinValue = 1 TabOrder = 2 Value = 14 end object SliceTImeCheck: TCheckBox - Left = 40 - Height = 17 - Top = 132 - Width = 139 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = PostBinEdit + AnchorSideTop.Side = asrBottom + Left = 8 + Height = 18 + Top = 83 + Width = 167 + BorderSpacing.Top = 4 Caption = 'Data slice-time corrected' TabOrder = 3 end object SavePSVolCheck: TCheckBox - Left = 40 - Height = 17 - Top = 164 - Width = 145 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = SliceTImeCheck + AnchorSideTop.Side = asrBottom + Left = 8 + Height = 18 + Top = 105 + Width = 172 + BorderSpacing.Top = 4 Caption = 'Save peristimulus volumes' TabOrder = 4 end object OKBtn: TButton - Left = 280 + AnchorSideTop.Control = ModelCheck + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 251 Height = 25 - Top = 360 + Top = 215 Width = 75 + Anchors = [akTop, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 BorderSpacing.InnerBorder = 4 Caption = 'OK' ModalResult = 1 TabOrder = 5 end object PctSignalCheck: TCheckBox - Left = 40 - Height = 17 - Top = 200 - Width = 62 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = SavePSVolCheck + AnchorSideTop.Side = asrBottom + Left = 8 + Height = 18 + Top = 127 + Width = 71 + BorderSpacing.Top = 4 Caption = '% Signal' Checked = True State = cbChecked TabOrder = 6 end object ModelCheck: TCheckBox - Left = 80 - Height = 17 - Top = 320 - Width = 192 + AnchorSideLeft.Control = TDCheck + AnchorSideTop.Control = TDCheck + AnchorSideTop.Side = asrBottom + Left = 20 + Height = 18 + Top = 193 + Width = 223 + BorderSpacing.Top = 4 Caption = 'Report modeled, not observed data' TabOrder = 7 Visible = False end object RegressCheck: TCheckBox - Left = 40 - Height = 17 - Top = 240 - Width = 116 + AnchorSideLeft.Control = Label1 + AnchorSideTop.Control = PctSignalCheck + AnchorSideTop.Side = asrBottom + Left = 8 + Height = 18 + Top = 149 + Width = 134 + BorderSpacing.Top = 4 Caption = 'Remove Regressors' Checked = True OnClick = RegressCheckClick @@ -127,10 +173,15 @@ object PSForm: TPSForm TabOrder = 8 end object TDCheck: TCheckBox - Left = 80 - Height = 17 - Top = 280 - Width = 181 + AnchorSideLeft.Control = RegressCheck + AnchorSideTop.Control = RegressCheck + AnchorSideTop.Side = asrBottom + Left = 20 + Height = 18 + Top = 171 + Width = 211 + BorderSpacing.Left = 12 + BorderSpacing.Top = 4 Caption = 'Also Remove Temporal Derivative' Checked = True State = cbChecked diff --git a/perisettings.lrs b/perisettings.lrs index b4de369..4b8f931 100755 --- a/perisettings.lrs +++ b/perisettings.lrs @@ -1,37 +1,65 @@ +{ This is an automatically generated lazarus resource file } + LazarusResources.Add('TPSForm','FORMDATA',[ - 'TPF0'#7'TPSForm'#6'PSForm'#4'Left'#3'"'#4#6'Height'#3#142#1#3'Top'#3#164#1#5 - +'Width'#3'r'#1#18'HorzScrollBar.Page'#3'q'#1#18'VertScrollBar.Page'#3#162#1 - +#13'ActiveControl'#7#12'BinWidthEdit'#7'Caption'#6#17'Peristimulus Plot'#12 - +'ClientHeight'#3#142#1#11'ClientWidth'#3'r'#1#21'Constraints.MaxHeight'#3#142 - +#1#20'Constraints.MaxWidth'#3'r'#1#21'Constraints.MinHeight'#3#142#1#20'Cons' - +'traints.MinWidth'#3'r'#1#6'OnShow'#7#8'FormShow'#8'Position'#7#14'poScreenC' - +'enter'#10'LCLVersion'#6#6'0.9.29'#0#6'TLabel'#6'Label1'#4'Left'#2'('#6'Heig' - +'ht'#2#14#3'Top'#2#25#5'Width'#2'G'#7'Caption'#6#15'Bin width (sec)'#11'Pare' - +'ntColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2'('#6'Height'#2#14#3'Top'#2'>'#5 - +'Width'#3#134#0#7'Caption'#6#27'Number of pre-stimulus bins'#11'ParentColor' - +#8#0#0#6'TLabel'#6'Label3'#4'Left'#2'('#6'Height'#2#14#3'Top'#2'e'#5'Width'#3 - +#139#0#7'Caption'#6#28'Number of post-stimulus bins'#11'ParentColor'#8#0#0#14 - +'TFloatSpinEdit'#12'BinWidthEdit'#4'Left'#3#232#0#6'Height'#2#21#3'Top'#2#16 - +#5'Width'#3#130#0#13'DecimalPlaces'#2#4#9'Increment'#2#1#8'MaxValue'#2'd'#8 - +'MinValue'#2#0#8'TabOrder'#2#0#5'Value'#2#0#0#0#9'TSpinEdit'#10'PreBinEdit'#4 - +'Left'#3#232#0#6'Height'#2#21#3'Top'#2'5'#5'Width'#3#130#0#8'MinValue'#2#1#8 - +'TabOrder'#2#1#5'Value'#2#4#0#0#9'TSpinEdit'#11'PostBinEdit'#4'Left'#3#232#0 - +#6'Height'#2#21#3'Top'#2'\'#5'Width'#3#130#0#8'MinValue'#2#1#8'TabOrder'#2#2 - +#5'Value'#2#14#0#0#9'TCheckBox'#14'SliceTImeCheck'#4'Left'#2'('#6'Height'#2 - +#17#3'Top'#3#132#0#5'Width'#3#139#0#7'Caption'#6#25'Data slice-time correcte' - +'d'#8'TabOrder'#2#3#0#0#9'TCheckBox'#14'SavePSVolCheck'#4'Left'#2'('#6'Heigh' - +'t'#2#17#3'Top'#3#164#0#5'Width'#3#145#0#7'Caption'#6#25'Save peristimulus v' - +'olumes'#8'TabOrder'#2#4#0#0#7'TButton'#5'OKBtn'#4'Left'#3#24#1#6'Height'#2 - +#25#3'Top'#3'h'#1#5'Width'#2'K'#25'BorderSpacing.InnerBorder'#2#4#7'Caption' - +#6#2'OK'#11'ModalResult'#2#1#8'TabOrder'#2#5#0#0#9'TCheckBox'#14'PctSignalCh' - +'eck'#4'Left'#2'('#6'Height'#2#17#3'Top'#3#200#0#5'Width'#2'>'#7'Caption'#6#8 - +'% Signal'#7'Checked'#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#6#0#0#9'TCheck' - +'Box'#10'ModelCheck'#4'Left'#2'P'#6'Height'#2#17#3'Top'#3'@'#1#5'Width'#3#192 - +#0#7'Caption'#6'!Report modeled, not observed data'#8'TabOrder'#2#7#7'Visibl' - +'e'#8#0#0#9'TCheckBox'#12'RegressCheck'#4'Left'#2'('#6'Height'#2#17#3'Top'#3 - +#240#0#5'Width'#2't'#7'Caption'#6#17'Remove Regressors'#7'Checked'#9#7'OnCli' - +'ck'#7#17'RegressCheckClick'#5'State'#7#9'cbChecked'#8'TabOrder'#2#8#0#0#9'T' - +'CheckBox'#7'TDCheck'#4'Left'#2'P'#6'Height'#2#17#3'Top'#3#24#1#5'Width'#3 - +#181#0#7'Caption'#6#31'Also Remove Temporal Derivative'#7'Checked'#9#5'State' - +#7#9'cbChecked'#8'TabOrder'#2#9#7'Visible'#8#0#0#0 + 'TPF0'#7'TPSForm'#6'PSForm'#4'Left'#3'n'#1#6'Height'#3#246#0#3'Top'#3#180#0#5 + +'Width'#3'N'#1#18'HorzScrollBar.Page'#3'q'#1#18'VertScrollBar.Page'#3#162#1 + +#13'ActiveControl'#7#12'BinWidthEdit'#8'AutoSize'#9#11'BorderWidth'#2#4#7'Ca' + +'ption'#6#17'Peristimulus Plot'#12'ClientHeight'#3#246#0#11'ClientWidth'#3'N' + +#1#6'OnShow'#7#8'FormShow'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6 + +#7'2.1.0.0'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'A' + +'nchorSideTop.Control'#7#12'BinWidthEdit'#18'AnchorSideTop.Side'#7#9'asrCent' + +'er'#4'Left'#2#8#6'Height'#2#16#3'Top'#2#10#5'Width'#2'['#18'BorderSpacing.L' + +'eft'#2#4#7'Caption'#6#15'Bin width (sec)'#11'ParentColor'#8#0#0#6'TLabel'#6 + +'Label2'#22'AnchorSideLeft.Control'#7#6'Label1'#21'AnchorSideTop.Control'#7 + +#10'PreBinEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#8#6'Height'#2 + +#16#3'Top'#2'#'#5'Width'#3#173#0#7'Caption'#6#27'Number of pre-stimulus bins' + +#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#22'AnchorSideLeft.Control'#7#6'La' + +'bel1'#21'AnchorSideTop.Control'#7#11'PostBinEdit'#18'AnchorSideTop.Side'#7#9 + +'asrCenter'#4'Left'#2#8#6'Height'#2#16#3'Top'#2'<'#5'Width'#3#180#0#7'Captio' + +'n'#6#28'Number of post-stimulus bins'#11'ParentColor'#8#0#0#14'TFloatSpinEd' + +'it'#12'BinWidthEdit'#22'AnchorSideLeft.Control'#7#6'Label3'#19'AnchorSideLe' + +'ft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#3#194#0 + +#6'Height'#2#21#3'Top'#2#8#5'Width'#3#130#0#18'BorderSpacing.Left'#2#6#17'Bo' + +'rderSpacing.Top'#2#4#13'DecimalPlaces'#2#4#8'MinValue'#5#0#0#0#0#0#0#0#0#0#0 + +#8'TabOrder'#2#0#5'Value'#5#0#0#0#0#0#0#0#0#0#0#0#0#9'TSpinEdit'#10'PreBinEd' + +'it'#22'AnchorSideLeft.Control'#7#12'BinWidthEdit'#21'AnchorSideTop.Control' + +#7#12'BinWidthEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#194#0#6 + +'Height'#2#21#3'Top'#2'!'#5'Width'#3#130#0#17'BorderSpacing.Top'#2#4#8'MinVa' + +'lue'#2#1#8'TabOrder'#2#1#5'Value'#2#4#0#0#9'TSpinEdit'#11'PostBinEdit'#22'A' + +'nchorSideLeft.Control'#7#12'BinWidthEdit'#21'AnchorSideTop.Control'#7#10'Pr' + +'eBinEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#194#0#6'Height'#2 + +#21#3'Top'#2':'#5'Width'#3#130#0#17'BorderSpacing.Top'#2#4#8'MinValue'#2#1#8 + +'TabOrder'#2#2#5'Value'#2#14#0#0#9'TCheckBox'#14'SliceTImeCheck'#22'AnchorSi' + +'deLeft.Control'#7#6'Label1'#21'AnchorSideTop.Control'#7#11'PostBinEdit'#18 + +'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#18#3'Top'#2'S'#5 + +'Width'#3#167#0#17'BorderSpacing.Top'#2#4#7'Caption'#6#25'Data slice-time co' + +'rrected'#8'TabOrder'#2#3#0#0#9'TCheckBox'#14'SavePSVolCheck'#22'AnchorSideL' + +'eft.Control'#7#6'Label1'#21'AnchorSideTop.Control'#7#14'SliceTImeCheck'#18 + +'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#18#3'Top'#2'i'#5 + +'Width'#3#172#0#17'BorderSpacing.Top'#2#4#7'Caption'#6#25'Save peristimulus ' + +'volumes'#8'TabOrder'#2#4#0#0#7'TButton'#5'OKBtn'#21'AnchorSideTop.Control'#7 + +#10'ModelCheck'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Con' + +'trol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#251#0#6 + +'Height'#2#25#3'Top'#3#215#0#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight' + +#0#17'BorderSpacing.Top'#2#4#19'BorderSpacing.Right'#2#4#25'BorderSpacing.In' + +'nerBorder'#2#4#7'Caption'#6#2'OK'#11'ModalResult'#2#1#8'TabOrder'#2#5#0#0#9 + +'TCheckBox'#14'PctSignalCheck'#22'AnchorSideLeft.Control'#7#6'Label1'#21'Anc' + +'horSideTop.Control'#7#14'SavePSVolCheck'#18'AnchorSideTop.Side'#7#9'asrBott' + +'om'#4'Left'#2#8#6'Height'#2#18#3'Top'#2#127#5'Width'#2'G'#17'BorderSpacing.' + +'Top'#2#4#7'Caption'#6#8'% Signal'#7'Checked'#9#5'State'#7#9'cbChecked'#8'Ta' + +'bOrder'#2#6#0#0#9'TCheckBox'#10'ModelCheck'#22'AnchorSideLeft.Control'#7#7 + +'TDCheck'#21'AnchorSideTop.Control'#7#7'TDCheck'#18'AnchorSideTop.Side'#7#9 + +'asrBottom'#4'Left'#2#20#6'Height'#2#18#3'Top'#3#193#0#5'Width'#3#223#0#17'B' + +'orderSpacing.Top'#2#4#7'Caption'#6'!Report modeled, not observed data'#8'Ta' + +'bOrder'#2#7#7'Visible'#8#0#0#9'TCheckBox'#12'RegressCheck'#22'AnchorSideLef' + +'t.Control'#7#6'Label1'#21'AnchorSideTop.Control'#7#14'PctSignalCheck'#18'An' + +'chorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#18#3'Top'#3#149#0#5 + +'Width'#3#134#0#17'BorderSpacing.Top'#2#4#7'Caption'#6#17'Remove Regressors' + +#7'Checked'#9#7'OnClick'#7#17'RegressCheckClick'#5'State'#7#9'cbChecked'#8'T' + +'abOrder'#2#8#0#0#9'TCheckBox'#7'TDCheck'#22'AnchorSideLeft.Control'#7#12'Re' + +'gressCheck'#21'AnchorSideTop.Control'#7#12'RegressCheck'#18'AnchorSideTop.S' + +'ide'#7#9'asrBottom'#4'Left'#2#20#6'Height'#2#18#3'Top'#3#171#0#5'Width'#3 + +#211#0#18'BorderSpacing.Left'#2#12#17'BorderSpacing.Top'#2#4#7'Caption'#6#31 + +'Also Remove Temporal Derivative'#7'Checked'#9#5'State'#7#9'cbChecked'#8'Tab' + +'Order'#2#9#7'Visible'#8#0#0#0 ]); diff --git a/prefs.lfm b/prefs.lfm index fa10744..65cd11e 100755 --- a/prefs.lfm +++ b/prefs.lfm @@ -1,71 +1,97 @@ object PrefForm: TPrefForm Tag = 321 - Left = 722 - Height = 503 - Top = 117 + Left = 592 + Height = 327 + Top = 118 Width = 369 ActiveControl = ResliceCheck + AutoSize = True BorderIcons = [biSystemMenu] + BorderWidth = 4 Caption = 'Preferences' - ClientHeight = 503 + ClientHeight = 327 ClientWidth = 369 OnCreate = FormCreate OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.9.0.0' + LCLVersion = '2.1.0.0' object GroupBox1: TGroupBox - Left = 0 - Height = 384 - Top = 0 - Width = 369 + Left = 4 + Height = 238 + Top = 4 + Width = 361 Align = alTop + AutoSize = True Caption = 'Image Display' - ClientHeight = 362 - ClientWidth = 361 + ClientHeight = 220 + ClientWidth = 353 ParentFont = False TabOrder = 0 object Label1: TLabel - Left = 130 + AnchorSideLeft.Control = MaxDimEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = MaxDimEdit + AnchorSideTop.Side = asrCenter + Left = 108 Height = 16 - Top = 78 - Width = 189 + Top = 50 + Width = 178 + BorderSpacing.Left = 4 Caption = 'Maximum Dimension [Voxels]' ParentColor = False ParentFont = False end object Label2: TLabel - Left = 128 + AnchorSideLeft.Control = ThreadEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ThreadEdit + AnchorSideTop.Side = asrCenter + Left = 108 Height = 16 - Top = 126 - Width = 119 + Top = 75 + Width = 115 + BorderSpacing.Left = 4 Caption = 'Rendering Threads' ParentColor = False ParentFont = False end object Label3: TLabel - Left = 128 + AnchorSideLeft.Control = SigDigEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = SigDigEdit + AnchorSideTop.Side = asrCenter + Left = 108 Height = 16 - Top = 174 - Width = 160 + Top = 100 + Width = 154 + BorderSpacing.Left = 4 Caption = 'Decimal places Displayed' ParentColor = False ParentFont = False end object ResliceCheck: TCheckBox - Left = 24 + AnchorSideLeft.Control = GroupBox1 + AnchorSideTop.Control = GroupBox1 + Left = 4 Height = 18 - Top = 9 - Width = 202 + Top = 4 + Width = 192 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 Caption = 'Reorient images when loading' OnClick = ResliceCheckClick ParentFont = False TabOrder = 0 end object MaxDimEdit: TSpinEdit - Left = 24 - Height = 16 - Top = 78 + AnchorSideLeft.Control = ResliceCheck + AnchorSideTop.Control = OrthoCheck + AnchorSideTop.Side = asrBottom + Left = 4 + Height = 21 + Top = 48 Width = 100 + BorderSpacing.Top = 4 MaxValue = 4096 MinValue = 256 ParentFont = False @@ -73,10 +99,14 @@ object PrefForm: TPrefForm Value = 256 end object ThreadEdit: TSpinEdit - Left = 22 - Height = 16 - Top = 126 + AnchorSideLeft.Control = ResliceCheck + AnchorSideTop.Control = MaxDimEdit + AnchorSideTop.Side = asrBottom + Left = 4 + Height = 21 + Top = 73 Width = 100 + BorderSpacing.Top = 4 MaxValue = 4096 MinValue = 1 ParentFont = False @@ -84,47 +114,69 @@ object PrefForm: TPrefForm Value = 1 end object SigDigEdit: TSpinEdit - Left = 22 - Height = 16 - Top = 174 + AnchorSideLeft.Control = ResliceCheck + AnchorSideTop.Control = ThreadEdit + AnchorSideTop.Side = asrBottom + Left = 4 + Height = 21 + Top = 98 Width = 100 + BorderSpacing.Top = 4 MaxValue = 32 ParentFont = False TabOrder = 3 end object OrthoCheck: TCheckBox - Left = 48 + AnchorSideLeft.Control = ResliceCheck + AnchorSideTop.Control = ResliceCheck + AnchorSideTop.Side = asrBottom + Left = 16 Height = 18 - Top = 40 - Width = 231 + Top = 26 + Width = 219 + BorderSpacing.Left = 12 + BorderSpacing.Top = 4 Caption = 'Rotate to nearest orthogonal angle' ParentFont = False TabOrder = 4 end object SingleRowCheck: TCheckBox - Left = 24 + AnchorSideLeft.Control = ResliceCheck + AnchorSideTop.Control = XBarClr + AnchorSideTop.Side = asrBottom + Left = 4 Height = 18 - Top = 296 - Width = 168 + Top = 180 + Width = 160 + BorderSpacing.Top = 4 Caption = 'All slices on a single row' OnChange = SingleRowCheckChange ParentFont = False TabOrder = 5 end object Label4: TLabel - Left = 128 + AnchorSideLeft.Control = FontEdit1 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = FontEdit1 + AnchorSideTop.Side = asrCenter + Left = 108 Height = 16 - Top = 215 - Width = 57 + Top = 125 + Width = 55 + BorderSpacing.Left = 4 Caption = 'Font size' ParentColor = False ParentFont = False end object FontEdit1: TSpinEdit - Left = 22 - Height = 16 - Top = 215 + AnchorSideLeft.Control = ResliceCheck + AnchorSideTop.Control = SigDigEdit + AnchorSideTop.Side = asrBottom + Left = 4 + Height = 21 + Top = 123 Width = 100 + BorderSpacing.Top = 4 MaxValue = 128 MinValue = 1 ParentFont = False @@ -132,21 +184,29 @@ object PrefForm: TPrefForm Value = 12 end object DarkModeCheck: TCheckBox - Left = 24 + AnchorSideLeft.Control = ResliceCheck + AnchorSideTop.Control = SingleRowCheck + AnchorSideTop.Side = asrBottom + Left = 4 Height = 18 - Top = 328 - Width = 87 + Top = 202 + Width = 84 + BorderSpacing.Top = 4 Caption = 'Dark mode' ParentFont = False TabOrder = 7 Visible = False end object XBarClr: TButton - Left = 24 + AnchorSideLeft.Control = ResliceCheck + AnchorSideTop.Control = FontEdit1 + AnchorSideTop.Side = asrBottom + Left = 4 Height = 28 - Top = 256 - Width = 184 + Top = 148 + Width = 174 AutoSize = True + BorderSpacing.Top = 4 BorderSpacing.InnerBorder = 4 Caption = 'Choose Cross-Bar Color' OnClick = XBarClrClick @@ -155,32 +215,44 @@ object PrefForm: TPrefForm end end object GroupBox2: TGroupBox - Left = 0 - Height = 64 - Top = 384 - Width = 369 + Left = 4 + Height = 40 + Top = 242 + Width = 361 Align = alTop + AutoSize = True Caption = 'Drawing' - ClientHeight = 42 - ClientWidth = 361 + ClientHeight = 22 + ClientWidth = 353 ParentFont = False TabOrder = 1 object ThinPenCheck: TCheckBox - Left = 15 + AnchorSideLeft.Control = GroupBox2 + AnchorSideTop.Control = GroupBox2 + Left = 4 Height = 18 - Top = 16 - Width = 73 + Top = 4 + Width = 72 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 Caption = 'Thin Pen' ParentFont = False TabOrder = 0 end end object OKBtn: TButton - Left = 280 + AnchorSideTop.Control = GroupBox2 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 307 Height = 28 - Top = 448 - Width = 78 + Top = 286 + Width = 54 + Anchors = [akTop, akRight] AutoSize = True + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 BorderSpacing.InnerBorder = 4 Caption = 'OK' OnClick = OKBtnClick @@ -188,11 +260,16 @@ object PrefForm: TPrefForm TabOrder = 2 end object CancelBtn: TButton - Left = 168 + AnchorSideLeft.Control = Owner + AnchorSideLeft.Side = asrCenter + AnchorSideTop.Control = GroupBox2 + AnchorSideTop.Side = asrBottom + Left = 147 Height = 28 - Top = 448 - Width = 78 + Top = 286 + Width = 75 AutoSize = True + BorderSpacing.Top = 4 BorderSpacing.InnerBorder = 4 Caption = 'Cancel' OnClick = CancelBtnClick @@ -200,11 +277,16 @@ object PrefForm: TPrefForm TabOrder = 3 end object AdvancedBtn: TButton - Left = 24 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = GroupBox2 + AnchorSideTop.Side = asrBottom + Left = 8 Height = 28 - Top = 448 - Width = 96 + Top = 286 + Width = 92 AutoSize = True + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 BorderSpacing.InnerBorder = 4 Caption = 'Advanced' OnClick = AdvancedBtnClick diff --git a/prefs.lrs b/prefs.lrs index 85d1b98..20de4c7 100755 --- a/prefs.lrs +++ b/prefs.lrs @@ -1,56 +1,94 @@ { This is an automatically generated lazarus resource file } LazarusResources.Add('TPrefForm','FORMDATA',[ - 'TPF0'#9'TPrefForm'#8'PrefForm'#3'Tag'#3'A'#1#4'Left'#3#210#2#6'Height'#3#247 - +#1#3'Top'#2'u'#5'Width'#3'q'#1#13'ActiveControl'#7#12'ResliceCheck'#11'Borde' - +'rIcons'#11#12'biSystemMenu'#0#7'Caption'#6#11'Preferences'#12'ClientHeight' - +#3#247#1#11'ClientWidth'#3'q'#1#8'OnCreate'#7#10'FormCreate'#6'OnShow'#7#8'F' - +'ormShow'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'1.9.0.0'#0#9'T' - +'GroupBox'#9'GroupBox1'#4'Left'#2#0#6'Height'#3#128#1#3'Top'#2#0#5'Width'#3 - +'q'#1#5'Align'#7#5'alTop'#7'Caption'#6#13'Image Display'#12'ClientHeight'#3 - +'j'#1#11'ClientWidth'#3'i'#1#10'ParentFont'#8#8'TabOrder'#2#0#0#6'TLabel'#6 - +'Label1'#4'Left'#3#130#0#6'Height'#2#16#3'Top'#2'N'#5'Width'#3#189#0#7'Capti' - +'on'#6#26'Maximum Dimension [Voxels]'#11'ParentColor'#8#10'ParentFont'#8#0#0 - +#6'TLabel'#6'Label2'#4'Left'#3#128#0#6'Height'#2#16#3'Top'#2'~'#5'Width'#2'w' - +#7'Caption'#6#17'Rendering Threads'#11'ParentColor'#8#10'ParentFont'#8#0#0#6 - +'TLabel'#6'Label3'#4'Left'#3#128#0#6'Height'#2#16#3'Top'#3#174#0#5'Width'#3 - +#160#0#7'Caption'#6#24'Decimal places Displayed'#11'ParentColor'#8#10'Parent' - +'Font'#8#0#0#9'TCheckBox'#12'ResliceCheck'#4'Left'#2#24#6'Height'#2#18#3'Top' - +#2#9#5'Width'#3#202#0#7'Caption'#6#28'Reorient images when loading'#7'OnClic' - +'k'#7#17'ResliceCheckClick'#10'ParentFont'#8#8'TabOrder'#2#0#0#0#9'TSpinEdit' - +#10'MaxDimEdit'#4'Left'#2#24#6'Height'#2#16#3'Top'#2'N'#5'Width'#2'd'#8'MaxV' - +'alue'#3#0#16#8'MinValue'#3#0#1#10'ParentFont'#8#8'TabOrder'#2#1#5'Value'#3#0 - +#1#0#0#9'TSpinEdit'#10'ThreadEdit'#4'Left'#2#22#6'Height'#2#16#3'Top'#2'~'#5 - +'Width'#2'd'#8'MaxValue'#3#0#16#8'MinValue'#2#1#10'ParentFont'#8#8'TabOrder' - +#2#2#5'Value'#2#1#0#0#9'TSpinEdit'#10'SigDigEdit'#4'Left'#2#22#6'Height'#2#16 - +#3'Top'#3#174#0#5'Width'#2'd'#8'MaxValue'#2' '#10'ParentFont'#8#8'TabOrder'#2 - +#3#0#0#9'TCheckBox'#10'OrthoCheck'#4'Left'#2'0'#6'Height'#2#18#3'Top'#2'('#5 - +'Width'#3#231#0#7'Caption'#6'"Rotate to nearest orthogonal angle'#10'ParentF' - +'ont'#8#8'TabOrder'#2#4#0#0#9'TCheckBox'#14'SingleRowCheck'#4'Left'#2#24#6'H' - +'eight'#2#18#3'Top'#3'('#1#5'Width'#3#168#0#7'Caption'#6#26'All slices on a ' - +'single row'#8'OnChange'#7#20'SingleRowCheckChange'#10'ParentFont'#8#8'TabOr' - +'der'#2#5#0#0#6'TLabel'#6'Label4'#4'Left'#3#128#0#6'Height'#2#16#3'Top'#3#215 - +#0#5'Width'#2'9'#7'Caption'#6#9'Font size'#11'ParentColor'#8#10'ParentFont'#8 - +#0#0#9'TSpinEdit'#9'FontEdit1'#4'Left'#2#22#6'Height'#2#16#3'Top'#3#215#0#5 - +'Width'#2'd'#8'MaxValue'#3#128#0#8'MinValue'#2#1#10'ParentFont'#8#8'TabOrder' - +#2#6#5'Value'#2#12#0#0#9'TCheckBox'#13'DarkModeCheck'#4'Left'#2#24#6'Height' - +#2#18#3'Top'#3'H'#1#5'Width'#2'W'#7'Caption'#6#9'Dark mode'#10'ParentFont'#8 - +#8'TabOrder'#2#7#7'Visible'#8#0#0#7'TButton'#7'XBarClr'#4'Left'#2#24#6'Heigh' - +'t'#2#28#3'Top'#3#0#1#5'Width'#3#184#0#8'AutoSize'#9#25'BorderSpacing.InnerB' - +'order'#2#4#7'Caption'#6#22'Choose Cross-Bar Color'#7'OnClick'#7#12'XBarClrC' - +'lick'#10'ParentFont'#8#8'TabOrder'#2#8#0#0#0#9'TGroupBox'#9'GroupBox2'#4'Le' - +'ft'#2#0#6'Height'#2'@'#3'Top'#3#128#1#5'Width'#3'q'#1#5'Align'#7#5'alTop'#7 - +'Caption'#6#7'Drawing'#12'ClientHeight'#2'*'#11'ClientWidth'#3'i'#1#10'Paren' - +'tFont'#8#8'TabOrder'#2#1#0#9'TCheckBox'#12'ThinPenCheck'#4'Left'#2#15#6'Hei' - +'ght'#2#18#3'Top'#2#16#5'Width'#2'I'#7'Caption'#6#8'Thin Pen'#10'ParentFont' - +#8#8'TabOrder'#2#0#0#0#0#7'TButton'#5'OKBtn'#4'Left'#3#24#1#6'Height'#2#28#3 - +'Top'#3#192#1#5'Width'#2'N'#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7 - +'Caption'#6#2'OK'#7'OnClick'#7#10'OKBtnClick'#10'ParentFont'#8#8'TabOrder'#2 - +#2#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#168#0#6'Height'#2#28#3'Top'#3#192#1 - +#5'Width'#2'N'#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#6 - +'Cancel'#7'OnClick'#7#14'CancelBtnClick'#10'ParentFont'#8#8'TabOrder'#2#3#0#0 - +#7'TButton'#11'AdvancedBtn'#4'Left'#2#24#6'Height'#2#28#3'Top'#3#192#1#5'Wid' - +'th'#2'`'#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#8'Adv' - +'anced'#7'OnClick'#7#16'AdvancedBtnClick'#10'ParentFont'#8#8'TabOrder'#2#4#0 - +#0#0 + 'TPF0'#9'TPrefForm'#8'PrefForm'#3'Tag'#3'A'#1#4'Left'#3'P'#2#6'Height'#3'G'#1 + +#3'Top'#2'v'#5'Width'#3'q'#1#13'ActiveControl'#7#12'ResliceCheck'#8'AutoSize' + +#9#11'BorderIcons'#11#12'biSystemMenu'#0#11'BorderWidth'#2#4#7'Caption'#6#11 + +'Preferences'#12'ClientHeight'#3'G'#1#11'ClientWidth'#3'q'#1#8'OnCreate'#7#10 + +'FormCreate'#6'OnShow'#7#8'FormShow'#8'Position'#7#14'poScreenCenter'#10'LCL' + +'Version'#6#7'2.1.0.0'#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#4#6'Height'#3 + +#238#0#3'Top'#2#4#5'Width'#3'i'#1#5'Align'#7#5'alTop'#8'AutoSize'#9#7'Captio' + +'n'#6#13'Image Display'#12'ClientHeight'#3#220#0#11'ClientWidth'#3'a'#1#10'P' + +'arentFont'#8#8'TabOrder'#2#0#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Contro' + +'l'#7#10'MaxDimEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop' + +'.Control'#7#10'MaxDimEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2 + +'l'#6'Height'#2#16#3'Top'#2'2'#5'Width'#3#178#0#18'BorderSpacing.Left'#2#4#7 + +'Caption'#6#26'Maximum Dimension [Voxels]'#11'ParentColor'#8#10'ParentFont'#8 + +#0#0#6'TLabel'#6'Label2'#22'AnchorSideLeft.Control'#7#10'ThreadEdit'#19'Anch' + +'orSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#10'ThreadEdit' + +#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2'l'#6'Height'#2#16#3'Top'#2 + +'K'#5'Width'#2's'#18'BorderSpacing.Left'#2#4#7'Caption'#6#17'Rendering Threa' + +'ds'#11'ParentColor'#8#10'ParentFont'#8#0#0#6'TLabel'#6'Label3'#22'AnchorSid' + +'eLeft.Control'#7#10'SigDigEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'A' + +'nchorSideTop.Control'#7#10'SigDigEdit'#18'AnchorSideTop.Side'#7#9'asrCenter' + +#4'Left'#2'l'#6'Height'#2#16#3'Top'#2'd'#5'Width'#3#154#0#18'BorderSpacing.L' + +'eft'#2#4#7'Caption'#6#24'Decimal places Displayed'#11'ParentColor'#8#10'Par' + +'entFont'#8#0#0#9'TCheckBox'#12'ResliceCheck'#22'AnchorSideLeft.Control'#7#9 + +'GroupBox1'#21'AnchorSideTop.Control'#7#9'GroupBox1'#4'Left'#2#4#6'Height'#2 + +#18#3'Top'#2#4#5'Width'#3#192#0#18'BorderSpacing.Left'#2#4#17'BorderSpacing.' + +'Top'#2#4#7'Caption'#6#28'Reorient images when loading'#7'OnClick'#7#17'Resl' + +'iceCheckClick'#10'ParentFont'#8#8'TabOrder'#2#0#0#0#9'TSpinEdit'#10'MaxDimE' + +'dit'#22'AnchorSideLeft.Control'#7#12'ResliceCheck'#21'AnchorSideTop.Control' + +#7#10'OrthoCheck'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#4#6'Height' + +#2#21#3'Top'#2'0'#5'Width'#2'd'#17'BorderSpacing.Top'#2#4#8'MaxValue'#3#0#16 + +#8'MinValue'#3#0#1#10'ParentFont'#8#8'TabOrder'#2#1#5'Value'#3#0#1#0#0#9'TSp' + +'inEdit'#10'ThreadEdit'#22'AnchorSideLeft.Control'#7#12'ResliceCheck'#21'Anc' + +'horSideTop.Control'#7#10'MaxDimEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4 + +'Left'#2#4#6'Height'#2#21#3'Top'#2'I'#5'Width'#2'd'#17'BorderSpacing.Top'#2#4 + +#8'MaxValue'#3#0#16#8'MinValue'#2#1#10'ParentFont'#8#8'TabOrder'#2#2#5'Value' + +#2#1#0#0#9'TSpinEdit'#10'SigDigEdit'#22'AnchorSideLeft.Control'#7#12'Reslice' + +'Check'#21'AnchorSideTop.Control'#7#10'ThreadEdit'#18'AnchorSideTop.Side'#7#9 + +'asrBottom'#4'Left'#2#4#6'Height'#2#21#3'Top'#2'b'#5'Width'#2'd'#17'BorderSp' + +'acing.Top'#2#4#8'MaxValue'#2' '#10'ParentFont'#8#8'TabOrder'#2#3#0#0#9'TChe' + +'ckBox'#10'OrthoCheck'#22'AnchorSideLeft.Control'#7#12'ResliceCheck'#21'Anch' + +'orSideTop.Control'#7#12'ResliceCheck'#18'AnchorSideTop.Side'#7#9'asrBottom' + +#4'Left'#2#16#6'Height'#2#18#3'Top'#2#26#5'Width'#3#219#0#18'BorderSpacing.L' + +'eft'#2#12#17'BorderSpacing.Top'#2#4#7'Caption'#6'"Rotate to nearest orthogo' + +'nal angle'#10'ParentFont'#8#8'TabOrder'#2#4#0#0#9'TCheckBox'#14'SingleRowCh' + +'eck'#22'AnchorSideLeft.Control'#7#12'ResliceCheck'#21'AnchorSideTop.Control' + +#7#7'XBarClr'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#4#6'Height'#2 + +#18#3'Top'#3#180#0#5'Width'#3#160#0#17'BorderSpacing.Top'#2#4#7'Caption'#6#26 + +'All slices on a single row'#8'OnChange'#7#20'SingleRowCheckChange'#10'Paren' + +'tFont'#8#8'TabOrder'#2#5#0#0#6'TLabel'#6'Label4'#22'AnchorSideLeft.Control' + +#7#9'FontEdit1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Cont' + +'rol'#7#9'FontEdit1'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2'l'#6'He' + +'ight'#2#16#3'Top'#2'}'#5'Width'#2'7'#18'BorderSpacing.Left'#2#4#7'Caption'#6 + +#9'Font size'#11'ParentColor'#8#10'ParentFont'#8#0#0#9'TSpinEdit'#9'FontEdit' + +'1'#22'AnchorSideLeft.Control'#7#12'ResliceCheck'#21'AnchorSideTop.Control'#7 + +#10'SigDigEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#4#6'Height'#2 + +#21#3'Top'#2'{'#5'Width'#2'd'#17'BorderSpacing.Top'#2#4#8'MaxValue'#3#128#0#8 + +'MinValue'#2#1#10'ParentFont'#8#8'TabOrder'#2#6#5'Value'#2#12#0#0#9'TCheckBo' + +'x'#13'DarkModeCheck'#22'AnchorSideLeft.Control'#7#12'ResliceCheck'#21'Ancho' + +'rSideTop.Control'#7#14'SingleRowCheck'#18'AnchorSideTop.Side'#7#9'asrBottom' + +#4'Left'#2#4#6'Height'#2#18#3'Top'#3#202#0#5'Width'#2'T'#17'BorderSpacing.To' + +'p'#2#4#7'Caption'#6#9'Dark mode'#10'ParentFont'#8#8'TabOrder'#2#7#7'Visible' + +#8#0#0#7'TButton'#7'XBarClr'#22'AnchorSideLeft.Control'#7#12'ResliceCheck'#21 + +'AnchorSideTop.Control'#7#9'FontEdit1'#18'AnchorSideTop.Side'#7#9'asrBottom' + +#4'Left'#2#4#6'Height'#2#28#3'Top'#3#148#0#5'Width'#3#174#0#8'AutoSize'#9#17 + ,'BorderSpacing.Top'#2#4#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#22'Ch' + +'oose Cross-Bar Color'#7'OnClick'#7#12'XBarClrClick'#10'ParentFont'#8#8'TabO' + +'rder'#2#8#0#0#0#9'TGroupBox'#9'GroupBox2'#4'Left'#2#4#6'Height'#2'('#3'Top' + +#3#242#0#5'Width'#3'i'#1#5'Align'#7#5'alTop'#8'AutoSize'#9#7'Caption'#6#7'Dr' + +'awing'#12'ClientHeight'#2#22#11'ClientWidth'#3'a'#1#10'ParentFont'#8#8'TabO' + +'rder'#2#1#0#9'TCheckBox'#12'ThinPenCheck'#22'AnchorSideLeft.Control'#7#9'Gr' + +'oupBox2'#21'AnchorSideTop.Control'#7#9'GroupBox2'#4'Left'#2#4#6'Height'#2#18 + +#3'Top'#2#4#5'Width'#2'H'#18'BorderSpacing.Left'#2#4#17'BorderSpacing.Top'#2 + +#4#7'Caption'#6#8'Thin Pen'#10'ParentFont'#8#8'TabOrder'#2#0#0#0#0#7'TButton' + +#5'OKBtn'#21'AnchorSideTop.Control'#7#9'GroupBox2'#18'AnchorSideTop.Side'#7#9 + +'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7 + +#9'asrBottom'#4'Left'#3'3'#1#6'Height'#2#28#3'Top'#3#30#1#5'Width'#2'6'#7'An' + +'chors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#17'BorderSpacing.Top'#2#4#19 + +'BorderSpacing.Right'#2#4#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#2'O' + +'K'#7'OnClick'#7#10'OKBtnClick'#10'ParentFont'#8#8'TabOrder'#2#2#0#0#7'TButt' + +'on'#9'CancelBtn'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.Si' + +'de'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#9'GroupBox2'#18'AnchorSideTo' + +'p.Side'#7#9'asrBottom'#4'Left'#3#147#0#6'Height'#2#28#3'Top'#3#30#1#5'Width' + +#2'K'#8'AutoSize'#9#17'BorderSpacing.Top'#2#4#25'BorderSpacing.InnerBorder'#2 + +#4#7'Caption'#6#6'Cancel'#7'OnClick'#7#14'CancelBtnClick'#10'ParentFont'#8#8 + +'TabOrder'#2#3#0#0#7'TButton'#11'AdvancedBtn'#22'AnchorSideLeft.Control'#7#5 + +'Owner'#21'AnchorSideTop.Control'#7#9'GroupBox2'#18'AnchorSideTop.Side'#7#9 + +'asrBottom'#4'Left'#2#8#6'Height'#2#28#3'Top'#3#30#1#5'Width'#2'\'#8'AutoSiz' + +'e'#9#18'BorderSpacing.Left'#2#4#17'BorderSpacing.Top'#2#4#25'BorderSpacing.' + +'InnerBorder'#2#4#7'Caption'#6#8'Advanced'#7'OnClick'#7#16'AdvancedBtnClick' + +#10'ParentFont'#8#8'TabOrder'#2#4#0#0#0 ]); diff --git a/render.lfm b/render.lfm index e596729..79032ad 100755 --- a/render.lfm +++ b/render.lfm @@ -1,7 +1,7 @@ object RenderForm: TRenderForm - Left = 477 + Left = 222 Height = 512 - Top = 264 + Top = 228 Width = 955 ActiveControl = RenderBar Caption = 'Volume Render' @@ -13,51 +13,72 @@ object RenderForm: TRenderForm OnHide = FormHide OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.9.0.0' + LCLVersion = '2.1.0.0' object RenderBar: TPanel Left = 0 - Height = 32 + Height = 33 Top = 0 Width = 955 Align = alTop + AutoSize = True BevelOuter = bvNone - ClientHeight = 32 + ClientHeight = 33 ClientWidth = 955 ParentFont = False TabOrder = 0 OnClick = RenderBarClick object Label4: TLabel - Left = 152 + AnchorSideLeft.Control = AzimuthEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = AzimuthEdit + AnchorSideTop.Side = asrCenter + Left = 130 Height = 16 - Top = 5 - Width = 57 + Top = 8 + Width = 55 + BorderSpacing.Left = 4 Caption = 'Elevation' ParentColor = False ParentFont = False end object Label1: TLabel - Left = 4 + AnchorSideLeft.Control = RenderBar + AnchorSideTop.Control = AzimuthEdit + AnchorSideTop.Side = asrCenter + Left = 2 Height = 16 - Top = 5 - Width = 53 + Top = 8 + Width = 50 + BorderSpacing.Left = 2 Caption = 'Azimuth' ParentColor = False ParentFont = False end object Label5: TLabel - Left = 616 + AnchorSideLeft.Control = GainTrack + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = AzimuthEdit + AnchorSideTop.Side = asrCenter + Left = 548 Height = 16 - Top = 5 - Width = 63 + Top = 8 + Width = 64 + BorderSpacing.Left = 4 Caption = 'Shading %' ParentColor = False ParentFont = False end object AzimuthEdit: TSpinEdit - Left = 72 - Height = 16 + AnchorSideLeft.Control = Label1 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RenderBar + AnchorSideTop.Side = asrCenter + Left = 54 + Height = 21 Top = 6 Width = 72 + BorderSpacing.Left = 2 + BorderSpacing.Top = 2 Constraints.MinWidth = 70 Increment = 30 MaxValue = 360 @@ -67,10 +88,15 @@ object RenderForm: TRenderForm Value = 120 end object ElevationEdit: TSpinEdit - Left = 216 - Height = 16 + AnchorSideLeft.Control = Label4 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = AzimuthEdit + AnchorSideTop.Side = asrCenter + Left = 187 + Height = 21 Top = 6 Width = 72 + BorderSpacing.Left = 2 Constraints.MinWidth = 70 Increment = 30 MaxValue = 180 @@ -81,58 +107,83 @@ object RenderForm: TRenderForm Value = 30 end object BiasTrack: TTrackBar - Left = 352 + AnchorSideLeft.Control = RefreshToolbar + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RenderBar + AnchorSideTop.Side = asrCenter + Left = 300 Height = 30 - Top = 2 + Top = 1 Width = 120 Max = 100 OnChange = BiasTrackChange Position = 50 TickStyle = tsNone + BorderSpacing.Left = 4 ParentFont = False TabOrder = 2 end object GainTrack: TTrackBar - Left = 480 + AnchorSideLeft.Control = BiasTrack + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RenderBar + AnchorSideTop.Side = asrCenter + Left = 424 Height = 30 - Top = 2 + Top = 1 Width = 120 Max = 100 OnChange = GainTrackChange Position = 50 TickStyle = tsNone + BorderSpacing.Left = 4 ParentFont = False TabOrder = 3 end object ShadeEdit: TSpinEdit - Left = 692 - Height = 16 + AnchorSideLeft.Control = Label5 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = AzimuthEdit + AnchorSideTop.Side = asrCenter + Left = 614 + Height = 21 Top = 6 Width = 72 + BorderSpacing.Left = 2 Increment = 10 OnChange = EditChange ParentFont = False TabOrder = 4 end object ClipTrack: TTrackBar - Left = 780 + AnchorSideLeft.Control = ShadeEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = AzimuthEdit + AnchorSideTop.Side = asrCenter + Left = 690 Height = 30 - Top = 2 + Top = 1 Width = 120 Max = 999 OnChange = ClipTrackChange Position = 0 TickStyle = tsNone + BorderSpacing.Left = 4 ParentFont = False TabOrder = 5 end object RefreshToolbar: TToolBar - Left = 300 + AnchorSideLeft.Control = ElevationEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = RenderBar + AnchorSideTop.Side = asrCenter + Left = 263 Height = 34 - Top = 0 + Top = -1 Width = 33 Align = alNone AutoSize = True + BorderSpacing.Left = 4 ButtonHeight = 32 ButtonWidth = 32 Caption = 'RefreshToolbar' @@ -152,14 +203,14 @@ object RenderForm: TRenderForm end object RenderPanel: TScrollBox Left = 0 - Height = 480 - Top = 32 + Height = 479 + Top = 33 Width = 955 HorzScrollBar.Page = 14 VertScrollBar.Page = 14 Align = alClient - ClientHeight = 465 - ClientWidth = 940 + ClientHeight = 477 + ClientWidth = 953 ParentFont = False TabOrder = 1 object RenderImage: TImage diff --git a/render.pas b/render.pas index a9627a1..33ac6d7 100755 --- a/render.pas +++ b/render.pas @@ -604,7 +604,8 @@ procedure TRenderForm.FormShow(Sender: TObject); lInc: integer; begin {$IFDEF LCLCocoa} - setThemeMode(Self.Handle, gBGImg.DarkMode); + // setThemeMode(Self.Handle, gBGImg.DarkMode); + setThemeMode(Self, gBGImg.DarkMode); {$ENDIF} gRender.ClipFrac := 0; diff --git a/uscaledpi.pas b/uscaledpi.pas index c321e4a..1d66280 100755 --- a/uscaledpi.pas +++ b/uscaledpi.pas @@ -5,13 +5,16 @@ interface uses + {$IFDEF LCLGtk2} Gtk2Def, gtk2, Gtk2Proc, {$ENDIF} {$IFDEF Linux} StrUtils, FileUtil, Process, Classes,SysUtils, {$ENDIF} Forms, Graphics, Controls, ComCtrls, Grids; procedure HighDPI(FromDPI: integer); procedure ScaleDPI(Control: TControl; FromDPI: integer); +{$IFDEF UNIX} procedure HighDPILinux(FontSz: integer); procedure ScaleDPIX(Control: TControl; FromDPI: integer); +{$ENDIF} //function getFontScale(FontSz: integer): single; implementation @@ -20,6 +23,9 @@ procedure ScaleDPI(Control: TControl; FromDPI: integer); var i, s: integer; WinControl: TWinControl; + {$IFDEF LCLGtk2} + Widget: PGtkWidget; + {$ENDIF} begin with Control do begin @@ -32,6 +38,12 @@ procedure ScaleDPI(Control: TControl; FromDPI: integer); Top := ScaleY(Top,FromDPI); end else*) + {$IFDEF Darwin} + if (Control is TTrackBar) then begin + (Control as TTrackBar).Constraints.MaxHeight := 22; + (Control as TTrackBar).Height := (Control as TTrackBar).Constraints.MaxHeight; + end; + {$ENDIF} {$IFDEF LINUX} //strange minimum size and height on Lazarus 1.6.2 if (Control is TTrackBar) then begin //i := 22; @@ -40,6 +52,15 @@ procedure ScaleDPI(Control: TControl; FromDPI: integer); i := (s) div 3; Top := ScaleY(Top, FromDPI) - i ; Height := ScaleY(Height, FromDPI); + {$IFDEF LCLGtk2} + if ((Control as TTrackBar).TickStyle = tsNone) then begin + Widget:=GetStyleWidget(lgsHScale); + gtk_scale_set_draw_value(GTK_SCALE(Widget), false); + gtk_widget_size_request(Widget,@Widget^.requisition); + (Control as TTrackBar).Constraints.MaxHeight := Widget^.requisition.height; + (Control as TTrackBar).Height := (Control as TTrackBar).Constraints.MaxHeight; + end; + {$ENDIF} end else begin Top :=ScaleY(Top, FromDPI); Height := ScaleY(Height, FromDPI); @@ -47,7 +68,6 @@ procedure ScaleDPI(Control: TControl; FromDPI: integer); {$ELSE} Height := ScaleY(Height, FromDPI); Top :=ScaleY(Top, FromDPI); - {$ENDIF} //if not (Control is TOpenGLControl) then Width := ScaleX(Width, FromDPI); diff --git a/uscaledpi_oldish.pas b/uscaledpi_oldish.pas new file mode 100755 index 0000000..4abc2b8 --- /dev/null +++ b/uscaledpi_oldish.pas @@ -0,0 +1,260 @@ +unit uscaledpi; + //http://wiki.lazarus.freepascal.org/High_DPI +{$IFDEF FPC}{$mode delphi} {$H+}{$ENDIF} + +interface + +uses + {$IFDEF Linux} StrUtils, FileUtil, Process, Classes,SysUtils, {$ENDIF} + Forms, Graphics, Controls, ComCtrls, Grids; + +procedure HighDPI(FromDPI: integer); +procedure ScaleDPI(Control: TControl; FromDPI: integer); +procedure HighDPILinux(FontSz: integer); +procedure ScaleDPIX(Control: TControl; FromDPI: integer); +//function getFontScale(FontSz: integer): single; + +implementation + +procedure ScaleDPI(Control: TControl; FromDPI: integer); +var + i, s: integer; + WinControl: TWinControl; +begin + with Control do + begin + Left := ScaleX(Left, FromDPI); + (*if (Control is TOpenGLControl) then begin + if (FromDPI < 64) then begin + writeln('Turning off multi-sampling [high DPI]'); + (Control as TOpenGLControl).MultiSampling := 1; //high scaling factors exhaust video memory + end; + Top := ScaleY(Top,FromDPI); + end else*) + + {$IFDEF LINUX} //strange minimum size and height on Lazarus 1.6.2 + if (Control is TTrackBar) then begin + //i := 22; + s := ScaleY(Height, FromDPI); + //Height := ScaleY(Height, FromDPI); + i := (s) div 3; + Top := ScaleY(Top, FromDPI) - i ; + Height := ScaleY(Height, FromDPI); + end else begin + Top :=ScaleY(Top, FromDPI); + Height := ScaleY(Height, FromDPI); + end; + {$ELSE} + Height := ScaleY(Height, FromDPI); + Top :=ScaleY(Top, FromDPI); + {$ENDIF} + //if not (Control is TOpenGLControl) then + Width := ScaleX(Width, FromDPI); + if (Control is TStringGrid) then begin + (Control as TStringGrid).DefaultColWidth := ScaleY((Control as TStringGrid).DefaultColWidth, FromDPI); + (Control as TStringGrid).DefaultRowHeight := ScaleY((Control as TStringGrid).DefaultRowHeight, FromDPI); + end; + end; + if Control is TWinControl then + begin + WinControl := TWinControl(Control); + if WinControl.ControlCount = 0 then + exit; + for i := 0 to WinControl.ControlCount - 1 do + ScaleDPI(WinControl.Controls[i], FromDPI); + end; +end; + +{$IFDEF LINUX} +function str2XPix(str: string): integer; +// '1920x1080+0+0' -> 1920 1280x778+0+0 +var + s: string; +begin + result := 0; + if length(str) < 1 then exit; + if not (str[1] in ['0'..'9']) then exit; + if not AnsiContainsText(str, 'x') then exit; + if not AnsiContainsText(str, '+') then exit; + s := copy(str, 1, PosEx('x',str)-1); + result := strtointdef(s,0); +end; + +function getFontScaleXRANDR(): single; +var + AProcess: TProcess; + Exe, mmStr: String; + dpi, mm: single; + i, k, xPix: integer; + AStringList, BStringList: TStringList; +begin + result := 0.0; + Exe := FindDefaultExecutablePath('xrandr'); + if length(Exe) < 1 then begin + Exe := '/opt/X11/bin/xrandr'; + //Exe := '/Users/rorden/vx.sh'; + if not fileexists(Exe) then + Exe := ''; + end; + writeln('xrandr : '+Exe); + if length(Exe) < 1 then exit; + if not FileExists(Exe) then exit; + //result := 1; + AProcess := TProcess.Create(nil); + AProcess.Executable:=Exe; + AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes]; + AProcess.Execute; + if (AProcess.ExitCode = 0) then begin + AStringList := TStringList.Create; + BStringList := TStringList.Create; + AStringList.LoadFromStream(AProcess.Output); + if AStringList.Count > 0 then begin //"uint32 2" + for i := 0 to (AStringList.Count-1) do begin + if not AnsiContainsText(AStringList.Strings[i], 'connected') then continue; + writeln(AStringList.Strings[i]); + BStringList.DelimitedText := AStringList.Strings[i]; + if (BStringList.Count < 5) then continue; + k := 0; + xPix := -1; + while (k < (BStringList.Count-1)) and (xPix < 1) do begin + xPix := str2XPix(BStringList.Strings[k]); + k := k + 1; + end; + if xPix < 1 then continue; + mmStr := BStringList.Strings[BStringList.Count-3]; + if length(mmStr) < 3 then continue; //"9mm" + if mmStr[length(mmStr)] <> 'm' then continue; + if mmStr[length(mmStr)-1] = 'c' then + mm := 10.0 //cm + else if mmStr[length(mmStr)-1] = 'm' then + mm := 1.0 //mm + else + continue; + delete(mmStr,length(mmStr)-1,2); + mm := strtointdef(mmStr,0)*mm; + if mm <= 0 then continue; + dpi := xPix/( mm/25.4); + writeln(format(' Xpix %d Xmm %g dpi %g',[xPix, mm, dpi])); + //Form1.Memo1.lines.Add( inttostr(xPix)+':'+floattostr(mm)+' dpi '+floattostr(dpi)); + if dpi > 0 then + result := 144 / dpi; + //result := 96/dpi; + //if (result < 1) then result := 1; + break; + end; //for i: each line of output + end; //if output + AStringList.Free; + BStringList.Free; + end; + AProcess.Free; +end; + + +function getFontScale(FontSz: integer): single; +var + AProcess: TProcess; + Exe, Str: String; + AStringList: TStringList; +begin + result := 1.0; + if (Screen.PixelsPerInch > 48) and (FontSz > 10) then + result := (FontSz/10) * (72/Screen.PixelsPerInch); + //result := Screen.PixelsPerInch / 96; + Exe := FindDefaultExecutablePath('gsettings'); + if length(Exe) < 1 then exit; + if not FileExists(Exe) then exit; + result := 1; + AProcess := TProcess.Create(nil); + AProcess.Executable:=Exe; + //get scaling factor - this is an uint32, e.g. 1,2,3 + AProcess.Parameters.Add('get'); + AProcess.Parameters.Add('org.gnome.desktop.interface'); + AProcess.Parameters.Add('scaling-factor'); + AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes]; + AProcess.Execute; + if (AProcess.ExitCode = 0) then begin + AStringList := TStringList.Create; + AStringList.LoadFromStream(AProcess.Output); + if AStringList.Count > 0 then begin //"uint32 2" + writeln('gsettings get org.gnome.desktop.interface scaling-factor : '+AStringList.Strings[0]); + Str := ExtractDelimited(2, AStringList.Strings[0],[' ']); //remove "uint32 " + result := strtofloatdef(Str, 1.0); + if result <= 0 then result := 1; //some machines report "0" for 1 + end; + AStringList.Free; + end; + //get fractional text-scaling-factor, range 1..1.9999, e.g. "1.5" - total zoom is scaling-factor*text-scaling-factor + AProcess.Parameters.Clear; + AProcess.Parameters.Add('get'); + AProcess.Parameters.Add('org.gnome.desktop.interface'); + AProcess.Parameters.Add('text-scaling-factor'); + AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes]; + AProcess.Execute; + if (AProcess.ExitCode = 0) then begin + AStringList := TStringList.Create; + AStringList.LoadFromStream(AProcess.Output); + if AStringList.Count > 0 then + writeln('gsettings get org.gnome.desktop.interface text-scaling-factor : '+AStringList.Strings[0]); + result := result * strtofloatdef(AStringList.Strings[0], 1.0); + if result <= 0 then result := 1; //some machines report "0" for 1 + AStringList.Free; + end; + AProcess.Free; + writeln(format('Detected screen scaling %g', [result])); +end; + +procedure HighDPILinux(FontSz: integer); +var + i, FromDPI: integer; + scale: single = 1; +begin + writeln('Use "-D 0" for no scaling, "-D -2" for XRANDR, "-D -1" for gsettings or positive value ("-D 1.25") for custom scaling'); + if (paramcount > 1) then begin + i := 1; + while (i < (paramcount)) do begin + //writeln(upcase(paramstr(i))) ; + if upcase(paramstr(i)) = '-D' then begin + scale := strtofloatdef(paramstr(i+1),1); + writeln(format('Custom scaling %g', [scale])); + if scale = 0 then exit; + end; + i := i + 1; + end; + end; + if (scale < -1.99) then + scale := getFontScaleXRANDR(); + if (scale < 0) then begin + {$IFDEF LINUX} + scale := getFontScale(FontSz); + //if scale = 1 then scale := getFontScaleXRANDR(); + {$ENDIF} + end; + if (scale <= 0) then exit; + FromDPI := round( 96/scale); + writeln(format('Scale .. %g dpi %d',[scale, FromDPI])); + for i := 0 to Screen.FormCount - 1 do + ScaleDPI(Screen.Forms[i], FromDPI); + writeln('Done scaling ...'); +end; + +procedure ScaleDPIX(Control: TControl; FromDPI: integer); +begin + //writeln('Form scaling to '+inttostr(gLinuxEffectiveDPI)+' DPI from ' + inttostr(FromDPI)); + //if ((gLinuxEffectiveDPI = FromDPI) or (gLinuxEffectiveDPI < 2)) then exit; + ScaleDPI(Control, FromDPI); +end; +{$ELSE} + +{$ENDIF} + +procedure HighDPI(FromDPI: integer); +var + i: integer; +begin + if Screen.PixelsPerInch = FromDPI then + exit; + for i := 0 to Screen.FormCount - 1 do + ScaleDPI(Screen.Forms[i], FromDPI); +end; +end. + diff --git a/voismooth.lfm b/voismooth.lfm index 1f84080..16270cf 100755 --- a/voismooth.lfm +++ b/voismooth.lfm @@ -1,38 +1,45 @@ object voismoothform: Tvoismoothform - Left = 650 - Height = 222 - Top = 241 + Left = 555 + Height = 138 + Top = 249 Width = 272 ActiveControl = XROIfwhm BorderIcons = [biSystemMenu] BorderStyle = bsDialog + BorderWidth = 4 Caption = 'Blur VOI' - ClientHeight = 222 + ClientHeight = 138 ClientWidth = 272 - Constraints.MaxHeight = 222 - Constraints.MaxWidth = 272 - Constraints.MinHeight = 222 - Constraints.MinWidth = 272 OnCreate = FormCreate OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.6.0.2' + LCLVersion = '2.1.0.0' object Label37: TLabel - Left = 12 - Height = 17 - Top = 46 - Width = 68 + AnchorSideLeft.Control = Label38 + AnchorSideTop.Control = XROIthresh + AnchorSideTop.Side = asrCenter + Left = 8 + Height = 16 + Top = 35 + Width = 61 Caption = 'Threshold' Font.CharSet = ANSI_CHARSET ParentColor = False ParentFont = False end object CancelBtn: TSpeedButton - Left = 94 - Height = 25 + AnchorSideTop.Control = OKBtn + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = OKBtn + Left = 128 + Height = 20 Hint = 'Save to small-endian [Intel] format' - Top = 167 + Top = 106 Width = 66 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Right = 4 + Constraints.MinWidth = 66 Caption = 'Cancel' OnClick = BtnClick ShowHint = True @@ -40,11 +47,20 @@ object voismoothform: Tvoismoothform end object OKBtn: TSpeedButton Tag = 1 - Left = 165 - Height = 25 + AnchorSideTop.Control = xROIoutput + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 198 + Height = 20 Hint = 'Save to big-endian [Sun] format' - Top = 167 + Top = 106 Width = 66 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 + Constraints.MinWidth = 66 Caption = 'OK' OnClick = BtnClick ShowHint = True @@ -52,55 +68,81 @@ object voismoothform: Tvoismoothform end object HelpBtn: TSpeedButton Tag = 2 - Left = 21 - Height = 25 - Top = 167 + AnchorSideTop.Control = OKBtn + AnchorSideRight.Control = CancelBtn + Left = 58 + Height = 20 + Top = 106 Width = 66 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Right = 4 + Constraints.MinWidth = 66 Caption = 'Help' OnClick = HelpBtnClick ParentShowHint = False end object Label38: TLabel - Left = 12 - Height = 17 - Top = 9 - Width = 162 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = XROIfwhm + AnchorSideTop.Side = asrCenter + Left = 8 + Height = 16 + Top = 10 + Width = 146 + BorderSpacing.Left = 4 Caption = 'Smoothing (FWHM mm)' Font.CharSet = ANSI_CHARSET ParentColor = False ParentFont = False end object ScaleSides: TComboBox - Left = 12 - Height = 31 - Top = 84 + AnchorSideLeft.Control = Label38 + AnchorSideTop.Control = XROIthresh + AnchorSideTop.Side = asrBottom + Left = 8 + Height = 20 + Top = 58 Width = 229 - ItemHeight = 0 + BorderSpacing.Top = 4 + ItemHeight = 26 Items.Strings = ( 'Adjust sides in Z-plane only [SPM]' 'Adjust sides in X,Y and Z planes' ) Style = csDropDownList TabOrder = 0 + Text = '0' end object xROIoutput: TComboBox - Left = 12 - Height = 31 - Top = 117 + AnchorSideLeft.Control = Label38 + AnchorSideTop.Control = ScaleSides + AnchorSideTop.Side = asrBottom + Left = 8 + Height = 20 + Top = 82 Width = 229 - ItemHeight = 0 + BorderSpacing.Top = 4 + ItemHeight = 26 Items.Strings = ( 'ROI is 1 [reslice ROI]' 'ROI is 0 [SPM object mask]' ) Style = csDropDownList TabOrder = 1 + Text = '0' end object XROIthresh: TFloatSpinEdit - Left = 180 - Height = 27 - Top = 41 + AnchorSideLeft.Control = Label37 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = XROIfwhm + AnchorSideTop.Side = asrBottom + Left = 73 + Height = 21 + Top = 33 Width = 70 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 DecimalPlaces = 4 Increment = 0.00100000004749 MaxValue = 1 @@ -109,12 +151,21 @@ object voismoothform: Tvoismoothform Value = 1 end object XROIfwhm: TSpinEdit - Left = 180 - Height = 27 - Top = 4 + AnchorSideLeft.Control = Label38 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Owner + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 158 + Height = 21 + Top = 8 Width = 70 + BorderSpacing.Left = 4 + BorderSpacing.Top = 4 + BorderSpacing.Right = 4 MaxValue = 40 MinValue = 1 + OnChange = XROIfwhmChange TabOrder = 3 Value = 1 end diff --git a/voismooth.lrs b/voismooth.lrs index 48718f8..2bee98a 100755 --- a/voismooth.lrs +++ b/voismooth.lrs @@ -1,37 +1,59 @@ { This is an automatically generated lazarus resource file } LazarusResources.Add('Tvoismoothform','FORMDATA',[ - 'TPF0'#14'Tvoismoothform'#13'voismoothform'#4'Left'#3#138#2#6'Height'#3#222#0 - +#3'Top'#3#241#0#5'Width'#3#16#1#13'ActiveControl'#7#8'XROIfwhm'#11'BorderIco' - +'ns'#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#8'Blur' - +' VOI'#12'ClientHeight'#3#222#0#11'ClientWidth'#3#16#1#21'Constraints.MaxHei' - +'ght'#3#222#0#20'Constraints.MaxWidth'#3#16#1#21'Constraints.MinHeight'#3#222 - +#0#20'Constraints.MinWidth'#3#16#1#8'OnCreate'#7#10'FormCreate'#6'OnShow'#7#8 - +'FormShow'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'1.6.0.2'#0#6 - +'TLabel'#7'Label37'#4'Left'#2#12#6'Height'#2#17#3'Top'#2'.'#5'Width'#2'D'#7 - +'Caption'#6#9'Threshold'#12'Font.CharSet'#7#12'ANSI_CHARSET'#11'ParentColor' - +#8#10'ParentFont'#8#0#0#12'TSpeedButton'#9'CancelBtn'#4'Left'#2'^'#6'Height' - +#2#25#4'Hint'#6'#Save to small-endian [Intel] format'#3'Top'#3#167#0#5'Width' - +#2'B'#7'Caption'#6#6'Cancel'#7'OnClick'#7#8'BtnClick'#8'ShowHint'#9#14'Paren' - +'tShowHint'#8#0#0#12'TSpeedButton'#5'OKBtn'#3'Tag'#2#1#4'Left'#3#165#0#6'Hei' - +'ght'#2#25#4'Hint'#6#31'Save to big-endian [Sun] format'#3'Top'#3#167#0#5'Wi' - +'dth'#2'B'#7'Caption'#6#2'OK'#7'OnClick'#7#8'BtnClick'#8'ShowHint'#9#14'Pare' - +'ntShowHint'#8#0#0#12'TSpeedButton'#7'HelpBtn'#3'Tag'#2#2#4'Left'#2#21#6'Hei' - +'ght'#2#25#3'Top'#3#167#0#5'Width'#2'B'#7'Caption'#6#4'Help'#7'OnClick'#7#12 - +'HelpBtnClick'#14'ParentShowHint'#8#0#0#6'TLabel'#7'Label38'#4'Left'#2#12#6 - +'Height'#2#17#3'Top'#2#9#5'Width'#3#162#0#7'Caption'#6#19'Smoothing (FWHM mm' - +')'#12'Font.CharSet'#7#12'ANSI_CHARSET'#11'ParentColor'#8#10'ParentFont'#8#0 - +#0#9'TComboBox'#10'ScaleSides'#4'Left'#2#12#6'Height'#2#31#3'Top'#2'T'#5'Wid' - +'th'#3#229#0#10'ItemHeight'#2#0#13'Items.Strings'#1#6'"Adjust sides in Z-pla' - +'ne only [SPM]'#6' Adjust sides in X,Y and Z planes'#0#5'Style'#7#14'csDropD' - +'ownList'#8'TabOrder'#2#0#0#0#9'TComboBox'#10'xROIoutput'#4'Left'#2#12#6'Hei' - +'ght'#2#31#3'Top'#2'u'#5'Width'#3#229#0#10'ItemHeight'#2#0#13'Items.Strings' - +#1#6#22'ROI is 1 [reslice ROI]'#6#26'ROI is 0 [SPM object mask]'#0#5'Style'#7 - +#14'csDropDownList'#8'TabOrder'#2#1#0#0#14'TFloatSpinEdit'#10'XROIthresh'#4 - +'Left'#3#180#0#6'Height'#2#27#3'Top'#2')'#5'Width'#2'F'#13'DecimalPlaces'#2#4 - +#9'Increment'#5#0'('#206#251#255'n'#18#131#245'?'#8'MaxValue'#5#0#0#0#0#0#0#0 - +#128#255'?'#8'MinValue'#5#0#0#0#0#0#0#0#0#0#0#8'TabOrder'#2#2#5'Value'#5#0#0 - +#0#0#0#0#0#128#255'?'#0#0#9'TSpinEdit'#8'XROIfwhm'#4'Left'#3#180#0#6'Height' - +#2#27#3'Top'#2#4#5'Width'#2'F'#8'MaxValue'#2'('#8'MinValue'#2#1#8'TabOrder'#2 - +#3#5'Value'#2#1#0#0#0 + 'TPF0'#14'Tvoismoothform'#13'voismoothform'#4'Left'#3'+'#2#6'Height'#3#138#0#3 + +'Top'#3#249#0#5'Width'#3#16#1#13'ActiveControl'#7#8'XROIfwhm'#11'BorderIcons' + +#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#11'BorderWidth'#2#4#7'C' + +'aption'#6#8'Blur VOI'#12'ClientHeight'#3#138#0#11'ClientWidth'#3#16#1#8'OnC' + +'reate'#7#10'FormCreate'#6'OnShow'#7#8'FormShow'#8'Position'#7#14'poScreenCe' + +'nter'#10'LCLVersion'#6#7'2.1.0.0'#0#6'TLabel'#7'Label37'#22'AnchorSideLeft.' + +'Control'#7#7'Label38'#21'AnchorSideTop.Control'#7#10'XROIthresh'#18'AnchorS' + +'ideTop.Side'#7#9'asrCenter'#4'Left'#2#8#6'Height'#2#16#3'Top'#2'#'#5'Width' + +#2'='#7'Caption'#6#9'Threshold'#12'Font.CharSet'#7#12'ANSI_CHARSET'#11'Paren' + +'tColor'#8#10'ParentFont'#8#0#0#12'TSpeedButton'#9'CancelBtn'#21'AnchorSideT' + +'op.Control'#7#5'OKBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideR' + +'ight.Control'#7#5'OKBtn'#4'Left'#3#128#0#6'Height'#2#20#4'Hint'#6'#Save to ' + +'small-endian [Intel] format'#3'Top'#2'j'#5'Width'#2'B'#7'Anchors'#11#5'akTo' + +'p'#7'akRight'#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#4#20'Constraints.Mi' + +'nWidth'#2'B'#7'Caption'#6#6'Cancel'#7'OnClick'#7#8'BtnClick'#8'ShowHint'#9 + +#14'ParentShowHint'#8#0#0#12'TSpeedButton'#5'OKBtn'#3'Tag'#2#1#21'AnchorSide' + +'Top.Control'#7#10'xROIoutput'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'Anch' + +'orSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'L' + +'eft'#3#198#0#6'Height'#2#20#4'Hint'#6#31'Save to big-endian [Sun] format'#3 + +'Top'#2'j'#5'Width'#2'B'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#17 + +'BorderSpacing.Top'#2#4#19'BorderSpacing.Right'#2#4#20'Constraints.MinWidth' + +#2'B'#7'Caption'#6#2'OK'#7'OnClick'#7#8'BtnClick'#8'ShowHint'#9#14'ParentSho' + +'wHint'#8#0#0#12'TSpeedButton'#7'HelpBtn'#3'Tag'#2#2#21'AnchorSideTop.Contro' + +'l'#7#5'OKBtn'#23'AnchorSideRight.Control'#7#9'CancelBtn'#4'Left'#2':'#6'Hei' + +'ght'#2#20#3'Top'#2'j'#5'Width'#2'B'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'A' + +'utoSize'#9#19'BorderSpacing.Right'#2#4#20'Constraints.MinWidth'#2'B'#7'Capt' + +'ion'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#14'ParentShowHint'#8#0#0#6'TLa' + +'bel'#7'Label38'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Cont' + +'rol'#7#8'XROIfwhm'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#8#6'Heig' + +'ht'#2#16#3'Top'#2#10#5'Width'#3#146#0#18'BorderSpacing.Left'#2#4#7'Caption' + +#6#19'Smoothing (FWHM mm)'#12'Font.CharSet'#7#12'ANSI_CHARSET'#11'ParentColo' + +'r'#8#10'ParentFont'#8#0#0#9'TComboBox'#10'ScaleSides'#22'AnchorSideLeft.Con' + +'trol'#7#7'Label38'#21'AnchorSideTop.Control'#7#10'XROIthresh'#18'AnchorSide' + +'Top.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#20#3'Top'#2':'#5'Width'#3 + +#229#0#17'BorderSpacing.Top'#2#4#10'ItemHeight'#2#26#13'Items.Strings'#1#6'"' + +'Adjust sides in Z-plane only [SPM]'#6' Adjust sides in X,Y and Z planes'#0#5 + +'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#4'Text'#6#1'0'#0#0#9'TComboBox' + +#10'xROIoutput'#22'AnchorSideLeft.Control'#7#7'Label38'#21'AnchorSideTop.Con' + +'trol'#7#10'ScaleSides'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6 + +'Height'#2#20#3'Top'#2'R'#5'Width'#3#229#0#17'BorderSpacing.Top'#2#4#10'Item' + +'Height'#2#26#13'Items.Strings'#1#6#22'ROI is 1 [reslice ROI]'#6#26'ROI is 0' + +' [SPM object mask]'#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#1#4'Text' + +#6#1'0'#0#0#14'TFloatSpinEdit'#10'XROIthresh'#22'AnchorSideLeft.Control'#7#7 + +'Label37'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7 + +#8'XROIfwhm'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'I'#6'Height'#2 + +#21#3'Top'#2'!'#5'Width'#2'F'#18'BorderSpacing.Left'#2#4#17'BorderSpacing.To' + +'p'#2#4#13'DecimalPlaces'#2#4#9'Increment'#5#0'('#206#251#255'n'#18#131#245 + +'?'#8'MaxValue'#5#0#0#0#0#0#0#0#128#255'?'#8'MinValue'#5#0#0#0#0#0#0#0#0#0#0 + +#8'TabOrder'#2#2#5'Value'#5#0#0#0#0#0#0#0#128#255'?'#0#0#9'TSpinEdit'#8'XROI' + +'fwhm'#22'AnchorSideLeft.Control'#7#7'Label38'#19'AnchorSideLeft.Side'#7#9'a' + +'srBottom'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7 + +#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#158#0#6'Height'#2 + +#21#3'Top'#2#8#5'Width'#2'F'#18'BorderSpacing.Left'#2#4#17'BorderSpacing.Top' + +#2#4#19'BorderSpacing.Right'#2#4#8'MaxValue'#2'('#8'MinValue'#2#1#8'OnChange' + +#7#14'XROIfwhmChange'#8'TabOrder'#2#3#5'Value'#2#1#0#0#0 ]); diff --git a/voismooth.pas b/voismooth.pas index 8c23431..3015933 100755 --- a/voismooth.pas +++ b/voismooth.pas @@ -28,6 +28,7 @@ Tvoismoothform = class(TForm) procedure FormShow(Sender: TObject); procedure HelpBtnClick(Sender: TObject); procedure SmoothVOI_SPM5masks; + procedure XROIfwhmChange(Sender: TObject); private { private declarations } @@ -490,6 +491,11 @@ procedure Tvoismoothform.SmoothVOI_SPM5masks; xROIoutput.itemindex:=(lOrigOut); end; +procedure Tvoismoothform.XROIfwhmChange(Sender: TObject); +begin + +end; + initialization {$I voismooth.lrs} diff --git a/winmemmap.pas b/winmemmap.pas index 7990db0..2beb595 100755 --- a/winmemmap.pas +++ b/winmemmap.pas @@ -39,7 +39,8 @@ interface Classes,Windows; Const {$IFDEF WIN64} // magic constants... http://www.viva64.com/en/b/0022/ - hMemMap = $FFFFFFFFFFFFFFFF; + //hMemMap = $FFFFFFFFFFFFFFFF; + hMemMap : UINT64 = high(UINT64); {$ELSE} hMemMap = $FFFFFFFF; {$ENDIF}