Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jun 13, 2018
1 parent 6ddc151 commit e39ef3d
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 109 deletions.
4 changes: 3 additions & 1 deletion _osx.Rorden.command
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ find /Users/rorden/Documents/osx -name ‘*.DS_Store’ -type f -delete

#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++ -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

cp dcm2niix /Users/rorden/Documents/osx/MRIcroGL/dcm2niix
cp dcm2niix /Users/rorden/Documents/osx/MRIcroGL/MRIcroGL.app/Contents/Resources/dcm2niix
#If we have a 32-bit executable...
Expand Down
2 changes: 2 additions & 0 deletions dcm_load.pas
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ function dcmList(dcm2niixExe, dicomDir: string): TStringList;
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');
Expand Down
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.20180518';
kVers = 'v1.0.20180606';
NaN : double = 1/0;
kMagicDouble : double = -111666222;
kTxtFilter = 'Text (*.txt)|*.txt;*.csv|Comma Separated (*.csv)|*.csv';
Expand Down
14 changes: 10 additions & 4 deletions mainunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2240,9 +2240,13 @@ procedure TGLForm1.FormCreate(Sender: TObject);
writeln('OpenGL 2.1 with 8/8/8/24 bits of R/G/B/Dpth required. Use glxinfo to test capabilities.');
{$ENDIF}
{$ENDIF}
if gPrefs.BitDepth = 16 then
if gPrefs.BitDepth = 16 then begin//gPrefs.BitDepth = 16 then
//GLBox.AlphaBits:=0;
//GLBox.RedBits:=5;
//GLBox.GreenBits:=6;
//GLBox.BlueBits:=5;
GLbox.DepthBits:= 16 //Some mesa implementations do not support 16 bit depths
else
end else
gPrefs.BitDepth := 24;
GLbox.AutoResizeViewport:= true; // http://www.delphigl.com/forum/viewtopic.php?f=10&t=11311
GLBox.Parent := GLForm1;
Expand Down Expand Up @@ -2284,6 +2288,7 @@ procedure TGLForm1.FormCreate(Sender: TObject);
//Edit1.visible := false;
NewWindow1.Visible:= true;
Exit1.visible := false;//with OSX users quit from application menu
Copy1.enabled := false;
Copy1.ShortCut:= ShortCut(Word('C'), [ssMeta]); ;
Open1.ShortCut := ShortCut(Word('O'), [ssMeta]);
Overlays1.ShortCut := ShortCut(Word('O'), [ssShift, ssMeta]);
Expand Down Expand Up @@ -2844,7 +2849,8 @@ procedure TGLForm1.About1Click(Sender: TObject);
+kCR + gShader.Vendor
+ fpsstr;
{$IFDEF LCLCocoa}
ShowAlertSheet(GLForm1.Handle,titleStr, str);
//ShowAlertSheet(GLForm1.Handle,titleStr, str); //limited line length
MessageDlg(titleStr, str,mtInformation,[mbOK],0);
{$ELSE}
MessageDlg(str,mtInformation,[mbOK],0);
{$ENDIF}
Expand Down Expand Up @@ -5997,7 +6003,7 @@ procedure TGLForm1.FormDropFiles(Sender: TObject;
LoadDatasetNIFTIvolx(lFileName,true);
exit;
end;
//check for NIfTI
//check for DICOM
lFilename := dcm2Nifti(dcm2niiForm.getExeName, lFilename);
if lFilename = '' then exit;
LoadDatasetNIFTIvolx(lFileName,true);
Expand Down
12 changes: 9 additions & 3 deletions reorient.pas
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ procedure Resize8(var lHdr: TNIFTIhdr; var lBuffer: bytep; xScale, yScale, zScal
if lBuffer^[i] < mn then mn := lBuffer^[i];
if lBuffer^[i] > mx then mx := lBuffer^[i];
end;

Zoom(lHdr,xScale, yScale, zScale);
//shrink in 1st dimension : do X as these are contiguous = faster, compute slower dimensions at reduced resolution
lXo := lHdr.dim[1]; //input X
Expand Down Expand Up @@ -503,7 +502,10 @@ procedure Resize8(var lHdr: TNIFTIhdr; var lBuffer: bytep; xScale, yScale, zScal
finalImg := tempImgX;
goto 666;
{$ENDIF}
if ((lYi = lHdr.dim[2]) and (lZi = lHdr.dim[3])) then goto 666; //e.g. 1D image
if ((lYi = lHdr.dim[2]) and (lZi = lHdr.dim[3])) then begin
finalImg := tempImgX;
goto 666; //e.g. 1D image
end;
//shrink in 2nd dimension
lYo := lHdr.dim[2]; //reduce Y output
GetMem( tempImgY,lXo*lYo*lZi*sizeof(single)); //8
Expand Down Expand Up @@ -532,7 +534,10 @@ procedure Resize8(var lHdr: TNIFTIhdr; var lBuffer: bytep; xScale, yScale, zScal
finalImg := tempImgY;
goto 666;
{$ENDIF}
if (lZi = lHdr.dim[3]) then goto 666; //e.g. 2D image
if (lZi = lHdr.dim[3]) then begin
finalImg := tempImgY;
goto 666; //e.g. 2D image
end;
//shrink the 3rd dimension
lZo := lHdr.dim[3]; //reduce Z output
GetMem( tempImgZ,lXo*lYo*lZo*sizeof(single)); //8
Expand Down Expand Up @@ -710,6 +715,7 @@ procedure Resize24(var lHdr: TNIFTIhdr; var lBuffer: bytep; xScale,yScale, zScal
lZi := lHdr.dim[3]; //input Z
nVxi := lXi * lYi * lZi;
iHdr := lHdr;
//GLForm1.IntensityBox.Caption := floattostr(yScale);
for k := 1 to 3 do begin
GetMem( img1,nVxi);
j := k;
Expand Down
2 changes: 1 addition & 1 deletion scriptengine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ procedure TScriptForm.FormCreate(Sender: TObject);
OpenDialog1.InitialDir := ScriptDir;
SaveDialog1.InitialDir := ScriptDir;
{$IFDEF Darwin}

Copy1.enabled := false;
Cut1.ShortCut := ShortCut(Word('X'), [ssMeta]);
Copy1.ShortCut := ShortCut(Word('C'), [ssMeta]);
Paste1.ShortCut := ShortCut(Word('V'), [ssMeta]);
Expand Down
3 changes: 3 additions & 0 deletions simplelaz.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<SyntaxMode Value="Delphi"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<TargetCPU Value="x86_64"/>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
Expand Down
Loading

0 comments on commit e39ef3d

Please sign in to comment.