Skip to content

Commit

Permalink
Add overlay by holding 'Ctrl' key down while dropping
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed May 22, 2018
1 parent 3d05a1c commit 01a6ad6
Show file tree
Hide file tree
Showing 17 changed files with 501 additions and 1,468 deletions.
Binary file removed .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
17 changes: 17 additions & 0 deletions Distro/lut/CT_w_Contrast.clut
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[FLT]
min=50
max=1000
[INT]
numnodes=5
[BYT]
nodeintensity0=0
nodeintensity1=41
nodeintensity2=87
nodeintensity3=154
nodeintensity4=255
[RGBA255]
nodergba0=98|94|45|0
nodergba1=210|26|21|25
nodergba2=169|77|74|0
nodergba3=128|128|128|4
nodergba4=255|255|255|168
146 changes: 0 additions & 146 deletions InfoOld.plist

This file was deleted.

3 changes: 2 additions & 1 deletion MRIcroGL.app/Contents/Resources/script/a1.gls
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
begin
//savenii('disco.nii',-1,0.5);
//savenii('disco.nii',-1,0.5);
savebmpxy('abd540',512, 256);
end.
44 changes: 42 additions & 2 deletions commandsu.pas
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ procedure PERSPECTIVE (USEPERSPECTIVE: boolean);
procedure RADIOLOGICAL (FlipLR: boolean);
procedure RESETDEFAULTS;
procedure SAVEBMP(lFilename: string);
procedure SAVEBMPXY(lFilename: string; X,Y: integer);
procedure SCRIPTFORMVISIBLE (VISIBLE: boolean);
procedure SETCOLORTABLE(TABLENUM: integer);
procedure SHADERFORMVISIBLE (VISIBLE: boolean);
Expand Down Expand Up @@ -116,7 +117,7 @@ procedure QUIT;
(Ptr:@OVERLAYLOAD;Decl:'OVERLAYLOAD';Vars:'(lFilename: string): integer'),
(Ptr:@OVERLAYLOADCLUSTER;Decl:'OVERLAYLOADCLUSTER';Vars:'(lFilename: string; lThreshold, lClusterMM3: single; lSaveToDisk: boolean): integer'),
(Ptr:@OVERLAYLOADVOL;Decl:'OVERLAYLOADVOL';Vars:'(lFilename: string; lVol: integer): integer'));
knProc = 86;
knProc = 87;
kProcRA : array [1..knProc] of TScriptRec =
(
(Ptr:@AZIMUTH;Decl:'AZIMUTH';Vars:'(DEG: integer)'),
Expand Down Expand Up @@ -181,6 +182,7 @@ procedure QUIT;
(Ptr:@RADIOLOGICAL;Decl:'RADIOLOGICAL';Vars:'(FlipLR: boolean)'),
(Ptr:@RESETDEFAULTS;Decl:'RESETDEFAULTS';Vars:''),
(Ptr:@SAVEBMP;Decl:'SAVEBMP';Vars:'(lFilename: string)'),
(Ptr:@SAVEBMPXY;Decl:'SAVEBMPXY';Vars:'(lFilename: string; X,Y: integer)'),
(Ptr:@SAVENII;Decl:'SAVENII';Vars:'(lFilename: string; lFilter: integer; lScale: Single)'),
(Ptr:@SCRIPTFORMVISIBLE;Decl:'SCRIPTFORMVISIBLE';Vars:'(VISIBLE: boolean)'),
(Ptr:@SETCOLORTABLE;Decl:'SETCOLORTABLE';Vars:'(TABLENUM: integer)'),
Expand Down Expand Up @@ -1073,9 +1075,25 @@ procedure VIDEOEND;
{$ENDIF}
end;

(*procedure SAVENIIISO(lFilename: string; lFilter: integer);
var
lF, lExt: string;
begin
FinishRender;
if (gTexture3D.FiltImg = nil) then exit; //Image not loaded
lF := lFilename;
lExt := UpCaseExt(lF);
if (lExt <> '.NII') and (lExt <> '.NII.GZ') then
lF := lF + '.nii';
EnsureDirExists(lF);
if not SaveImgIso (lF, lFilter) then
ScriptForm.Memo2.Lines.Add('saveniiiso failed: maybe your image is already isotropic.');
end; *)

procedure SAVENII(lFilename: string; lFilter: integer; lScale: single);
var
lF, lExt: string;
ret: boolean;
begin
FinishRender;
if (gTexture3D.FiltImg = nil) then exit; //Image not loaded
Expand All @@ -1084,7 +1102,13 @@ procedure SAVENII(lFilename: string; lFilter: integer; lScale: single);
if (lExt <> '.NII') and (lExt <> '.NII.GZ') then
lF := lF + '.nii';
EnsureDirExists(lF);
SaveImgScaled (lF, lFilter,lScale);
ret := SaveImgScaled (lF, lFilter,lScale);
if not ret then begin
if lScale <= 0 then
ScriptForm.Memo2.Lines.Add('savenii failed: maybe your image is already isotropic.')
else
ScriptForm.Memo2.Lines.Add('savenii failed.')
end;
end;

procedure SAVEBMP(lFilename: string);
Expand All @@ -1100,6 +1124,22 @@ procedure SAVEBMP(lFilename: string);
GLForm1.SavePicture(lF);
end;

procedure SAVEBMPXY(lFilename: string; X,Y: integer);
var
lF,lExt: string;
begin
FinishRender;
lF := lFilename;
lExt := UpCaseExt(lF);
if (lExt <> '.JPG') and (lExt <> '.PNG') then
lF := lF + '.png';
EnsureDirExists(lF);
if (gPrefs.SliceView = 5) then begin
ScriptForm.Memo2.Lines.Add('savebmpxy() ignores image dimensions for mosaics: dimensions explicitly set by image resolution.');
GLForm1.SavePicture(lF);
end else
GLForm1.SavePicture(lF, X, Y);
end;

procedure XBARTHICK (PIXELS: integer);
begin
Expand Down
2 changes: 1 addition & 1 deletion define_types.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1389,4 +1389,4 @@ procedure Xswap8r(var s : double);
RESULT := false;
END;

end.
end.
Loading

0 comments on commit 01a6ad6

Please sign in to comment.