0

I am trying to make a script in MATLAB that runs also some commands. Everything works fine so far except from the nii2mnc. I am getting different results when i run it in cmd and when i run it through my script in MATLAB.

At first the problem was the version of nii2mnc i was using. I fixed that and i am using the same version in both.

$ which nii2mnc
/data/lfs2/software/ubuntu14/minc-itk4-1.9.11-20160202/bin/nii2mnc

The mnc files i am getting though have different sizes (the one from my script is bigger).

Any suggestions?

Ross Ridge
  • 38,414
  • 7
  • 81
  • 112
Christos ZS
  • 109
  • 2
  • 11
  • 1
    ...how are you running DOS commands while it is a linux executable? – Rody Oldenhuis Nov 08 '16 at 13:27
  • Can you show us the actual call to `nii2mnc`, in both MATLAB and DOS? – Rody Oldenhuis Nov 08 '16 at 13:28
  • i can run it with 3 different ways `dos()` `system()` `unix()` i just chose `dos()` as they are all giving the same output. In cmd: `nii2mnc CT.nii CT_mnc.mnc` In MATLAB (after setting the PATH and the LD_LIBRARY_PATH and getting the path and the name of the NifTi file): `dos(['nii2mnc ' fullfile(ctpath, CTName) ' CTmnc.mnc']);` – Christos ZS Nov 08 '16 at 23:09

0 Answers0