Skip to content

Commit

Permalink
Change default OVERLAYMASKEDBYBACKGROUND = false
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Aug 3, 2018
1 parent 18beb40 commit 2fad294
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 114 deletions.
22 changes: 11 additions & 11 deletions MRIcroGL.app/Contents/Resources/script/a1.gls
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion define_types.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion mainunit.lfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object GLForm1: TGLForm1
Left = 489
Left = 472
Height = 654
Top = 124
Width = 968
Expand Down
8 changes: 4 additions & 4 deletions mainunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion prefs.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 7 additions & 3 deletions scriptengine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading

0 comments on commit 2fad294

Please sign in to comment.