Skip to content

Commit

Permalink
new version (v1.0.20190902)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Sep 11, 2019
1 parent acbc1e9 commit a1a3e26
Show file tree
Hide file tree
Showing 105 changed files with 4,529 additions and 3,702 deletions.
Binary file added .DS_Store
Binary file not shown.
Empty file modified HighResolutionBitmaps/M1x64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/M2x64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/M3x64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/M4x64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/M5x64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/M6x64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/M7x64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/Plotx64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/Renderx64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/M1x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M1x64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M2x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M2x64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M3x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M3x64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M4x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M4x64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M5x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M5x64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M6x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M6x64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M7x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/M7x64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/Plotx64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/ico48/M2.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/ico48/M3.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/ico48/M4.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/ico48/m1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/ico48/m10.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/ico48/m5.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/ico48/m6.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/ico48/m7.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/ico48/m8.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/ico48/m9.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/affinity/m10x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/m8x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/m8x64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/m9x48.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/m9x64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/mricro.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/mricron.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/affinity/renderx64.afdesign
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/ico128.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/ico256.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/ico48.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/ico64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/m10x48.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/m8x64.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified HighResolutionBitmaps/m9x64.png
100644 → 100755
Empty file modified HighResolutionBitmaps/mricron.app/Contents/Info.plist
100644 → 100755
Empty file.
Empty file modified HighResolutionBitmaps/mricron.app/Contents/PkgInfo
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
82 changes: 21 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,77 +2,37 @@

##### About

