|
From: | Miloslav Polasek |
Subject: | Re: Dicom package on Mac OS X |
Date: | Mon, 16 Jun 2014 19:35:01 +0200 |
Hi again, thanks to everyone for their responses. It seems that I made it work! I had to do the following: 1. uninstall Octave (which was installed from dmg file) 2. install Homebrew (http://brew.sh/) 2a. brew doctor (here it complained about previously installed static GDCM libraries, so I deleted them) 3. followed guide to install Octave for Mac using Homebrew (http://wiki.octave.org/Octave_for_MacOS_X#Homebrew) 3a. minor exception is that I was not able to install gfortran, instead it suggested installing gcc (brew install gcc) 4. before I could start with installation of Octave I had to download and install LaTeX for mac (MacTex-2014) 5. install Octave (brew install octave) The installation ran for about an hour. When done, I was able to launch Octave from the Terminal with: octave --force-gui However, at this point there was a problem with plotting and launching X11. This was fixed by creating .octaverc file in my home directory and adding the line: setenv ("GNUTERM", "X11”) 6. Installed again the supporting GDCM library from source code through Makefile as described here: http://wiki.octave.org/Dicom_package Here I decided to go with an older version of the library (gdcm-2.0.19) 7. Exported the path to the library with export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib 7a. Here I checked again with echo $DYLD_LIBRARY_PATH that gave the right answer: :/usr/local/lib It is a bit weird, because this information should be stored in .bashrc file in the home directory. There was no such file, so I created it. But even after exporting the path, the file contained no information. So, where is the path stored? Nevertheless, it works somehow. 8. I took the dicom package and did the corrections that Sebastian suggested earlier (I omitted the one line that was only required when working with gdcm 2.4, because I decided to use gdcm 2.0): #extract package tar -zxvf dicom-0.1.1.tar.gz #add correct include and libdirs perl -pi -e 's/INCDIRFLAGS =.*/INCDIRFLAGS =\t-I\/usr\/local\/include/' dicom/src/Makefile perl -pi -e 's/LIBDIRFLAGS =.*/LIBDIRFLAGS =\t-L\/usr\/local\/lib/' dicom/src/Makefile # repack tar -zcvf dicom-0.1.1patched.tar.gz dicom 9. Launched Octave (octave --force-gui) and installed the patched package with: pkg install dicom-0.1.1patched.tar.gz It gave me some warnings (see below), but the package seems to be installed and working. I tried some real data that I have from an MRI scanner and it was able to load the dicom information and the imaging data correctly. Basically, I have no idea what I was doing, but I am happy that I can work with dicom files on my Mac now :-) Miloslav The warnings that I got during Dicom package installation: >> pkg install dicom-0.1.1patched.tar.gz dicominfo.cpp:79:1: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] Octave_map dump(const char filename[], int chatty); ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicominfo.cpp:80:18: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] void dumpDataSet(Octave_map *om, const gdcm::DataSet *ds, int chatty, int sequenceDepth); ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicominfo.cpp:82:18: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] void dumpElement(Octave_map *om, const gdcm::DataElement * elem, int chatty, int sequenceDepth); ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicominfo.cpp:166:2: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] Octave_map om=dump(filename.c_str(),chatty); ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicominfo.cpp:175:1: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] Octave_map dump(const char filename[], int chatty) { ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicominfo.cpp:177:2: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] Octave_map om; ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicominfo.cpp:205:18: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] void dumpDataSet(Octave_map *om, const gdcm::DataSet *ds, int chatty, int sequenceDepth) { ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicominfo.cpp:215:18: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] void dumpElement(Octave_map *om, const gdcm::DataElement * elem, ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicominfo.cpp:456:2: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] Octave_map om; ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicominfo.cpp:459:3: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] Octave_map subom; ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ 10 warnings generated. dicomwrite.cpp:46:55: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] void structarray2sequence(gdcm::SequenceOfItems & sq, Octave_map * om, bool trial, int sequenceDepth); ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicomwrite.cpp:135:2: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] Octave_map om=ov.map_value(); ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicomwrite.cpp:182:55: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] void structarray2sequence(gdcm::SequenceOfItems & sq, Octave_map * om, bool trial, int sequenceDepth) { ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicomwrite.cpp:190:3: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] Octave_map subom = cell(0).map_value(); ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ dicomwrite.cpp:292:3: warning: 'Octave_map' is deprecated [-Wdeprecated-declarations] Octave_map subom = ov->map_value(); ^ /usr/local/Cellar/octave/3.8.1/include/octave-3.8.1/octave/oct-map.h:484:1: note: 'Octave_map' declared here Octave_map ^ 5 warnings generated. On Jun 5, 2014, at 5:42 PM, andy buckle [via Octave] <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |