From 2fad2940d16d32fe5a907583772294ba698d598f Mon Sep 17 00:00:00 2001 From: Chris Rorden Date: Fri, 3 Aug 2018 12:16:45 -0400 Subject: [PATCH] Change default OVERLAYMASKEDBYBACKGROUND = false --- MRIcroGL.app/Contents/Resources/script/a1.gls | 22 +- define_types.pas | 2 +- mainunit.lfm | 2 +- mainunit.pas | 8 +- prefs.pas | 2 +- scriptengine.pas | 10 +- simplelaz.lps | 188 +++++++++--------- 7 files changed, 120 insertions(+), 114 deletions(-) diff --git a/MRIcroGL.app/Contents/Resources/script/a1.gls b/MRIcroGL.app/Contents/Resources/script/a1.gls index 8c74104..7107c5d 100644 --- a/MRIcroGL.app/Contents/Resources/script/a1.gls +++ b/MRIcroGL.app/Contents/Resources/script/a1.gls @@ -1,14 +1,14 @@ begin - //savenii('disco.nii',-1,0.5); - //resetdefaults; - //loadimage('mni152_2009bet'); - loadimage('a'); - //loadimage('motor'); + + resetdefaults; + + + backcolor(255, 255, 255); +loadimage('mni152_2009bet'); overlayload('motor'); - overlayminmax(1, 2, 2); - overlaylayertransparencyonbackground(1,-2); - overlayload('motor'); - overlayminmax(2, -3, -4); - overlaylayertransparencyonbackground(2, 80); - orthoviewmm(0, 0, 57); +overlaymaskedbybackground(false); + overlayminmax(1, 2.6, 4); + + orthoviewmm(0, 0, 50); + end. diff --git a/define_types.pas b/define_types.pas index 66f191c..8f29dc9 100755 --- a/define_types.pas +++ b/define_types.pas @@ -12,7 +12,7 @@ interface SysUtils,classes,graphics,userdir,math, {$IFDEF GUI} forms,dialogs,controls;{$ELSE} dialogsx;{$ENDIF} const - kVers = 'v1.0.20180622'; + kVers = 'v1.0.20180623'; NaN : double = 1/0; kMagicDouble : double = -111666222; kTxtFilter = 'Text (*.txt)|*.txt;*.csv|Comma Separated (*.csv)|*.csv'; diff --git a/mainunit.lfm b/mainunit.lfm index cec42d2..616cd4c 100755 --- a/mainunit.lfm +++ b/mainunit.lfm @@ -1,5 +1,5 @@ object GLForm1: TGLForm1 - Left = 489 + Left = 472 Height = 654 Top = 124 Width = 968 diff --git a/mainunit.pas b/mainunit.pas index ed69f4d..d221552 100755 --- a/mainunit.pas +++ b/mainunit.pas @@ -5685,7 +5685,7 @@ procedure AlphaBlend32Final(lBGQuad,lOverlayQuad : RGBQuadp; lBG0Clr,lOverlay0Cl inc(J); lBGp^[J] := round(lWtBG*lBGp^[J] +lWtOver*lOverlayP^[J]); inc(J); - //lBGp^[J] := max(lBGp^[J], lOverlayP^[J]); //alpha on background + lBGp^[J] := max(lBGp^[J], lOverlayP^[J]); //alpha on background inc(J); end; end; @@ -5709,7 +5709,7 @@ procedure AlphaAdditive32Final(lBGQuad,lOverlayQuad : RGBQuadp; lBG0Clr,lOverlay inc(J); lBGp^[J] := max(lBGp^[J], lOverlayP^[J]); inc(J); - //lBGp^[J] := max(lBGp^[J], lOverlayP^[J]); //alpha on background + lBGp^[J] := max(lBGp^[J], lOverlayP^[J]); //alpha on background inc(J); end; end; @@ -5745,7 +5745,7 @@ procedure AlphaModulate32Final(lBGQuad,lOverlayQuad : RGBQuadp; lBG0Clr,lOverlay inc(J); lBGp^[J] := round(lWt*lOverlayP^[J]); inc(J); - //lBGp^[J] := max(lBGp^[J], lOverlayP^[J]); //alpha on background + lBGp^[J] := max(lBGp^[J], lOverlayP^[J]); //alpha on background inc(J); end; end; @@ -5779,7 +5779,7 @@ procedure ModulateBlendX; inc(J); lBGp^[J] := round(lWt*lOverlayP^[J]); inc(J); - //lBGp^[J] := max(lBGp^[J], lOverlayP^[J]); //alpha on background + lBGp^[J] := max(lBGp^[J], lOverlayP^[J]); //alpha on background inc(J); end; end; //nested ModulateBlendX diff --git a/prefs.pas b/prefs.pas index 754a2f1..6cdfa21 100755 --- a/prefs.pas +++ b/prefs.pas @@ -234,7 +234,7 @@ procedure SetDefaultPrefs (var lPrefs: TPrefs; lEverything: boolean); InterpolateOverlays := true; //InterpolateView := true; EnableYoke := true; - MaskOverlayWithBackground := true; + MaskOverlayWithBackground := false;//change default behaviorAugust3,2018 true; OverlayColorFromZero := false; //SurfaceThreshold := 25; BackgroundAlpha := 50; diff --git a/scriptengine.pas b/scriptengine.pas index a947fdf..885d3fc 100755 --- a/scriptengine.pas +++ b/scriptengine.pas @@ -1841,10 +1841,14 @@ procedure TScriptForm.InsertCommand(Sender: TObject); else lStr := lStr+TypeStr((Sender as TMenuItem).Tag)+ ';'; Clipboard.AsText := lStr; - {$IFDEF UNIX} - Memo1.SelText := (lStr)+ UNIXeoln; + {$IFDEF OLD} + {$IFDEF UNIX} + Memo1.SelText := (lStr)+ UNIXeoln; + {$ELSE} + Memo1.SelText := (lStr)+ #13#10; + {$ENDIF} {$ELSE} - Memo1.SelText := (lStr)+ #13#10; + Memo1.Lines.Insert(Memo1.CaretPos.Y, lStr); {$ENDIF} end; diff --git a/simplelaz.lps b/simplelaz.lps index 4903d19..432a2a6 100644 --- a/simplelaz.lps +++ b/simplelaz.lps @@ -18,8 +18,8 @@ - - + + @@ -28,7 +28,7 @@ - + @@ -38,18 +38,19 @@ - - - + + + + - - - + + + @@ -60,7 +61,7 @@ - + @@ -69,11 +70,13 @@ - - - - + + + + + + @@ -96,7 +99,7 @@ - + @@ -105,11 +108,10 @@ - - + - + @@ -124,19 +126,19 @@ - + - + - - - - + + + + @@ -168,9 +170,9 @@ - - - + + + @@ -234,10 +236,10 @@ - + - + @@ -503,10 +505,10 @@ - + - + @@ -569,133 +571,133 @@ - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +