Dear Donald!<div><br></div><div>Sorry for the delayed answer. </div><div><br></div><div>Thank you very much! I did now as you proposed </div><div><br></div><div>"./build clean && ./build && sudo ./build install".</div>
<div><br></div><div>and indeed this fixed the problem!</div><div><br></div><div>Thank you again for your help, very much appreciated!!</div><div>Best, Markus</div><div><br></div><div><br></div><div><br><div class="gmail_quote">
2012/3/9 Donald Tournier <span dir="ltr"><<a href="mailto:d.tournier@brain.org.au" target="_blank">d.tournier@brain.org.au</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Markus,<div><br></div><div>I was just looking through your previous email, and there was something in the command-line log that looks like it might explain your problem:<br><br><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>Markus-Gschwinds-MacBook-Pro:mrtrix-0.2.10 markus$ tar xvfj mrtrix-patch-GZ.tar.bz2 </div>
<div>x build</div><div>x lib/image/format/list.cpp</div><div>x lib/image/format/mrtrix.cpp</div><div>x lib/image/format/nifti1.cpp</div><div>x lib/image/mapper.cpp</div><div>x lib/image/mapper.h</div><div>x lib/image/object.cpp</div>
<div>x lib/image/object.h</div><div>x sysconf/linux.py</div><div>x sysconf/darwin.py</div><div>x sysconf/windows.py</div><div><b>Markus-Gschwinds-MacBook-Pro:mrtrix-0.2.10 markus$ ./build</b></div><div><div><b>Markus-Gschwinds-MacBook-Pro:mrtrix-0.2.10 markus$ sudo ./build install</b></div>
</div><div>installing executables to "/usr/local/mrtrix/bin" and dynamic library to "/usr/local/mrtrix/lib"... ok</div><div>creating symbolic links to executables in "/usr/local/bin" and to dynamic library in "/usr/local/lib"... ok</div>
<div>configuration file already exists - leaving as-is</div><div>Markus-Gschwinds-MacBook-Pro:mrtrix-0.2.10 markus$ </div></div></blockquote><div><br></div></div><div>Looks like the ./build command did nothing, when if should at the very least redo the library link stage. So the ./build install would simply copy over the existing library, assuming it was built as part of a previous unpatched install, and that library would therefore not have support for GZ. Easy to fix that, if you simply do "./build clean && ./build && sudo ./build install".</div>
<div><br></div><div>Hope that fixes the problem...</div><div>Cheers,</div><div><br></div><font color="#888888"><div>Donald.</div></font><div><div></div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div><div><br></div><div><br></div><div>However, there seems still to be a problem:</div>
<div><br></div><div><div>Markus-Gschwinds-MacBook-Pro:CONT markus$ mrinfo CONT_dti_FA_space_bin.nii.gz </div><div>mrinfo: unknown format for image "./CONT_dti_FA_space_bin.nii.gz"</div><div>mrinfo: error opening image "CONT_dti_FA_space_bin.nii.gz"</div>
</div><div><br></div><div><br></div><div><br></div><div><div>Markus-Gschwinds-MacBook-Pro:CONT markus$ mrview CONT_dti_FA_space_bin.nii.gz </div><div><br></div><div>(process:377): Gtk-WARNING **: Locale not supported by C library.</div>
<div><span style="white-space:pre-wrap">        </span>Using the fallback 'C' locale.</div><div>Xlib: extension "RANDR" missing on display "/tmp/launch-29bcMY/org.x:0".</div><div>mrview: unknown format for image "./CONT_dti_FA_space_bin.nii.gz"</div>
<div>mrview: error opening image "CONT_dti_FA_space_bin.nii.gz"</div><div><br></div><div><br></div><div>Thanks!</div><span><font color="#888888"><div><br></div><div>Markus</div></font></span><div>
<div><div><br></div><br><div class="gmail_quote">2012/3/6 Donald Tournier <span dir="ltr"><<a href="mailto:d.tournier@brain.org.au" target="_blank">d.tournier@brain.org.au</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Markus,<div><br></div><div>Ian is spot on, the -lz flags is missing in the library link command, which for some reason isn't a problem on Linux. It's a simple fix: in the build script, change line 315 to read:<br>
<br><div> '$obj$': [ item for item in self.deps ] + pkg (pkgconfig_glib, 'libs') + ld_flags_gsl + ld_flags_zlib,</div><div><br></div><div>(i.e. add " + ld_flags_zlib"). I'm attaching a new version of the patch with the fix included for those who were about to try it out...</div>
<div><br></div><div>Cheers,</div><div><br></div><font color="#888888"><div>Donald.</div></font><div><div></div><div><div><br></div><br><div class="gmail_quote">On 6 March 2012 21:59, Ian Malone <span dir="ltr"><<a href="mailto:i.malone@ucl.ac.uk" target="_blank">i.malone@ucl.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff" text="#000000">
It looks like zlib isn't getting linked, though the patch does have the
flag for it, maybe try './build clean' first? Don't have a Mac to test
on I'm afraid.<br>
<br>
Markus Gschwind wrote:
<blockquote type="cite"><div><div>
Dear Donald!
<div><br>
</div>
<div>That is a brilliant idea! Thanks, I have been waiting for this
and it definitively facilitates work flow!</div>
<div><br>
</div>
<div>However when ./build, I get the following error on MacOSX Snow
Leopard:</div>
<div><br>
</div>
<div>
<div>Markus-Gschwinds-MacBook-Pro:mrtrix-0.2.10 markus$ ./build</div>
<div>[CC] cmd/dir2amp.o</div>
<div>[CC] cmd/streamtrack.o</div>
<div>[CC] cmd/gen_unit_warp.o</div>
<div>[CC] src/dwi/tractography/tracker/sd_prob.o</div>
<div>[CC] cmd/import_tracks.o</div>
<div>[CC] src/dwi/tractography/tracker/base.o</div>
<div>[CC] src/mrview/sidebar/orientation_plot.o</div>
<div>[CC] cmd/mrabs.o</div>
<div>[CC] src/mrview/sidebar/overlay.o</div>
<div>[CC] src/mrview/dialog/opengl.o</div>
<div>[CC] cmd/gendir.o</div>
<div>[CC] src/mrview/sidebar/screen_capture.o</div>
<div>[CC] src/dwi/tractography/file.o</div>
<div>[CC] src/dwi/SH.o</div>
<div>[CC] cmd/tensor2ADC.o</div>
<div>[CC] lib/image/format/mri.o</div>
<div>
[CC] cmd/dwi2tensor.o</div>
<div>[CC] src/mrview/sidebar/tractography.o</div>
<div>[CC] src/mrview/display_area.o</div>
<div>[CC] src/mrview/image.o</div>
<div>[CC] src/mrview/mode/base.o</div>
<div>[CC] lib/image/format/list.o</div>
<div>[CC] lib/image/format/xds.o</div>
<div>[CC] src/histogram.o</div>
<div>[CC] src/mrview/sidebar/tractography/track_list.o</div>
<div>[CC] src/mrview/slice.o</div>
<div>[CC] cmd/disp_profile.o</div>
<div>[CC] lib/file/dicom/mapper.o</div>
<div>[CC] cmd/resample_tracks.o</div>
<div>[CC] cmd/tracks2prob.o</div>
<div>[CC] lib/image/object.o</div>
<div>[CC] src/mrview/dialog/error.o</div>
<div>[CC] cmd/dwi2SH.o</div>
<div>[CC] cmd/mrtransform.o</div>
<div>[CC] cmd/gen_ROI.o</div>
<div>[CC] cmd/csdeconv.o</div>
<div>[CC] cmd/mradd.o</div>
<div>[CC] cmd/sample_tracks.o</div>
<div>[CC] src/dwi/tractography/tracker/dt_stream.o</div>
<div>[CC] src/min_max.o</div>
<div>[CC] cmd/erode.o</div>
<div>[CC] cmd/filter_tracks.o</div>
<div>[CC] cmd/mrcat.o</div>
<div>[CC] src/mrview/sidebar/tractography/roi_list.o</div>
<div>[CC] lib/image/interp.o</div>
<div>[CC] lib/image/format/nifti1.o</div>
<div>[CC] cmd/sdeconv.o</div>
<div>[CC] lib/image/format/analyse.o</div>
<div>[CC] lib/image/mapper.o</div>
<div>[CC] cmd/read_ximg.o</div>
<div>[CC] cmd/gen_WM_mask.o</div>
<div>[CC] cmd/tensor_metric.o</div>
<div>[CC] lib/image/fft.o</div>
<div>[CC] cmd/mrmult.o</div>
<div>[CC] src/mrview/sidebar/main.o</div>
<div>[CC] cmd/normalise_tracks.o</div>
<div>[CC] cmd/mrinfo.o</div>
<div>[CC] cmd/mrconvert.o</div>
<div>[CC] cmd/dicom_filename.o</div>
<div>[CC] cmd/tensor2FA.o</div>
<div>[CC] cmd/track_info.o</div>
<div>[CC] cmd/truncate_tracks.o</div>
<div>[CC] lib/mrtrix.o</div>
<div>[CC] src/mrview/window.o</div>
<div>[CC] src/mrview/sidebar/roi_analysis.o</div>
<div>[CC] cmd/tracks2vtk.o</div>
<div>[CC] src/mrview/pane.o</div>
<div>[CC] lib/args.o</div>
<div>[CC] src/dialog/file.o</div>
<div>[CC] cmd/threshold.o</div>
<div>[CC] lib/app.o</div>
<div>[CC] src/mrview/mode/normal.o</div>
<div>[CC] cmd/median3D.o</div>
<div>[CC] src/mrview/sidebar/tractography/track_list_item.o</div>
<div>[CC] cmd/estimate_response.o</div>
<div>[CC] cmd/select_tracks.o</div>
<div>[CC] cmd/read_dicom.o</div>
<div>[CC] cmd/mrview.o</div>
<div>[CC] cmd/find_SH_peaks.o</div>
<div>[CC] cmd/mrstats.o</div>
<div>[CC] cmd/average.o</div>
<div>[CC] src/dwi/tractography/mds.o</div>
<div>[CC] src/mrview/dialog/properties.o</div>
<div>[CC] src/mrview/sidebar/roi_analysis/roi_list.o</div>
<div>[CC] cmd/tensor2vector.o</div>
<div>[CC] lib/image/format/mrtrix.o</div>
<div>[CC] src/dwi/tractography/tracker/sd_stream.o</div>
<div>[CC] lib/image/format/dicom.o</div>
<div>[LD] lib/libmrtrix-0_2_10.dylib</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div>
<div>ERROR: [LD] lib/libmrtrix-0_2_10.dylib</div>
<div><br>
</div>
<div>g++ -shared lib/math/vector.o lib/math/matrix.o
lib/image/format/analyse.o lib/file/dicom/quick_scan.o
lib/image/format/list.o lib/file/dicom/image.o lib/file/config.o
lib/point.o lib/image/name_parser.o lib/image/format/xds.o
lib/data_type.o lib/args.o lib/file/dicom/patient.o
lib/file/dicom/tree.o lib/image/fft.o lib/image/header.o
lib/file/dicom/mapper.o lib/file/dicom/select_cmdline.o
lib/math/linalg.o lib/file/dicom/study.o lib/file/dicom/element.o
lib/file/mmap.o lib/image/format/nifti1.o lib/file/dicom/dict.o
lib/image/format/mrtrix.o lib/image/format/base.o lib/image/axis.o
lib/image/interp.o lib/image/mapper.o lib/file/dicom/series.o
lib/mrtrix.o lib/image/format/mri.o lib/image/object.o
lib/image/format/dicom.o lib/app.o lib/file/key_value.o
-L/usr/local/Cellar/glibmm/2.22.2/lib
-L/usr/local/Cellar/glib/2.28.8/lib
-L/usr/local/Cellar/libsigc++/2.2.10/lib -L/usr/local/Cellar/gettext/<a href="http://0.18.1.1/lib" target="_blank">0.18.1.1/lib</a>
-lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lgthread-2.0 -lglib-2.0 -lintl
-lgsl -lgslcblas -o lib/libmrtrix-0_2_10.dylib</div>
<div><br>
</div>
<div>failed with output:</div>
<div><br>
</div>
<div>Undefined symbols for architecture x86_64:</div>
<div> "_gzopen", referenced from:</div>
<div> MR::Image::Mapper::gunzip(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&, char const*)in mapper.o</div>
<div> "_gzread", referenced from:</div>
<div> MR::Image::Mapper::gunzip(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&, char const*)in mapper.o</div>
<div> "_gzclose", referenced from:</div>
<div> MR::Image::Mapper::gunzip(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&, char const*)in mapper.o</div>
<div> MR::Image::Mapper::gzip(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)in mapper.o</div>
<div> "_gzdopen", referenced from:</div>
<div> MR::Image::Mapper::gzip(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)in mapper.o</div>
<div> "_gzwrite", referenced from:</div>
<div> MR::Image::Mapper::gzip(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)in mapper.o</div>
<div>ld: symbol(s) not found for architecture x86_64</div>
<div>collect2: ld returned 1 exit status</div>
<div><br>
</div>
<div><br>
</div>
<div>the following ./build install </div>
<div>gives an error too:</div>
<div><br>
</div>
<div>
<div>Markus-Gschwinds-MacBook-Pro:mrtrix-0.2.10 markus$ sudo ./build
install</div>
<div>Password:</div>
<div>installing executables to "/usr/local/mrtrix/bin" and dynamic
library to "/usr/local/mrtrix/lib"...</div>
<div>Traceback (most recent call last):</div>
<div> File "./build", line 914, in <module></div>
<div> apply_recursive (install, os.path.join (lib_dir, libname),
os.path.join (dest_lib, libname))</div>
<div> File "./build", line 736, in apply_recursive</div>
<div> action (source, destination)</div>
<div> File "./build", line 753, in install</div>
<div> shutil.copy (source, destination)</div>
<div> File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shutil.py",
line 88, in copy</div>
<div> copyfile(src, dst)</div>
<div> File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shutil.py",
line 52, in copyfile</div>
<div> fsrc = open(src, 'rb')</div>
<div>IOError: [Errno 2] No such file or directory:
'lib/libmrtrix-0_2_10.dylib'</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>What should I do to make it work?</div>
<div><br>
</div>
<div>Thanks in advance!</div>
<div>Best wishes,</div>
<div>Markus</div>
<br>
<div class="gmail_quote">2012/3/5 Donald Tournier <span dir="ltr"><<a href="mailto:d.tournier@brain.org.au" target="_blank">d.tournier@brain.org.au</a>></span><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">Hi
all,
<div><br>
</div>
<div>Many of you may be interested in being able to read &
write compressed NIfTI images (.nii.gz) directly within MRtrix. Here is
a patch to do just this, and to also read/write compressed MRtrix
format (.mif.gz), thanks to Chris Adamson (unfortunately just too late
for the last release). This patch is to be applied to the current
0.2.10 release version, with the following instructions (edit as
appropriate):</div>
<div><br>
</div>
<div>$ cd mrtrix-0.2.10</div>
<div>$ tar xvfj mrtrix-patch-GZ.tar.bz2</div>
<div>$ ./build</div>
<div>$ sudo ./build install</div>
<div><br>
</div>
<div>Note that this patch hasn't been thoroughly tested, although
it seems to work fine. It's also only been tested on Linux, so may or
may not work on other platforms - if anyone is willing to try it out,
I'd be interested to hear about it.
<div><br>
</div>
<div>Hope this proves useful!</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Donald</div>
<div><br>
</div>
<font color="#888888">
<div><br>
</div>
-- <br>
Jacques-Donald Tournier (PhD)<br>
Brain Research Institute, Melbourne, Australia<br>
Tel: <a href="tel:%2B61%20%280%293%209035%207033" value="+61390357033" target="_blank">+61 (0)3 9035 7033</a><br>
</font></div>
<br>
_______________________________________________<br>
Mrtrix-discussion mailing list<br>
<a href="mailto:Mrtrix-discussion@www.nitrc.org" target="_blank">Mrtrix-discussion@www.nitrc.org</a><br>
<a href="http://www.nitrc.org/mailman/listinfo/mrtrix-discussion" target="_blank">http://www.nitrc.org/mailman/listinfo/mrtrix-discussion</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-<br>
</div>
</div></div><pre><hr size="4" width="90%"><div>
_______________________________________________
Mrtrix-discussion mailing list
<a href="mailto:Mrtrix-discussion@www.nitrc.org" target="_blank">Mrtrix-discussion@www.nitrc.org</a>
<a href="http://www.nitrc.org/mailman/listinfo/mrtrix-discussion" target="_blank">http://www.nitrc.org/mailman/listinfo/mrtrix-discussion</a>
</div></pre>
</blockquote>
<br>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jacques-Donald Tournier (PhD)<br>Brain Research Institute, Melbourne, Australia<br>Tel: <a href="tel:%2B61%20%280%293%209035%207033" value="+61390357033" target="_blank">+61 (0)3 9035 7033</a><br>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div><br>
</div></div></div>
</blockquote></div></div></div><div><div></div><div><br><br clear="all"><div><br></div>-- <br>Jacques-Donald Tournier (PhD)<br>Brain Research Institute, Melbourne, Australia<br>Tel: <a href="tel:%2B61%20%280%293%209035%207033" value="+61390357033" target="_blank">+61 (0)3 9035 7033</a><br>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>
</div>