Skip to content

Commit

Permalink
New release (v1.0.20171215)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jan 4, 2018
1 parent 960a4bb commit ade0fdd
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 61 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ http://www.mccauslandcenter.sc.edu/mricrogl/

##### Recent Versions

15-December-2017 (v1.0.20171215)
- Updated [dcm2niix](https://github.com/rordenlab/dcm2niix).

14-July-2017
- [Display/Radiological menuitem](https://www.nitrc.org/forum/message.php?msg_id=21719) flips between neurological and radiological convention. The "L" and "R" symbols change in the "2D Slices" panel to remind user of current setting. Slices coordinates reflect MNI space (e.g. left side of brain is negative regardless of viewing convention). Rendering view not influenced: radiological view assumes camera is anterior/inferior to object for coronal/sagittal views while neurological assumes camera is posterior/superior.
- Preference window allows user to select between fonts installed in the LUT folder, and create their own fonts using [Hiero](https://github.com/libgdx/libgdx/wiki/Distance-field-fonts).
Expand Down
3 changes: 3 additions & 0 deletions mainunit.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,9 @@ object GLForm1: TGLForm1
object ConvertForeign1: TMenuItem
Caption = 'Convert foreign to NIfTI'
end
object ReorientMenu: TMenuItem
Caption = 'Rotate volume'
end
end
object Draw1: TMenuItem
Caption = 'Draw'
Expand Down
22 changes: 15 additions & 7 deletions mainunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ interface
{$ENDIF}Dialogs, ExtCtrls, Menus, shaderu, texture2raycast,
StdCtrls, Controls, ComCtrls, Reslice, glcube,glclrbar,
{$IFDEF USETRANSFERTEXTURE}texture_3d_unit_transfertexture, {$ELSE} texture_3d_unit,extract,{$ENDIF}
{$IFDEF FPC} strutils, fphttpclient, FileUtil, GraphType, LCLProc,LCLtype, LCLIntf,LResources,OpenGLContext,{$ELSE}glpanel, {$ENDIF}
{$IFDEF UNIX}Process, {$ELSE}//ShellApi,
{$IFDEF FPC} FileUtil, GraphType, LCLProc,LCLtype, LCLIntf,LResources,OpenGLContext,{$ELSE}glpanel, {$ENDIF}
{$IFDEF UNIX}Process, strutils, fphttpclient,
{$ELSE}//ShellApi,
Windows,{$IFDEF FPC}uscaledpi,{$ENDIF}{$ENDIF} glmtext,
Graphics, Classes, SysUtils, Forms, Buttons, Spin, Grids, clut, define_types,
histogram2d, readint, {$IFDEF COREGL} raycast_core, {$ELSE} raycast_legacy, {$ENDIF} raycast_common, histogram, nifti_hdr, shaderui,
Expand Down Expand Up @@ -3529,7 +3530,7 @@ procedure TGLForm1.UpdateFont(initialSetup: boolean);
end;
end;

{$IFDEF FPC}
{$IFDEF UNIX}
function latestGitRelease(url: string): string;
//Returns string for latest release (error will return empty string)
//example
Expand Down Expand Up @@ -3582,7 +3583,7 @@ procedure ReportGitVer(localVer, api, url, exe: string);
end;
gitVer := latestGitRelease(api);
if length(gitVer) < 8 then begin //last 8 digits are date: v.1.0.20170101
showmessage('Unable to detect latest version: are you connected to the web? '+api);
showmessage('Unable to detect latest version: are you connected to the web and do you have libssl installed? '+api);
exit;
end;
exeNam := ExtractFileName(exe);
Expand Down Expand Up @@ -3686,7 +3687,8 @@ procedure PrefMenuClick;
bmpEdit: TEdit;
{$IFDEF FPC}TiledCheck,{$ENDIF}
{$IFDEF LCLCocoa} RetinaCheck,{$ENDIF} flipCheck: TCheckBox;
OkBtn, AdvancedBtn, UpdateBtn: TButton;
{$IFDEF FPC}UpdateBtn: TButton;{$ENDIF}
OkBtn, AdvancedBtn: TButton;
bmpLabel: TLabel;
searchRec: TSearchRec;
s: string;
Expand Down Expand Up @@ -3761,7 +3763,7 @@ procedure PrefMenuClick;
RetinaCheck.Parent:=PrefForm;
{$ENDIF}
//UpdateBtn
{$IFDEF FPC}
{$IFDEF UNIX}
UpdateBtn:=TButton.create(PrefForm);
UpdateBtn.Caption:='Check for updates';
UpdateBtn.Left := 28;
Expand Down Expand Up @@ -4692,6 +4694,12 @@ procedure TGLForm1.RadiologicalMenuClick(Sender: TObject);
end;

procedure TGLForm1.ReorientMenuClick(Sender: TObject);
{$IFNDEF FPC}
begin
showmessage('Feature not available for Delphi');

end;
{$ELSE}
//{$DEFINE REORIENTDEBUG}
label
245;
Expand Down Expand Up @@ -4823,7 +4831,7 @@ procedure TGLForm1.ReorientMenuClick(Sender: TObject);
245:
gPrefs.isOrientationTriangles := false;
end;

{$ENDIF}
(*type
TVec = array [1..3] of single;
function isSame(a,b: TVec): boolean;
Expand Down
4 changes: 2 additions & 2 deletions nifti_foreign.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2273,9 +2273,9 @@ function readForeignHeader (var lFilename: string; var lHdr: TNIFTIhdr; var gzBy
swapEndian := false;
//gzBytes := false;
isDimPermute2341 := false;
result := false;
if FSize(lFilename) < 140 then
exit (false);
//result := false;
exit;
lExt := UpCaseExt(lFilename);
if (lExt = '.DV') then
result := nii_readDeltaVision(lFilename, lHdr, gzBytes, swapEndian)
Expand Down
3 changes: 1 addition & 2 deletions raycast_common.pas
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@ function initVertFrag(vert, frag: string): GLuint;
var
fs, vs: GLuint;
begin
result := 0;
glGetError(); //clear errors

result := glCreateProgram();
vs := 0;
if (length(vert) > 0) then begin
vs := compileShaderOfType(GL_VERTEX_SHADER, vert);
if (vs = 0) then exit;
Expand Down
8 changes: 4 additions & 4 deletions raycast_legacy.pas
Original file line number Diff line number Diff line change
Expand Up @@ -661,19 +661,19 @@ procedure drawFrame(x,y,z: single);
glEnd();
end;

procedure clipMat;
(* procedure clipMat;
var
lMgl: array[0..15] of GLfloat;
begin
(* glGetFloatv(GL_TRANSPOSE_MODELVIEW_MATRIX, @lMgl);
glGetFloatv(GL_TRANSPOSE_MODELVIEW_MATRIX, @lMgl);
clipboard.AsText:= format('m=[%g %g %g %g; %g %g %g %g; %g %g %g %g; %g %g %g %g]',[
m[0,0], m[0,1], m[0,2], m[0,3],
m[1,0], m[1,1], m[1,2], m[1,3],
m[2,0], m[2,1], m[2,2], m[2,3],
m[3,0], m[3,1], m[3,2], m[3,3]]
); *)
end;
);
end;*)

procedure rayCasting (var lTex: TTexture);
begin
Expand Down
11 changes: 11 additions & 0 deletions simplelaz.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<Title Value="MRIcroGL"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes Count="2">
Expand Down Expand Up @@ -91,7 +94,15 @@
<SyntaxMode Value="Delphi"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
Expand Down
4 changes: 3 additions & 1 deletion simplelaz.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
{$mode objfpc}{$H+}
{$include opts.inc}
uses
{$IFDEF FPC}{$IFNDEF UNIX} uscaledpi, {$ENDIF}{$IFDEF LINUX} Graphics, uscaledpi, {$ENDIF}{$ENDIF}
{$IFDEF FPC}{$IFNDEF UNIX} uscaledpi,

{$ENDIF}{$IFDEF LINUX} Graphics, uscaledpi, {$ENDIF}{$ENDIF}
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Expand Down
91 changes: 46 additions & 45 deletions simplelaz.lps
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<ComponentName Value="GLForm1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<TopLine Value="3631"/>
<CursorPos X="23" Y="3641"/>
<TopLine Value="3576"/>
<CursorPos X="114" Y="3586"/>
<UsageCount Value="47"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
Expand All @@ -28,7 +28,7 @@
<ComponentName Value="ScriptForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="3"/>
<EditorIndex Value="4"/>
<TopLine Value="444"/>
<CursorPos X="50" Y="447"/>
<UsageCount Value="24"/>
Expand All @@ -38,7 +38,7 @@
</Unit2>
<Unit3>
<Filename Value="texture_3d_unit.pas"/>
<EditorIndex Value="4"/>
<EditorIndex Value="5"/>
<TopLine Value="412"/>
<CursorPos X="24" Y="417"/>
<UsageCount Value="24"/>
Expand All @@ -50,8 +50,7 @@
<ComponentName Value="dcm2niiForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="2"/>
<EditorIndex Value="3"/>
<TopLine Value="286"/>
<CursorPos X="51" Y="296"/>
<UsageCount Value="11"/>
Expand All @@ -61,7 +60,7 @@
</Unit4>
<Unit5>
<Filename Value="define_types.pas"/>
<EditorIndex Value="1"/>
<EditorIndex Value="2"/>
<CursorPos X="25" Y="15"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
Expand All @@ -70,132 +69,134 @@
<Unit6>
<Filename Value="../../../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
<UnitName Value="CarbonProc"/>
<EditorIndex Value="-1"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="552"/>
<CursorPos X="55" Y="563"/>
<CursorPos X="13" Y="563"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit6>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="mainunit.pas"/>
<Caret Line="3780" Column="46" TopLine="3766"/>
<Caret Line="369" Column="30" TopLine="361"/>
</Position1>
<Position2>
<Filename Value="mainunit.pas"/>
<Caret Line="5550" Column="20" TopLine="5535"/>
<Caret Line="3530" Column="26" TopLine="3527"/>
</Position2>
<Position3>
<Filename Value="mainunit.pas"/>
<Caret Line="369" Column="30" TopLine="361"/>
<Caret Line="3604" Column="24" TopLine="3589"/>
</Position3>
<Position4>
<Filename Value="mainunit.pas"/>
<Caret Line="3530" Column="26" TopLine="3527"/>
<Filename Value="dcm2nii.pas"/>
<Caret Line="179" TopLine="179"/>
</Position4>
<Position5>
<Filename Value="mainunit.pas"/>
<Caret Line="3604" Column="24" TopLine="3589"/>
<Filename Value="dcm2nii.pas"/>
<Caret Line="245" Column="71" TopLine="230"/>
</Position5>
<Position6>
<Filename Value="dcm2nii.pas"/>
<Caret Line="179" TopLine="179"/>
<Filename Value="mainunit.pas"/>
<Caret Line="3592" Column="28" TopLine="3590"/>
</Position6>
<Position7>
<Filename Value="dcm2nii.pas"/>
<Caret Line="245" Column="71" TopLine="230"/>
<Filename Value="mainunit.pas"/>
<Caret Line="185" Column="13" TopLine="177"/>
</Position7>
<Position8>
<Filename Value="mainunit.pas"/>
<Caret Line="3592" Column="28" TopLine="3590"/>
<Caret Line="201" Column="8" TopLine="187"/>
</Position8>
<Position9>
<Filename Value="mainunit.pas"/>
<Caret Line="185" Column="13" TopLine="177"/>
<Caret Line="352" Column="20" TopLine="338"/>
</Position9>
<Position10>
<Filename Value="mainunit.pas"/>
<Caret Line="201" Column="8" TopLine="187"/>
<Caret Line="2621" TopLine="2618"/>
</Position10>
<Position11>
<Filename Value="mainunit.pas"/>
<Caret Line="352" Column="20" TopLine="338"/>
<Caret Line="3601" Column="6" TopLine="3585"/>
</Position11>
<Position12>
<Filename Value="mainunit.pas"/>
<Caret Line="2621" TopLine="2618"/>
<Caret Line="4337" Column="29" TopLine="4335"/>
</Position12>
<Position13>
<Filename Value="mainunit.pas"/>
<Caret Line="3601" Column="6" TopLine="3585"/>
<Caret Line="4338" Column="8" TopLine="4335"/>
</Position13>
<Position14>
<Filename Value="mainunit.pas"/>
<Caret Line="4337" Column="29" TopLine="4335"/>
<Caret Line="193" Column="8" TopLine="185"/>
</Position14>
<Position15>
<Filename Value="mainunit.pas"/>
<Caret Line="4338" Column="8" TopLine="4335"/>
<Caret Line="218" Column="14" TopLine="204"/>
</Position15>
<Position16>
<Filename Value="mainunit.pas"/>
<Caret Line="193" Column="8" TopLine="185"/>
<Caret Line="337" Column="22" TopLine="323"/>
</Position16>
<Position17>
<Filename Value="mainunit.pas"/>
<Caret Line="218" Column="14" TopLine="204"/>
<Caret Line="363" Column="20" TopLine="349"/>
</Position17>
<Position18>
<Filename Value="mainunit.pas"/>
<Caret Line="337" Column="22" TopLine="323"/>
<Caret Line="1255" Column="21" TopLine="1239"/>
</Position18>
<Position19>
<Filename Value="mainunit.pas"/>
<Caret Line="363" Column="20" TopLine="349"/>
<Caret Line="1270" Column="19" TopLine="1254"/>
</Position19>
<Position20>
<Filename Value="mainunit.pas"/>
<Caret Line="1255" Column="21" TopLine="1239"/>
<Caret Line="1325" Column="17" TopLine="1309"/>
</Position20>
<Position21>
<Filename Value="mainunit.pas"/>
<Caret Line="1270" Column="19" TopLine="1254"/>
<Caret Line="1334" Column="23" TopLine="1320"/>
</Position21>
<Position22>
<Filename Value="mainunit.pas"/>
<Caret Line="1325" Column="17" TopLine="1309"/>
<Caret Line="2711" Column="31" TopLine="2705"/>
</Position22>
<Position23>
<Filename Value="mainunit.pas"/>
<Caret Line="1334" Column="23" TopLine="1320"/>
<Caret Line="4346" Column="31" TopLine="4329"/>
</Position23>
<Position24>
<Filename Value="mainunit.pas"/>
<Caret Line="2711" Column="31" TopLine="2705"/>
<Caret Line="3580" Column="7" TopLine="3565"/>
</Position24>
<Position25>
<Filename Value="mainunit.pas"/>
<Caret Line="4346" Column="31" TopLine="4329"/>
<Caret Line="3626" TopLine="3607"/>
</Position25>
<Position26>
<Filename Value="mainunit.pas"/>
<Caret Line="3580" Column="7" TopLine="3565"/>
<Filename Value="dcm2nii.pas"/>
<Caret Line="12" Column="56"/>
</Position26>
<Position27>
<Filename Value="mainunit.pas"/>
<Caret Line="3626" TopLine="3607"/>
<Caret Line="3641" Column="23" TopLine="3631"/>
</Position27>
<Position28>
<Filename Value="dcm2nii.pas"/>
<Caret Line="12" Column="56"/>
<Caret Line="61" Column="20" TopLine="51"/>
</Position28>
<Position29>
<Filename Value="mainunit.pas"/>
<Caret Line="3641" Column="23" TopLine="3631"/>
<Caret Line="3633" Column="30" TopLine="3632"/>
</Position29>
<Position30>
<Filename Value="dcm2nii.pas"/>
<Caret Line="61" Column="20" TopLine="51"/>
<Filename Value="mainunit.pas"/>
<Caret Line="3586" Column="114" TopLine="3576"/>
</Position30>
</JumpHistory>
<RunParams>
Expand Down
Binary file modified simplelaz.res
Binary file not shown.

0 comments on commit ade0fdd

Please sign in to comment.