Giter VIP home page Giter VIP logo

mricron's Introduction

MRIcron / NPM / dcm2nii

About

MRIcron is a viewer for brain imaging data.

Installing

You can download the software from several locations:

  • Download from NITRC.
  • Download from Github.
  • Run the following command to download the latest version for Linux, Macintosh or Windows:
    • curl -fLO https://github.com/neurolabusc/MRIcron/releases/latest/download/MRIcron_linux.zip
    • curl -fLO https://github.com/neurolabusc/MRIcron/releases/download/MRIcron_macOS.dmg
    • curl -fLO https://github.com/neurolabusc/MRIcron/releases/latest/download/MRIcron_windows.zip

Once you have downloaded and extracted the software, you may want to visit the wiki for usage advice.

License

This software includes a BSD license

Future

MRIcron is robust and stable, but development efforts have moved to MRIcroGL. The primary disadvantage of MRIcroGL is that it requires support hardware accelerated OpenGL 3.3 graphics. Therefore, MRIcron remains useful for users of older computers or when connecting to remote supercomputer clusters. These users may also consider fsleyes which can be set up to only require OpenGL 1.4 and indirect rendering.

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 or compile these legacy tools (see next section).

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
  • NPM development has been moved to NiiStat
  • dcm2nii development has been moved to dcm2niix
Compiling your own software

You can build MRIcron using Lazarus.

  • Launch Lazarus and open the project.
  • Choose Run/Run to build and execute the program

mricron's People

Contributors

dimitripapadopoulos avatar ghisvail avatar neurolabusc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mricron's Issues

Cannot open large images

Analogously to neurolabusc/MRIcroGL10_OLD#21, MRIcron is unable to load the largest image (it performs somewhat better than MRIcroGL, failing only at 0.016 instead of 0.017).

Additionally, there is a typo in the warning, it reads:

Unable to load this image (to large or corrupt) (with a single o).

Scripting for loading the first volume of a 4D image

Hi Chris,
I hope you are well.
I'd like to use bash to load the first volumes of several 4-D images, but I'm not sure how to set this in code.
I know it will give me a prompt now to select which volume to show but I'd like to show it directly by setting this in the code:

#!/bin/sh
echo read subject $1
workdir="F:/KNOWLEDGE_DOING/dataScience_1_Toolbox/example_data/example_fmri_data_2"
echo working directory is: $workdir
start "F:/KNOWLEDGE_DOING/dataScience_1_Toolbox/ToolBox_Plot_MRI_mricron_201909/mricron.exe" $workdir/sub-$1/func/sub-$1_task-affect_bold.nii
start "F:/KNOWLEDGE_DOING/dataScience_1_Toolbox/ToolBox_Plot_MRI_mricron_201909/mricron.exe" $workdir/sub-$1/func/r_sub-$1_task-affect_bold.nii

I have looked up in the website but did not find how to set up loading only the first volume of the 4-d image:
https://people.cas.sc.edu/rorden/mricron/bat.html

Thanks in advance for any help!

What fix to resolve 2 errors in 1.0.20190902 ?