MRIcron is a viewer for brain imaging data. NPM is a tool for non parametric analysis of neuroimaging lesion data. dcm2nii is designed for converting the complicated DICOM format used in medical imaging to the simple NIfTI format preferred by scientists. These tools are mature and hopefully robust but no longer in active development.
- MRIcron development has moved to [MRIcroGL](https://github.com/neurolabusc/MRIcroGL)
- NPM development has been moved to [NiiStat](https://github.com/neurolabusc/NiiStat)
- dcm2nii development has been moved to [dcm2niix](https://github.com/neurolabusc/dcm2niix)

##### Downloading compiled software
MRIcron is a viewer for brain imaging data.

- The latest stable version is released at [NITRC](https://www.nitrc.org/projects/mricron)
##### Installing

##### Recent Versions
You can download the software from several locations:

20-December-2017 (v1.0.20171220)
- Now includes [dcm2niix](https://github.com/rordenlab/dcm2niix) (import menu).
- NPM and dcm2nii no longer included (as they were deprecated)

2-May-2016
- MRIcron : Improved ability to copy images to clipboard
- NPM : Permutation thresholds in previous versions were not completely random, while the influence of this was typically negligible when images were listed in random order, this could make the thresholds slightly more liberal or conservative if the images listed in a sorted manner (e.g. lesion size, behavioral deficit). This new version revamps the randomization process, including using the [random number generator described by Marsaglia Zaman](http://paulbourke.net/miscellaneous/random/). Permutation thresholds are now more robust, albeit slower. THe enhanced 64-bit version allows the user to select more threads, which can accelerate the software (assuming your computer has more CPUs).
- Download the latest version from [NITRC](https://www.nitrc.org/projects/mricron).
- Download the [Github](https://github.com/neurolabusc/MRIcroGL/releases).
- Run the following command to get the latest version for Linux, Macintosh or Windows:
* `curl -fLO https://github.com/rordenlab/MRIcroGL12/releases/latest/download/MRIcroGL_linux.zip`
* `curl -fLO https://github.com/rordenlab/MRIcroGL12/releases/latest/download/MRIcroGL_macOS.dmg`
* `curl -fLO https://github.com/rordenlab/MRIcroGL12/releases/latest/download/MRIcroGL_windows.zip`

Once you have downloaded and extracted the software, you may want to visit the [wiki](https://www.nitrc.org/plugins/mwiki/index.php/mricron:MainPage) for usage advice.

##### License

This software includes a [BSD license](https://opensource.org/licenses/BSD-2-Clause)

##### Compiling your own software
##### Future

This is a beta release of MRIcron. You can compile this using Lazarus. It has been compiled on Windows, Linux-x86, OSX-x86 and OSX-PPC. It requires builds of Lazarus and FreePascal created after October 7, 2007.
http://www.hu.freepascal.org/lazarus/
MRIcron is robust and stable, but development efforts have moved to MRIcroGL. The latest releases of MRIcron only include the MRIcron viewer and the dcm2niix image converter. Once upon a time, the software was distributed with statistics (NPM) and legacy image converter (dcm2nii). One can still download old releases of MRIcron from [NITRC](https://www.nitrc.org/projects/mricron) or compile these legacy tools (see next section).

To compile for OSX [Carbon] -
1.) Launch Lazarus and open the project.
2.) Select Project/CompilerOptions
Paths tab: make sure the "LCL widget type" is set to "carbon"
Linking tab: make sure the "Pass options to linker" checkbox is selected and
set the text to "-framework carbon" (no quotes).
3.) Select Project/ProjectOptions and set "Use application bundle for running and debugging"
4.) If using OSX 10.5 or later, add to Project / Compiler options / Other / Custom options:
-k-macosx_version_min -k10.4
-XR/Developer/SDKs/MacOSX10.4u.sdk/
Alternative: Project/ProjectOptions/Linking/ Check 'pass options to linker' and add this line -macosx_version_min 10.4
5.) For debugging, you will want to create an alias from the application folder to the compiled executable:
The exact value will depend on your paths, but it will be similar to this:
rm ~/Documents/mricron/mricron.app/mricron
ln -s ~/Documents/mricron/mricron ~/Documents/mricron/mricron.app/mricron
rm ~/Documents/mricron/npm/npm.app/npm
ln -s ~/Documents/mricron/npm/npm ~/Documents/mricron/npm/npm.app/npm
rm ~/Documents/mricron/dcm2nii/dcm2niigui.app/dcm2niigui
ln -s ~/Documents/mricron/dcm2nii/dcm2niigui ~/Documents/mricron/dcm2nii/dcm2niigui.app/dcm2niigui
NPM is a tool for non parametric analysis of neuroimaging lesion data. dcm2nii is designed for converting the complicated DICOM format used in medical imaging to the simple NIfTI format preferred by scientists. These tools are mature and hopefully robust but no longer in active development.

6.) Select Run/Run to build and execute your program
7.) For making an executable to distribute, control+click on the program's .app folder (e.g. the file named mricron that has a brain icon) and choose "show package contents" - move the executable generated with Lazarus into the folder, overwriting the symbolic link created in step 4.

-------------------------------------------
To compile for Linux GTK1 -
1.) Launch Lazarus and open the project.
2.) Select Project/CompilerOptions
Paths tab: make sure the "LCL widget type" is set to "default [gtk]"
Linking tab: make sure the "Pass options to linker" checkbox is UNCHECKED.
3.) Choose Run/Run to build and execute the program
- MRIcron development has moved to [MRIcroGL](https://github.com/rordenlab/MRIcroGL12/releases)
- NPM development has been moved to [NiiStat](https://github.com/neurolabusc/NiiStat)
- dcm2nii development has been moved to [dcm2niix](https://github.com/neurolabusc/dcm2niix)

-------------------------------------------
To compile for Linux GTK2 -
1.) Launch Lazarus and open the project.
2.) Select Project/CompilerOptions
Paths tab: make sure the "LCL widget type" is set to "gtk2"
Linking tab: make sure the "Pass options to linker" checkbox is UNCHECKED.
3.) Choose Run/Run to build and execute the program
##### Compiling your own software

-------------------------------------------
To compile for Windows -
1.) Launch Lazarus and open the project.
2.) Select Project/CompilerOptions
Paths tab: make sure the "LCL widget type" is set to "default [Win API]"
Linking tab: make sure the "Pass options to linker" checkbox is UNCHECKED.
3.) Choose Run/Run to build and execute the program
You can build MRIcron using [Lazarus](https://www.lazarus-ide.org).
- Launch Lazarus and open the project.
- Choose Run/Run to build and execute the program
4 changes: 2 additions & 2 deletions _lazwin.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ copy /Y mricron.exe d:\neuro\mricron
call _clean.bat
del d:\neuro\MRIcron\mricron.ini
REM compress MRIcron
c:\Progra~1\7-Zip\7z a -tzip d:\neuro\MRIcron_Windows.zip d:\neuro\MRIcron
c:\Progra~1\7-Zip\7z a -tzip d:\neuro\MRIcron_windows.zip d:\neuro\MRIcron
REM copy /Y c:\pas\wincron.zip Y:\mcbi\MCBI\CRNL\sw\mricron\win.zip

REM compress Source
# c:\Progra~1\7-Zip\7z a -tzip c:\pas\mricron_windows.zip c:\pas\mricron
# c:\Progra~1\7-Zip\7z a -tzip c:\pas\mricron_windows_src.zip c:\pas\mricron
REM copy c:\pas\srccron.zip Y:\mcbi\MCBI\CRNL\sw\mricron\source.zip


20 changes: 11 additions & 9 deletions _osx.command
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
cp dcm2niix /Users/rorden/Documents/mricron/MRIcron/MRIcron.app/Contents/Resources/dcm2niix
SKIPDCM2NIIX

cd /Users/rorden/Documents/pas/mricron
cp /usr/local/bin/dcm2niix /Users/chris/Neuro/MRIcron/MRIcron.app/Contents/Resources/dcm2niix


cd /Users/chris/src/MRIcron

chmod 777 ./_xclean.bat
./_xclean.bat
Expand Down Expand Up @@ -48,11 +51,11 @@ SKIPNPM
#Current FPC 3.0.0 can not compile on OSX 10.11 El Capitan, so use 3.1.1
#/Users/rorden/lazarus/lazbuild ./mricron.lpr --cpu=x86_64 --ws=cocoa --compiler="/usr/local/lib/fpc/3.1.1/ppcx64"

/Users/rorden/lazarus/lazbuild ./mricron.lpr --cpu=x86_64 --ws=cocoa
/Users/chris/src/lazarus/lazbuild ./mricron.lpr --cpu=x86_64 --ws=cocoa

strip ./mricron

cp ./mricron /Users/rorden/Documents/mricron/MRIcron/MRIcron.app/Contents/MacOS/MRIcron
cp ./mricron /Users/chris/Neuro/MRIcron/MRIcron.app/Contents/MacOS/MRIcron

awk '{gsub(/Active="MacOS"/,"Active=\"Default\"");}1' mricron.lps > mricron.tmp && mv mricron.tmp mricron.lps

Expand All @@ -61,11 +64,10 @@ awk '{gsub(/Active="MacOS"/,"Active=\"Default\"");}1' mricron.lps > mricron.tmp
rm -rf lib
rm -rf backup

cd /Users/rorden/Documents/pas/
zip -r /Users/rorden/Documents/mricron_source.zip mricron

cd /Users/rorden/Documents/
zip -r /Users/rorden/Documents/mricron_osx.zip mricron

cd /Users/chris/src
zip -r /Users/chris/src/mricron_source.zip mricron

cd /Users/chris/Neuro
hdiutil create -volname MRIcron -srcfolder /Users/chris/Neuro/MRIcron -ov -format UDZO -layout SPUD -fs HFS+J mricron_macOS.dmg
codesign -s "Developer ID Application: Christopher Rorden" mricron_macOS.dmg

4 changes: 4 additions & 0 deletions _xclean.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/sh

find . -name \*.dcu -type f -delete
rm -rf lib
rm -rf backup
rm -r .DS_Store
rm -r *.a
rm -r *.o
rm -r *.ppu
Expand All @@ -27,6 +30,7 @@ rm -r *.o
rm -r *.ppu
rm -r *.bak
cd ..
rm -rf ./common/backup


cd ./dcm2nii
Expand Down
38 changes: 0 additions & 38 deletions _xclean.bat~

This file was deleted.

14 changes: 7 additions & 7 deletions batch.pas
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ procedure BatchVOI;
ImgForm.UpdateLayerMenu;
lBGStrings := TStringList.Create;
if (ssShift in KeyDataToShiftState(vk_Shift)) then begin
GetFilesInDir(ExtractFileDir(HdrForm.OpenHdrDlg.Filename),lBGStrings)
GetFilesInDir(ExtractFileDir(ImgForm.OpenHdrDlg.Filename),lBGStrings)
end else begin
if not OpenDialogExecute(kImgFilter,'Select background images (stat maps)',true) then
if not ImgForm.OpenDialogExecute(kImgFilter,'Select background images (stat maps)',true) then
exit;
lBGStrings.AddStrings(HdrForm.OpenHdrDlg.Files);
lBGStrings.AddStrings(ImgForm.OpenHdrDlg.Files);
end;
lNumberofP:= lBGStrings.Count;
if lNumberofP < 1 then begin
Expand All @@ -139,8 +139,8 @@ procedure BatchVOI;

end;

if not OpenDialogExecute(kImgFilter,'Select overlay images (ROIs)',true) then exit;
lNumberofFiles:= HdrForm.OpenHdrDlg.Files.Count;
if not ImgForm.OpenDialogExecute(kImgFilter,'Select overlay images (ROIs)',true) then exit;
lNumberofFiles:= ImgForm.OpenHdrDlg.Files.Count;
if lNumberofFiles < 1 then
exit;
TextForm.MemoT.Lines.Clear;
Expand All @@ -165,11 +165,11 @@ procedure BatchVOI;
lStr := 'max10pct'
else
lStr := 'mean';
lStr := lStr +kTextSep+ (HdrForm.OpenHdrDlg.Files[lInc-1]);
lStr := lStr +kTextSep+ (ImgForm.OpenHdrDlg.Files[lInc-1]);
for lP := 1 to lNumberofP do begin
lFilename := lBGStrings.Strings[lP-1];
ImgForm.OpenAndDisplayImg(lFilename,True);
lFilename := HdrForm.OpenHdrDlg.Files[lInc-1];
lFilename := ImgForm.OpenHdrDlg.Files[lInc-1];
ImgForm.OverlayOpenCore ( lFilename, 2);
if lP = 1 then
lStr := lStr + kTextSep+ inttostr(VOIVol(2) );
Expand Down
Loading

0 comments on commit a1a3e26

Please sign in to comment.