debian-med is trying to update debian package for mricron. Taking most "recent" release v1.0.20190902 and trying to build it (with or without debian package patches https://salsa.debian.org/med-team/mricron/-/tree/master/debian/patches) leads to


/home/yoh/deb/gits/pkg-exppsy/mricron/common/nifti_hdr.pas(842,15) Error: (3026) Wrong number of parameters specified for call to "readForeignHeader"
/home/yoh/deb/gits/pkg-exppsy/mricron/common/nifti_foreign.pas(1285,10) Error: (5088) Found declaration: readForeignHeader(var AnsiString;var TNIFTIhdr;var Int64;var Boolean):Boolean;

any specific quick fixup for those or may be a new version could be minted which would overcome them?

reproducer
/tmp > git clone https://github.com/neurolabusc/MRIcron mricron-upstream
Cloning into 'mricron-upstream'...
remote: Enumerating objects: 2338, done.
remote: Total 2338 (delta 0), reused 0 (delta 0), pack-reused 2338
Receiving objects: 100% (2338/2338), 34.10 MiB | 4.63 MiB/s, done.
Resolving deltas: 100% (894/894), done.

/tmp > cd mricron-upstream

/tmp/mricron-upstream > git checkout v1.0.20190902        
Note: switching to 'v1.0.20190902'.
...
HEAD is now at a1a3e26 new version (v1.0.20190902)

/tmp/mricron-upstream > cp common/notgui.inc common/isgui.inc                      
changes on filesystem:                                                                                                                                                                                                                                             
 common/isgui.inc | 2 +-

/tmp/mricron-upstream > lazbuild --build-all --pcp=/etc/lazarus dcm2nii/dcm2nii.lpi      

SetPrimaryConfigPath NewValue="/etc/lazarus" -> "/etc/lazarus"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP"
...
/tmp/mricron-upstream/common/nifti_hdr.pas(842,15) Error: (3026) Wrong number of parameters specified for call to "readForeignHeader"
/tmp/mricron-upstream/common/nifti_foreign.pas(1285,10) Error: (5088) Found declaration: readForeignHeader(var AnsiString;var TNIFTIhdr;var Int64;var Boolean):Boolean;
/tmp/mricron-upstream/common/nifti_hdr.pas(945,27) Hint: (5057) Local variable "lAHdr" does not seem to be initialized
/tmp/mricron-upstream/common/nifti_hdr.pas(1171,24) Hint: (5057) Local variable "lOutHdr" does not seem to be initialized
/tmp/mricron-upstream/common/nifti_hdr.pas(1225,33) Hint: (5057) Local variable "lOutHdr" does not seem to be initialized
nifti_hdr.pas(1286) Fatal: (10026) There were 2 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Error: (lazarus) Compile Project, Target: dcm2nii: stopped with exit code 1
Error: (lazbuild) failed compiling of project /tmp/mricron-upstream/dcm2nii/dcm2nii.lpi
Thanks in advance!

Brodmann Atlas Information Consultation

Mr Chris Rordens:

I am a research and development engineer from a medical image processing software company. We hope to apply Brodmann atlas in MRicRO software to our commercial software. However, we did not find the author of Brodmann atlas and the official source website. We only learned that the map was released together with MRicro software, which follows the BSD protocol. I would like to confirm with you whether it is allowed for me to directly use Brodmann atlas in our software. If it is not feasible, could you please help to provide the information of the map author? We will directly contact the map author to confirm the feasibility of commercial use. Thank you!

Looking forward to your reply.

Xu zhang

Does not compile with lazarus-1.6.0

I cannot get MRIcron to compile with lazarus-1.6.0, as detailed here. The full build log can be seen under this link.

What I think is the crux of it, is that it tries to write outside of the build path - though I may be mistaken and this might just be seen as a consequence of some other issue. Can you help me get your software to compile?

MRIcron does not open the "*_desc-brain_mask.nii" files from fmriprep

Hi MRIcron people,

I would like to just report an issue that I found within MRIcron. I finished the preprocessing using fmriprep and everything went OK. There were no errors to report. However, I realized that I was not able to open the newly created brain masks with MRIcron. Or better, the functional images were OK, but I just could not open the brain masks. You can find the whole thread linked here:

nipreps/fmriprep#2507

When clicking on the mask MRIcron would throw an error: "Invalid floating point operation". However, I could open them with Nibabel thanks to Chris Markiewicz' s suggestion.

This means that this is a bug which is specifically related to MRIcron. I will attach here a couple of examples so that you can download and try yourself. Also, I cannot open them with MATLAB, which tells me that NaN values cannot be open.

Does any of have an idea of why this should be the case?

If there are any updates on this, or fixed bugs I am not aware, please tell me given that I d like to use MRIcron to quickly visualize them.

sub-3000_ses-1_desc-brain_mask.nii.gz
sub-3000_ses-1_dseg.nii.gz
sub-3000_ses-1_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz

best
Loris

Lazarus build fails

I am getting the following build log. Can you help me figure out what's wrong? What's the difference between trying to build the .lpi and .lpr?

E.g. for MRIcroGL I am building the former, but here the latter.

How to Add Template

Hi I'm trying to add Talairach template into the folder structure. I've generated the text label file.

However, it's not showing the text label nor using the LUT.

Is there some tricks to make it work?

Thanks.

Kelvin

color maps

Dear Chris,

like many, I love using your tools (mricron, mricronGL, surfice) BUT have you considered linearizing the luminance of the colour maps? As you likely know this is important to have linear change in luminance along with colours to ensure good visualization. I'm finishing to write a paper on data viz including something on colour maps and I 'fixed' the colour maps, see here https://github.com/CPernet/brain_colours. (also for renders, isoluminant map might be a better option)

Note that the .lut do not work for mricron (??) - I'd be happy to help if you wanted to consider those new maps (also not sure what the clut format is in mricroGL)

best
cyril

New Debian release

@ghisvail would you be interested in updating and maintaining the Debian MRIcron package? I have tried to integrate comments from here. I am happy to assist, but do not have any Debian privileges. I have made numerous changes to the main source code that removes the need fro Debian specific patches. This should make future updates simpler.

  1. The code should be sourced from Github
    https://github.com/neurolabusc/MRIcron
    not
    http://www.mccauslandcenter.sc.edu/CRNL/sw/mricron/source.zip

  2. I would ensure that a recent version of libqt5pas is included. I think only the recent versions support accessibility features. I am not sure if this has been added to Debian trunk or not, I think the latest is 1.2.9:
    https://github.com/davidbannon/libqt5pas
    This will influence the micron control file depends:
    Depends: libqt5pas1, libc6 (>= 2.14), mricron-data (= )

  3. I would prefer the icon to be the svg instead of an xpm - I think the .Desktop file needs to be changed to reflect this:
    Icon=/usr/share/icons/hicolor/scalable/apps/mricron.svg

  4. I do not think any of the patches are required: I have tried to integrate them all into the common code for all Linux users (thanks to the work of the Debian community).

cannot select dicom files to convert to 4D nifti

I'm trying to merge a bunch of fMRI .dcm slices to a 4D nifiti file but the dcm2niigui does not seem to let me select the files (I have read and write access to all the files and directories). I am running Arch Linux and this was working fine before a recent update. I've never had any trouble with this program until now.
What command should i try to merge all the dicom slices into a 4D nifti file. I tried going through the help page but I got a bit lost. Thank you!

dcm2nii issue on MacOSX 10.15.7 (Catalina)

I am unable to execute the dcm2nii using Lazarus. I am running MacOSX 10.15.7 (Catalina). I have dcm2niix but a clinica imaging pipeline requires both dcm2nii and dcm2niix to run. Any suggestions for how I can get dcm2nii to work on Catalina?

Thank you

Rendering lighting and overlay options are not saved

When displaying the rendering window, there is a "Save settings" function in File. But the saved settings file doesn't store the two lighting sliders value (between the high-res button and the shading box), nor the "Overlay > Transparency on other overlays" option.

BTW it's a very great software, and it's perfect to overlap multiple overlays thank's to the color additive feature (actually it's surprisingly one of the only few able to do that, with MRIcroGL and Mango).

Flip LR shows incorrect voxel values

When the flip LR option is checked the voxel values that are displayed at the top of the image are from the image before the image was flipped. Here is an example:
screen shot 2018-12-04 at 7 59 02 am

Windows: write preferences as hidden file in home directory

The current release of MRIcron saves preferences in the same folder as the executable.

  1. This can cause issues for users where the executable is in a folder with executable privileges. The MRIcroGL method of saving preferences to the user home file will avoid this. I still prefer .ini files over the registry as it provides commonality with Unix versions, and others prefer it.

  2. The user should get an better description of the issue when the file is read-only, e.g.

procedure TImgForm.WriteIniFile;
var
  lInc: integer;
  lIni: string;
  lIniFile: TIniFile;
  attr: Longint;
begin
  lIni:= IniName;
  if (DiskFreeEx(lIni) < 1) or (not gBGIMg.SaveDefaultIni) then
	exit;
  attr:=FileGetAttr(lIni);
  If (attr and faReadOnly)<>0 then begin
      showmessage ('File is read only: '+lIni);
      exit;
  end;   
...

'Save file' command leads to very large finder window

I'm going through a large sample of MRI images, and each time I try to save a file, a huge window opens that stretches far past my screen. I think it's growing, because if I try to move the window with my mouse to rename the file, it now takes over 10 "swipes" to scroll over to the middle of the pop-up window. It used to take 2-3. I've tried using keyboard commands and the GUI to save the MRI images, but that doesn't make a difference. I've also tried saving as a bitmap and saving as a NifTI image, but that doesn't make a difference either.

Screen Shot 2022-02-11 at 1 05 09 PM

Windows OS: menubar missing for NIfTI header form

Expected behavior: choosing Windows/Information menuitem shows the NIfTI header form. This should have a menubar, but it is not drawn. Solution: change HdrForm.BorderStyle to "bsSizeable" instead of "bsDialog"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.