frankyeh / DSI-Studio

A Tractography Tool for Diffusion MRI
http://dsi-studio.labsolver.org
Other
122 stars 54 forks source link

Trouble compiling on Ubuntu 14.04.4 LTS 64bit / GCC 4.8 #13

Closed marcogaio closed 8 years ago

marcogaio commented 8 years ago

I'm trying to build your software in a environment as the subject, and following the instructions at http://dsi-studio.labsolver.org/dsi-studio-download/compile-dsi-studio-on-windows-mac-linux .

After some code crunching, full of warning, i get:

g++ -c -m64 -pipe -fpermissive -O2 -std=c++11 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I../src -I../src/libs -I../src/libs/dsi -I../src/libs/tracking -I../src/libs/mapping -I../../../include/qt5 -I../../../include/qt5/QtPrintSupport -I../../../include/qt5/QtOpenGL -I../../../include/qt5/QtWidgets -I../../../include/qt5/QtGui -I../../../include/qt5/QtCore -I. -I. -I. -o tract_model.o ../src/libs/tracking/tract_model.cpp
[...]
In file included from ../src/image/morphology/morphology.hpp:7:0,
                 from ../src/image/image.hpp:31,
                 from ../src/libs/tracking/roi.hpp:4,
                 from ../src/libs/tracking/tract_model.cpp:8:
../src/image/numerical/basic_op.hpp: In instantiation of ‘void image::change_endian(type&) [with type = double]’:
../src/image/numerical/basic_op.hpp:826:34:   required from ‘void image::change_endian(datatype*, size_type) [with datatype = double; size_type = long unsigned int]’
../src/image/io/dicom.hpp:162:85:   required from here
../src/image/numerical/basic_op.hpp:787:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         temp[i] = *pdata;
             ^
../src/image/numerical/basic_op.hpp:788:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     value = *(type*)temp;
           ^
make: *** [tract_model.o] Errore 1

Looking at the forum, i've tried also with gcc 4.6 (compilation stops early) and using -std=c++11 or -std=c++0x, nothing resolutive.

Can you help me? Thanks.

frankyeh commented 8 years ago

Hi Marco,

Please download TIPL library again and see if it works for you.

Best regards, Frank

On Mon, Apr 18, 2016 at 6:22 AM, Marco Gaiarin notifications@github.com wrote:

I'm trying to build your software in a environment as the subject, and following the instructions at http://dsi-studio.labsolver.org/dsi-studio-download/compile-dsi-studio-on-windows-mac-linux .

After some code crunching, full of warning, i get:

g++ -c -m64 -pipe -fpermissive -O2 -std=c++11 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I../src -I../src/libs -I../src/libs/dsi -I../src/libs/tracking -I../src/libs/mapping -I../../../include/qt5 -I../../../include/qt5/QtPrintSupport -I../../../include/qt5/QtOpenGL -I../../../include/qt5/QtWidgets -I../../../include/qt5/QtGui -I../../../include/qt5/QtCore -I. -I. -I. -o tract_model.o ../src/libs/tracking/tract_model.cpp [...] In file included from ../src/image/morphology/morphology.hpp:7:0, from ../src/image/image.hpp:31, from ../src/libs/tracking/roi.hpp:4, from ../src/libs/tracking/tract_model.cpp:8: ../src/image/numerical/basic_op.hpp: In instantiation of ‘void image::change_endian(type&) [with type = double]’: ../src/image/numerical/basic_op.hpp:826:34: required from ‘void image::changeendian(datatype, size_type) [with datatype = double; size_type = long unsigned int]’ ../src/image/io/dicom.hpp:162:85: required from here ../src/image/numerical/basic_op.hpp:787:13: warning: array subscript has type ‘char’ [-Wchar-subscripts] temp[i] = pdata; ^ ../src/image/numerical/basic_op.hpp:788:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] value = (type_)temp; ^ make: *\ [tract_model.o] Errore 1

Looking at the forum, i've tried also with gcc 4.6 (compilation stops early) and using -std=c++11 or -std=c++0x, nothing resolutive.

Can you help me? Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

marcogaio commented 8 years ago

Ok, now there's some trouble linking:

root@nikola:/usr/src/dsistudio/build# LANG=C make
g++ -m64 -Wl,-O1 -o dsi_studio main.o mainwindow.o dicom_parser.o dwi_header.o prog_interface.o sample_model.o dsi_interface_imp.o interpolation_process.o tract_cluster.o SliceModel.o tracking_window.o reconstruction_window.o slice_view_scene.o glwidget.o regiontablewidget.o Regions.o RegionModel.o tract_model.o tracttablewidget.o renderingtablewidget.o qcolorcombobox.o trk.o rec.o simulation.o vbcdialog.o src.o atlas.o fa_template.o qcustomplot.o ana.o view_image.o vbc_database.o manual_alignment.o vbc_dialog.o tract_report.o color_bar_dialog.o exp.o connectivity_matrix_dialog.o tessellated_icosahedron.o atl.o atlasdialog.o motion_dialog.o vis.o filebrowser.o qcompletelineedit.o fib_data.o connectometry_db.o tracking_thread.o qrc_icons.o moc_mainwindow.o moc_dicom_parser.o moc_tracking_window.o moc_reconstruction_window.o moc_slice_view_scene.o moc_glwidget.o moc_regiontablewidget.o moc_tracttablewidget.o moc_renderingtablewidget.o moc_qcolorcombobox.o moc_simulation.o moc_vbcdialog.o moc_qcustomplot.o moc_view_image.o moc_manual_alignment.o moc_vbc_dialog.o moc_tract_report.o moc_color_bar_dialog.o moc_connectivity_matrix_dialog.o moc_atlasdialog.o moc_motion_dialog.o moc_filebrowser.o moc_qcompletelineedit.o   -L/usr/X11R6/lib64 -lGLU -lz -lQt5PrintSupport -L/usr/lib/x86_64-linux-gnu -lQt5OpenGL -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread 
main.o: In function `void std::vector<std::string, std::allocator<std::string> >::_M_range_initialize<std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> > >(std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::forward_iterator_tag)':
main.cpp:(.text._ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag[_ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag]+0x33): undefined reference to `std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)'
main.cpp:(.text._ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag[_ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag]+0x4e): undefined reference to `std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)'
main.cpp:(.text._ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag[_ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag]+0x61): undefined reference to `std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)'
main.cpp:(.text._ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag[_ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag]+0x74): undefined reference to `std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)'
[...]

I've tried GCC 4.8 and 4.7, with -std=c++11 and =c++0x, it is the same.

I've also tried gcc-4.6, but fail with other errors:

g++-4.6 -c -m64 -pipe -fpermissive -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I../src -I../src/libs -I../src/libs/dsi -I../src/libs/tracking -I../src/libs/mapping -I../../../include/qt5 -I../../../include/qt5/QtPrintSupport -I../../../include/qt5/QtOpenGL -I../../../include/qt5/QtWidgets -I../../../include/qt5/QtGui -I../../../include/qt5/QtCore -I. -I. -I. -o main.o ../src/main.cpp
[...]
In file included from ../src/image/morphology/morphology.hpp:7:0,
                 from ../src/image/image.hpp:31,
                 from ../src/main.cpp:10:
../src/image/numerical/basic_op.hpp: In function ‘void image::change_endian(type&) [with type = double]’:
../src/image/numerical/basic_op.hpp:825:9:   instantiated from ‘void image::change_endian(datatype*, size_type) [with datatype = double, size_type = long unsigned int]’
../src/image/io/dicom.hpp:162:85:   instantiated from here
../src/image/numerical/basic_op.hpp:786:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../src/image/numerical/basic_op.hpp:787:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
make: *** [main.o] Errore 1

Clearly, boost library is installed:

root@nikola:/usr/src/dsistudio/build# dpkg -l | grep boost | grep regex
ii  libboost-regex-dev:amd64                              1.54.0.1ubuntu1                                         amd64        regular expression library for C++ (default version)
ii  libboost-regex1.54-dev:amd64                          1.54.0-4ubuntu3.1                                       amd64        regular expression library for C++
ii  libboost-regex1.54.0:amd64                            1.54.0-4ubuntu3.1                                       amd64        regular expression library for C++

Thanks.

frankyeh commented 8 years ago

Hi Marco,

You may need to try gcc 4.9. See this post about this bug:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57513

Best regards, Frank

On Mon, Apr 18, 2016 at 10:41 AM, Marco Gaiarin notifications@github.com wrote:

Ok, now there's some trouble linking:

root@nikola:/usr/src/dsistudio/build# LANG=C make g++ -m64 -Wl,-O1 -o dsi_studio main.o mainwindow.o dicom_parser.o dwi_header.o prog_interface.o sample_model.o dsi_interface_imp.o interpolation_process.o tract_cluster.o SliceModel.o tracking_window.o reconstruction_window.o slice_view_scene.o glwidget.o regiontablewidget.o Regions.o RegionModel.o tract_model.o tracttablewidget.o renderingtablewidget.o qcolorcombobox.o trk.o rec.o simulation.o vbcdialog.o src.o atlas.o fa_template.o qcustomplot.o ana.o view_image.o vbc_database.o manual_alignment.o vbc_dialog.o tract_report.o color_bar_dialog.o exp.o connectivity_matrix_dialog.o tessellated_icosahedron.o atl.o atlasdialog.o motion_dialog.o vis.o filebrowser.o qcompletelineedit.o fib_data.o connectometry_db.o tracking_thread.o qrc_icons.o moc_mainwindow.o moc_dicom_parser.o moc_tracking_window.o moc_reconstruction_window.o moc_slice_view_scene.o moc_glwidget.o moc_regiontablewidget.o moc_tracttablewidget.o moc_renderingtablewidget.o moc_qcolorcombobox.o moc_simulation.o moc_vbcdialog.o moc_qcustomplot.o moc_view_image.o moc_manual_alignment.o moc_vbc_dialog.o moc_tract_report.o moc_color_bar_dialog.o moc_connectivity_matrix_dialog.o moc_atlasdialog.o moc_motion_dialog.o moc_filebrowser.o moc_qcompletelineedit.o -L/usr/X11R6/lib64 -lGLU -lz -lQt5PrintSupport -L/usr/lib/x86_64-linux-gnu -lQt5OpenGL -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread main.o: In function void std::vector<std::string, std::allocator<std::string> >::_M_range_initialize<std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> > >(std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::forward_iterator_tag)': main.cpp:(.text._ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag[_ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag]+0x33): undefined reference tostd::regex_token_iterator<gnu_cxx::normal_iterator<char const*, std::string>, char, std::regex_traits >::regex_token_iterator(std::regex_token_iterator<gnu_cxx::normal_iterator<char const, std::string>, char, std::regex_traits > const&)' main.cpp:(.text._ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9gnu_cxx17normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag[_ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9gnu_cxx17normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag]+0x4e): undefined reference to `std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const, std::string>, char, std::regex_traits >::regex_token_iterator(std::regex_token_iterator<gnu_cxx::normal_iterator<char const*, std::string>, char, std::regex_traits > const&)' main.cpp:(.text._ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9gnu_cxx17normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag[_ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9gnu_cxx17normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag]+0x61): undefined reference to`std::regex_token_iterator<gnu_cxx::normal_iterator<char const, std::string>, char, std::regex_traits >::regex_token_iterator(std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const, std::string>, char, std::regex_traits > const&)' main.cpp:(.text._ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9gnu_cxx17normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag[_ZNSt6vectorISsSaISsEE19_M_range_initializeISt20regex_token_iteratorIN9gnu_cxx17normal_iteratorIPKcSsEEcSt12regex_traitsIcEEEEvT_SC_St20forward_iterator_tag]+0x74): undefined reference to `std::regex_token_iterator<gnu_cxx::normal_iterator<char const*, std::string>, char, std::regex_traits >::regex_token_iterator(std::regex_token_iterator<gnu_cxx::normal_iterator<char const*, std::string>, char, std::regex_traits > const&)' [...]

I've tried GCC 4.8 and 4.7, with -std=c++11 and =c++0x, it is the same.

I've also tried gcc-4.6, but fail with other errors:

g++-4.6 -c -m64 -pipe -fpermissive -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I../src -I../src/libs -I../src/libs/dsi -I../src/libs/tracking -I../src/libs/mapping -I../../../include/qt5 -I../../../include/qt5/QtPrintSupport -I../../../include/qt5/QtOpenGL -I../../../include/qt5/QtWidgets -I../../../include/qt5/QtGui -I../../../include/qt5/QtCore -I. -I. -I. -o main.o ../src/main.cpp [...] In file included from ../src/image/morphology/morphology.hpp:7:0, from ../src/image/image.hpp:31, from ../src/main.cpp:10: ../src/image/numerical/basic_op.hpp: In function ‘void image::change_endian(type&) [with type = double]’: ../src/image/numerical/basic_op.hpp:825:9: instantiated from ‘void image::changeendian(datatype, size_type) [with datatype = double, size_type = long unsigned int]’ ../src/image/io/dicom.hpp:162:85: instantiated from here ../src/image/numerical/basic_op.hpp:786:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ../src/image/numerical/basicop.hpp:787:9: warning: array subscript has type ‘char’ [-Wchar-subscripts] make: ** [main.o] Errore 1

Clearly, boost library is installed:

root@nikola:/usr/src/dsistudio/build# dpkg -l | grep boost | grep regex ii libboost-regex-dev:amd64 1.54.0.1ubuntu1 amd64 regular expression library for C++ (default version) ii libboost-regex1.54-dev:amd64 1.54.0-4ubuntu3.1 amd64 regular expression library for C++ ii libboost-regex1.54.0:amd64 1.54.0-4ubuntu3.1 amd64 regular expression library for C++

Thanks.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/13#issuecomment-211408335

marcogaio commented 8 years ago

Bingo! Thanks!

GCC 4.9 have to be installer from a 'ppa' (external/personal/unofficial/... repository), but after installation, compilation went well.

frankyeh commented 8 years ago

Thanks for your patience and help here!

On Mon, Apr 18, 2016 at 11:40 AM, Marco Gaiarin notifications@github.com wrote:

Bingo! Thanks!

GCC 4.9 have to be installer from a 'ppa' (external/personal/unofficial/... repository), but after installation, compilation went well.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/13#issuecomment-211437502

ghost commented 6 years ago

Hi Frank, I meet a similar problem on the "make" step.My Qt version is 5.2.1, g++ version is 4.9.4.

             from ../src/libs/vbc/vbc_database.h:5,
             from ../src/mainwindow.h:6,
             from ../src/main.cpp:9:

../src/image/io/io.hpp: In member function ‘void image::io::volume::change_orientation(bool, bool, bool)’: ../src/image/io/io.hpp:45:36: warning: array subscript has type ‘char’ [-Wchar-subscripts] if(xyz[dim_order[index]]) ^ ../src/image/io/io.hpp: In member function ‘bool image::io::volume::load_from_files(const string_list_type&, unsigned int)’: ../src/image/io/io.hpp:109:46: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr dicom_header(new dicom); ^ ../src/image/io/io.hpp:120:46: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr nifti_header(new nifti); ^ In file included from ../src/image/image.hpp:51:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/io/mat.hpp: In constructor ‘image::io::mat_matrix::mat_matrix(const string&)’: ../src/image/io/mat.hpp:92:18: warning: ‘image::io::mat_matrix::namelen’ will be initialized after [-Wreorder] unsigned int namelen; ^ ../src/image/io/mat.hpp:91:17: warning: ‘std::string image::io::mat_matrix::name’ [-Wreorder] std::string name; ^ ../src/image/io/mat.hpp:115:5: warning: when initialized here [-Wreorder] matmatrix(const std::string& name):type(0),rows(0),cols(0),namelen((unsigned int)name.size()+1),name(name),data_ptr(0) {} ^ In file included from ../src/image/image.hpp:51:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/io/mat.hpp: In member function ‘bool image::io::mat_read_base::load_from_file(const char_type, unsigned int, std::string)’: ../src/image/io/mat.hpp:387:45: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr matrix(new mat_matrix); ^ ../src/image/io/mat.hpp: In member function ‘bool image::io::mat_read_base::load_from_file(const char_type)’: ../src/image/io/mat.hpp:407:45: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr matrix(new mat_matrix); ^ ../src/image/io/mat.hpp: In member function ‘void image::io::mat_read_base::add(const char, const Type, unsigned int, unsigned int)’: ../src/image/io/mat.hpp:419:41: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr matrix(new mat_matrix); ^ In file included from ../src/image/image.hpp:65:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/reg/linear.hpp: In function ‘void image::reg::get_bound(const image_type1&, const transform_type&, transform_type&, transform_type&, image::reg::reg_type)’: ../src/image/reg/linear.hpp:303:49: warning: typedef ‘value_type’ locally defined but not used [-Wunused-local-typedefs] typedef typename transform_type::value_type value_type; ^ In file included from ../src/image/reg/lddmm.hpp:5:0, from ../src/image/image.hpp:66, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant_dis(const image::basic_image<PixelType, 3u>&, DetType&)’: ../src/image/numerical/dif.hpp:225:42: warning: typedef ‘value_type’ locally defined but not used [-Wunused-local-typedefs] typedef typename DetType::value_type value_type; ^ In file included from ../src/image/image.hpp:80:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::basic_layer::initialize_weight(image::uniform_dist&)’: ../src/image/ml/cnn.hpp:110:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < weight.size(); ++i) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::fully_connected_layer::initialize_weight(image::uniform_dist&)’: ../src/image/ml/cnn.hpp:184:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < bias.size();++j,++index) ^ ../src/image/ml/cnn.hpp:187:85: error: invalid initialization of non-const reference of type ‘image::pointer_image<float, 2u>&’ from an rvalue of type ‘image::pointer_image<float, 2u>’ image::geometry<2>(in_dim[0],in_dim[1]))); ^ In file included from ../src/image/image.hpp:58:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/filter/gaussian.hpp:181:6: note: in passing argument 1 of ‘void image::filter::gaussian(image_type&) [with image_type = image::pointer_image<float, 2u>]’ void gaussian(image_type& src) ^ In file included from ../src/image/image.hpp:80:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::forward_propagation(const float, float)’: ../src/image/ml/cnn.hpp:291:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < o2w_1i.size();++j) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::calculate_dwdb(const float, const float, std::vector&, std::vector&)’: ../src/image/ml/cnn.hpp:301:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < w2o_1.size(); i++) ^ ../src/image/ml/cnn.hpp:306:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < w2o_1i.size();++j) ^ ../src/image/ml/cnn.hpp:311:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < b2o.size(); i++) ^ ../src/image/ml/cnn.hpp:315:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < outs.size();++j) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::back_propagation(float, float, const float)’: ../src/image/ml/cnn.hpp:329:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < i2w_1i.size();++j) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::max_pooling_layer::forward_propagation(const float, float)’: ../src/image/ml/cnn.hpp:414:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < o2i.size(); i++) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::max_pooling_layer::back_propagation(float, float, const float)’: ../src/image/ml/cnn.hpp:431:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < o2i.size(); i++) ^ ../src/image/ml/cnn.hpp:443:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < i2o.size(); i++) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::convolutional_layer::initialize_weight(image::uniform_dist&)’: ../src/image/ml/cnn.hpp:516:89: error: invalid initialization of non-const reference of type ‘image::pointer_image<float, 2u>&’ from an rvalue of type ‘image::pointer_image<float, 2u>’ image::geometry<2>(kernel_size,kernel_size))); ^ In file included from ../src/image/image.hpp:58:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/filter/gaussian.hpp:181:6: note: in passing argument 1 of ‘void image::filter::gaussian(image_type&) [with image_type = image::pointer_image<float, 2u>]’ void gaussian(image_type& src) ^ In file included from ../src/image/image.hpp:80:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/ml/cnn.hpp: In member function ‘virtual bool image::ml::rotation_invariant_layer::init(const image::geometry<3>&, const image::geometry<3>&)’: ../src/image/ml/cnn.hpp:651:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < rotator.size();++i) ^ ../src/image/ml/cnn.hpp: In constructor ‘image::ml::dropout_layer::dropout_layer(float)’: ../src/image/ml/cnn.hpp:705:11: warning: ‘image::ml::dropout_layer::dropout_rate’ will be initialized after [-Wreorder] float dropout_rate; ^ ../src/image/ml/cnn.hpp:703:22: warning: ‘image::bernoulli image::ml::dropout_layer::bgen’ [-Wreorder] image::bernoulli bgen; ^ ../src/image/ml/cnn.hpp:706:5: warning: when initialized here [-Wreorder] dropout_layer(float dropoutrate) ^ ../src/image/ml/cnn.hpp: In member function ‘const image::ml::network& image::ml::network::operator=(const image::ml::network&)’: ../src/image/ml/cnn.hpp:910:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < rhs.layers.size();++i) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::add_noise()’: ../src/image/ml/cnn.hpp:924:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < layers.size();++i) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::reinit_weights()’: ../src/image/ml/cnn.hpp:945:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < w.size();++i) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::to_image(image::color_image&, std::vector, int, int, int)’: ../src/image/ml/cnn.hpp:1014:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < layers.size();++i) ^ ../src/image/ml/cnn.hpp:1016:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < layers.size();++i) ^ ../src/image/ml/cnn.hpp:1032:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < layer_images[i].size();++j) ^ ../src/image/ml/cnn.hpp:1057:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:1075:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < Iv1.size();++j) ^ ../src/image/ml/cnn.hpp:1112:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:1119:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i < layers.size()) ^ ../src/image/ml/cnn.hpp: In member function ‘std::string image::ml::network::get_layer_text() const’: ../src/image/ml/cnn.hpp:1241:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:1246:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i < layers.size()) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::forward_propagation(const float, float)’: ../src/image/ml/cnn.hpp:1322:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k = 0;k < layers.size();++k) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::calculate_dwdb(const float, const float, float, std::vector<std::vector >&, std::vector<std::vector >&)’: ../src/image/ml/cnn.hpp:1354:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k = 0;k < layers.size();++k) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::initialize_training()’: ../src/image/ml/cnn.hpp:1377:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < layers.size();++j) ^ In file included from ../src/image/image.hpp:83:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/vis/color_map.hpp: In member function ‘const image::vector<3>& image::color_map::operator[](unsigned int) const’: ../src/image/vis/color_map.hpp:58:89: warning: left operand of comma operator has no effect [-Wunused-value] const image::vector<3,float>& operator[](unsigned int index) const{return color[255,index];} ^ In file included from ../src/libs/tracking/fib_data.hpp:9:0, from ../src/libs/tracking/tract_model.hpp:6, from ../src/libs/vbc/vbc_database.h:8, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/libs/mapping/connectometry_db.hpp: In constructor ‘stat_model::stat_model()’: ../src/libs/mapping/connectometry_db.hpp:87:18: warning: ‘stat_model::individual_data’ will be initialized after [-Wreorder] const float individual_data; ^ ../src/libs/mapping/connectometry_db.hpp:83:70: warning: ‘stat_model:: stat_model::threshold_type’ [-Wreorder] enum {percentage = 0,t = 1,beta = 2,percentile = 3,mean_dif = 4} threshold_type; ^ ../src/libs/mapping/connectometry_db.hpp:90:5: warning: when initialized here [-Wreorder] stat_model(void):individual_data(0),threshold_type(t){} ^ In file included from ../src/cmd/cnt.cpp:3:0, from ../src/main.cpp:16: ../src/connectometry/group_connectometry.hpp: At global scope: ../src/connectometry/group_connectometry.hpp:54:31: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr model; ^ In file included from ../src/main.cpp:16:0: ../src/cmd/cnt.cpp: In function ‘int cnt()’: ../src/cmd/cnt.cpp:82:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < vbc->vbc->threads.size();++i) ^ ../src/main.cpp: In function ‘QStringList search_files(QString, QString)’: ../src/main.cpp:43:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned int i = 0;i < dir_list.size();++i) ^ ../src/main.cpp:47:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned int index = 0;index < new_list.size();++index) ^ ../src/main.cpp:50:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (unsigned int index = 0;index < file_list.size();++index) ^ In file included from ../src/image/numerical/transformation.hpp:3:0, from ../src/image/image.hpp:34, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/matrix.hpp: In instantiation of ‘void image::mat::eigen_decomposition_sym(input_iterator, output_iterator1, output_iterator2, const dym_type&) [with input_iterator = gnu_cxx::normal_iterator<double*, std::vector >; output_iterator1 = gnu_cxx::normal_iterator<double, std::vector >; output_iterator2 = __gnu_cxx::__normal_iterator<double, std::vector >; dym_type = image::dyndim]’: ../src/image/ml/em.hpp:33:108: required from here ../src/image/numerical/matrix.hpp:1901:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (k != i) ^ ../src/image/numerical/matrix.hpp: In instantiation of ‘void image::mat::svd(input_iterator, output_iterator1, output_iterator2, dym_type) [with input_iterator = float; output_iterator1 = float; output_iterator2 = float; dym_type = image::dyndim]’: ../src/image/ml/cnn.hpp:181:92: required from here ../src/image/numerical/matrix.hpp:2306:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (n != dimension.row_count()) ^ In file included from ../src/image/numerical/numerical.hpp:7:0, from ../src/image/segmentation/otsu.hpp:4, from ../src/image/segmentation/segmentation.hpp:6, from ../src/image/image.hpp:32, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/interpolation.hpp: In instantiation of ‘bool image::interpolation<weighting_function, 2u>::get_location(const image::geometry<2>&, const VTorType&) [with VTorType = image::vector<2, float>; weighting_function = image::linear_weighting]’: ../src/image/ml/cnn.hpp:664:83: required from here ../src/image/numerical/interpolation.hpp:223:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ix + 1 >= geo[0] || iy + 1>= geo[1]) ^ ../src/image/numerical/interpolation.hpp:223:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ix + 1 >= geo[0] || iy + 1>= geo[1]) ^ In file included from ../src/image/numerical/basic_op.hpp:6:0, from ../src/image/morphology/morphology.hpp:7, from ../src/image/image.hpp:31, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/utility/multi_thread.hpp: In instantiation of ‘void image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’: ../src/image/ml/cnn.hpp:1012:10: required from here ../src/image/utility/multi_thread.hpp:25:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(thread_count > size) ^ ../src/image/utility/multi_thread.hpp: In instantiation of ‘image::par_for(T, Func, int)::<lambda()> [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’: ../src/image/utility/multi_thread.hpp:29:91: required from ‘struct image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]::<lambda()>’ ../src/image/utility/multi_thread.hpp:33:10: required from ‘void image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’ ../src/image/ml/cnn.hpp:1012:10: required from here ../src/image/utility/multi_thread.hpp:31:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = id; i < size; i += thread_count) ^ ../src/image/utility/multi_thread.hpp: In instantiation of ‘void image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’: ../src/image/ml/cnn.hpp:1012:10: required from here ../src/image/utility/multi_thread.hpp:35:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < size; i += thread_count) ^ In file included from ../src/image/morphology/morphology.hpp:7:0, from ../src/image/image.hpp:31, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/basic_op.hpp: In instantiation of ‘void image::change_endian(type&) [with type = double]’: ../src/image/numerical/basic_op.hpp:904:34: required from ‘void image::change_endian(datatype, int) [with datatype = double]’ ../src/image/io/dicom.hpp:201:90: required from here ../src/image/numerical/basic_op.hpp:865:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (char i = 0; i < sizeof(type); ++i,--pdata) ^ ../src/image/numerical/basic_op.hpp:866:17: warning: array subscript has type ‘char’ [-Wchar-subscripts] temp[i] = *pdata; ^ In file included from ../src/image/image.hpp:40:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::downsampling(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<float, 2u>; ImageType2 = image::basic_image<float, 2u>]’: ../src/image/numerical/resampling.hpp:618:23: required from ‘void image::downsampling(ImageType&) [with ImageType = image::basic_image<float, 2u>]’ ../src/image/ml/cnn.hpp:1011:52: required from here ../src/image/numerical/resampling.hpp:604:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::upsampling_nearest(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<float, 2u>; ImageType2 = image::basic_image<float, 2u>]’: ../src/image/numerical/resampling.hpp:480:29: required from ‘void image::upsampling_nearest(ImageType&) [with ImageType = image::basic_image<float, 2u>]’ ../src/image/ml/cnn.hpp:1026:58: required from here ../src/image/numerical/resampling.hpp:455:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 0;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp:462:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::upsampling_nearest(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<image::rgb_color, 2u>; ImageType2 = image::basic_image<image::rgb_color, 2u>]’: ../src/image/numerical/resampling.hpp:480:29: required from ‘void image::upsampling_nearest(ImageType&) [with ImageType = image::basic_image<image::rgb_color, 2u>]’ ../src/image/ml/cnn.hpp:1095:56: required from here ../src/image/numerical/resampling.hpp:455:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 0;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp:462:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::downsampling(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<image::rgb_color, 2u>; ImageType2 = image::basic_image<image::rgb_color, 2u>]’: ../src/image/numerical/resampling.hpp:618:23: required from ‘void image::downsampling(ImageType&) [with ImageType = image::basic_image<image::rgb_color, 2u>]’ ../src/image/ml/cnn.hpp:1100:50: required from here ../src/image/numerical/resampling.hpp:604:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ make: *** [main.o] Error 1

Could you please help with this? Thanks a lot.

Best Regards, Felix Yu

frankyeh commented 6 years ago

I updated the TIPL library to fix this bug.

Thank you for reporting this error!

Best regards, Frank

On Sat, Feb 10, 2018 at 6:36 AM, felixyu1996 notifications@github.com wrote:

Hi Frank, I meet a similar problem on the "make" step.My Qt version is 5.2.1, g++ version is 4.9.4.

         from ../src/libs/vbc/vbc_database.h:5,
         from ../src/mainwindow.h:6,
         from ../src/main.cpp:9:

../src/image/io/io.hpp: In member function ‘void image::io::volume::change_orientation(bool, bool, bool)’: ../src/image/io/io.hpp:45:36: warning: array subscript has type ‘char’ [-Wchar-subscripts] if(xyz[dim_order[index]]) ^ ../src/image/io/io.hpp: In member function ‘bool image::io::volume::load_from_files(const string_list_type&, unsigned int)’: ../src/image/io/io.hpp:109:46: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr dicom_header(new dicom); ^ ../src/image/io/io.hpp:120:46: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr nifti_header(new nifti); ^ In file included from ../src/image/image.hpp:51:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/io/mat.hpp: In constructor ‘image::io::mat_matrix::mat_matrix(const string&)’: ../src/image/io/mat.hpp:92:18: warning: ‘image::io::mat_matrix::namelen’ will be initialized after [-Wreorder] unsigned int namelen; ^ ../src/image/io/mat.hpp:91:17: warning: ‘std::string image::io::mat_matrix::name’ [-Wreorder] std::string name; ^ ../src/image/io/mat.hpp:115:5: warning: when initialized here [-Wreorder] matmatrix(const std::string& name):type(0),rows(0),cols(0),namelen((unsigned int)name.size()+1),name(name),data_ptr(0) {} ^ In file included from ../src/image/image.hpp:51:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/io/mat.hpp: In member function ‘bool image::io::mat_read_base< input_interface>::load_from_file(const char_type, unsigned int, std::string)’: ../src/image/io/mat.hpp:387:45: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr matrix(new mat_matrix); ^ ../src/image/io/mat.hpp: In member function ‘bool image::io::mat_read_base< input_interface>::load_from_file(const char_type)’: ../src/image/io/mat.hpp:407:45: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr matrix(new mat_matrix); ^ ../src/image/io/mat.hpp: In member function ‘void image::io::mat_read_base::add(const char, const Type, unsigned int, unsigned int)’: ../src/image/io/mat.hpp:419:41: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr matrix(new mat_matrix); ^ In file included from ../src/image/image.hpp:65:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/reg/linear.hpp: In function ‘void image::reg::get_bound(const image_type1&, const transform_type&, transform_type&, transform_type&, image::reg::reg_type)’: ../src/image/reg/linear.hpp:303:49: warning: typedef ‘value_type’ locally defined but not used [-Wunused-local-typedefs] typedef typename transform_type::value_type value_type; ^ In file included from ../src/image/reg/lddmm.hpp:5:0, from ../src/image/image.hpp:66, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant_dis(const image::basic_image<PixelType, 3u>&, DetType&)’: ../src/image/numerical/dif.hpp:225:42: warning: typedef ‘value_type’ locally defined but not used [-Wunused-local-typedefs] typedef typename DetType::value_type value_type; ^ In file included from ../src/image/image.hpp:80:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::basic_layer::initialize_weight(image::uniform_dist&)’: ../src/image/ml/cnn.hpp:110:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < weight.size(); ++i) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::fully_connected_layer::initialize_weight( image::uniform_dist&)’: ../src/image/ml/cnn.hpp:184:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < bias.size();++j,++index) ^ ../src/image/ml/cnn.hpp:187:85: error: invalid initialization of non-const reference of type ‘image::pointer_image<float, 2u>&’ from an rvalue of type ‘image::pointer_image<float, 2u>’ image::geometry<2>(in_dim[0],in_dim[1]))); ^ In file included from ../src/image/image.hpp:58:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/filter/gaussian.hpp:181:6: note: in passing argument 1 of ‘void image::filter::gaussian(image_type&) [with image_type = image::pointer_image<float, 2u>]’ void gaussian(image_type& src) ^ In file included from ../src/image/image.hpp:80:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::forward_propagation(const float, float)’: ../src/image/ml/cnn.hpp:291:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < o2w_1i.size();++j) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::calculate_dwdb(const float, const float, std::vector&, std::vector&)’: ../src/image/ml/cnn.hpp:301:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < w2o_1.size(); i++) ^ ../src/image/ml/cnn.hpp:306:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < w2o_1i.size();++j) ^ ../src/image/ml/cnn.hpp:311:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < b2o.size(); i++) ^ ../src/image/ml/cnn.hpp:315:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < outs.size();++j) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::back_propagation(float, float, const float)’: ../src/image/ml/cnn.hpp:329:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < i2w_1i.size();++j) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::max_pooling_layer::forward_propagation(const float, float)’: ../src/image/ml/cnn.hpp:414:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < o2i.size(); i++) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::max_pooling_layer::back_propagation(float, float, const float)’: ../src/image/ml/cnn.hpp:431:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < o2i.size(); i++) ^ ../src/image/ml/cnn.hpp:443:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < i2o.size(); i++) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::convolutional_layer::initialize_weight(image::uniform_dist&)’: ../src/image/ml/cnn.hpp:516:89: error: invalid initialization of non-const reference of type ‘image::pointer_image<float, 2u>&’ from an rvalue of type ‘image::pointer_image<float, 2u>’ image::geometry<2>(kernel_size,kernel_size))); ^ In file included from ../src/image/image.hpp:58:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/filter/gaussian.hpp:181:6: note: in passing argument 1 of ‘void image::filter::gaussian(image_type&) [with image_type = image::pointer_image<float, 2u>]’ void gaussian(image_type& src) ^ In file included from ../src/image/image.hpp:80:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/ml/cnn.hpp: In member function ‘virtual bool image::ml::rotation_invariant_layer::init(const image::geometry<3>&, const image::geometry<3>&)’: ../src/image/ml/cnn.hpp:651:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < rotator.size();++i) ^ ../src/image/ml/cnn.hpp: In constructor ‘image::ml::dropout_layer:: dropout_layer(float)’: ../src/image/ml/cnn.hpp:705:11: warning: ‘image::ml::dropout_layer::dropout_rate’ will be initialized after [-Wreorder] float dropout_rate; ^ ../src/image/ml/cnn.hpp:703:22: warning: ‘image::bernoulli image::ml::dropout_layer::bgen’ [-Wreorder] image::bernoulli bgen; ^ ../src/image/ml/cnn.hpp:706:5: warning: when initialized here [-Wreorder] dropout_layer(float dropoutrate) ^ ../src/image/ml/cnn.hpp: In member function ‘const image::ml::network& image::ml::network::operator=(const image::ml::network&)’: ../src/image/ml/cnn.hpp:910:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < rhs.layers.size();++i) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::add_noise()’: ../src/image/ml/cnn.hpp:924:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < layers.size();++i) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::reinit_weights()’: ../src/image/ml/cnn.hpp:945:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < w.size();++i) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::to_image(image::color_image&, std::vector, int, int, int)’: ../src/image/ml/cnn.hpp:1014:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < layers.size();++i) ^ ../src/image/ml/cnn.hpp:1016:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < layers.size();++i) ^ ../src/image/ml/cnn.hpp:1032:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < layer_images[i].size();++j) ^ ../src/image/ml/cnn.hpp:1057:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:1075:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < Iv1.size();++j) ^ ../src/image/ml/cnn.hpp:1112:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:1119:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i < layers.size()) ^ ../src/image/ml/cnn.hpp: In member function ‘std::string image::ml::network::get_layer_text() const’: ../src/image/ml/cnn.hpp:1241:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:1246:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i < layers.size()) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::forward_propagation(const float, float)’: ../src/image/ml/cnn.hpp:1322:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k = 0;k < layers.size();++k) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::calculate_dwdb(const float, const float, float, std::vector&, std::vector&)’: ../src/image/ml/cnn.hpp:1354:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k = 0;k < layers.size();++k) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network:: initialize_training()’: ../src/image/ml/cnn.hpp:1377:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < layers.size();++j) ^ In file included from ../src/image/image.hpp:83:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/vis/color_map.hpp: In member function ‘const image::vector<3>& image::color_map::operator[](unsigned int) const’: ../src/image/vis/color_map.hpp:58:89: warning: left operand of comma operator has no effect [-Wunused-value] const image::vector<3,float>& operator[](unsigned int index) const{return color[255,index];} ^ In file included from ../src/libs/tracking/fib_data.hpp:9:0, from ../src/libs/tracking/tract_model.hpp:6, from ../src/libs/vbc/vbc_database.h:8, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/libs/mapping/connectometry_db.hpp: In constructor ‘stat_model::stat_model()’: ../src/libs/mapping/connectometry_db.hpp:87:18: warning: ‘stat_model::individual_data’ will be initialized after [-Wreorder] const float individual_data; ^ ../src/libs/mapping/connectometry_db.hpp:83:70: warning: ‘stat_model:: stat_model::threshold_type’ [-Wreorder] enum {percentage = 0,t = 1,beta = 2,percentile = 3,mean_dif = 4} threshold_type; ^ ../src/libs/mapping/connectometry_db.hpp:90:5: warning: when initialized here [-Wreorder] stat_model(void):individual_data(0),threshold_type(t){} ^ In file included from ../src/cmd/cnt.cpp:3:0, from ../src/main.cpp:16: ../src/connectometry/group_connectometry.hpp: At global scope: ../src/connectometry/group_connectometry.hpp:54:31: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr model; ^ In file included from ../src/main.cpp:16:0: ../src/cmd/cnt.cpp: In function ‘int cnt()’: ../src/cmd/cnt.cpp:82:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < vbc->vbc->threads.size();++i) ^ ../src/main.cpp: In function ‘QStringList search_files(QString, QString)’: ../src/main.cpp:43:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned int i = 0;i < dir_list.size();++i) ^ ../src/main.cpp:47:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned int index = 0;index < new_list.size();++index) ^ ../src/main.cpp:50:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (unsigned int index = 0;index < file_list.size();++index) ^ In file included from ../src/image/numerical/transformation.hpp:3:0, from ../src/image/image.hpp:34, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/matrix.hpp: In instantiation of ‘void image::mat::eigen_decomposition_sym(input_iterator, output_iterator1, output_iterator2, const dym_type&) [with input_iterator = gnu_cxx::normal_iterator<double*, std::vector >; output_iterator1 = gnu_cxx::normal_iterator<double, std::vector >; output_iterator2 = __gnu_cxx::__normal_iterator<double, std::vector >; dym_type = image::dyndim]’: ../src/image/ml/em.hpp:33:108: required from here ../src/image/numerical/matrix.hpp:1901:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (k != i) ^ ../src/image/numerical/matrix.hpp: In instantiation of ‘void image::mat::svd(input_iterator, output_iterator1, output_iterator2, dym_type) [with input_iterator = float; output_iterator1 = float; output_iterator2 = float; dym_type = image::dyndim]’: ../src/image/ml/cnn.hpp:181:92: required from here ../src/image/numerical/matrix.hpp:2306:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (n != dimension.row_count()) ^ In file included from ../src/image/numerical/numerical.hpp:7:0, from ../src/image/segmentation/otsu.hpp:4, from ../src/image/segmentation/segmentation.hpp:6, from ../src/image/image.hpp:32, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/interpolation.hpp: In instantiation of ‘bool image::interpolation<weighting_function, 2u>::get_location(const image::geometry<2>&, const VTorType&) [with VTorType = image::vector<2, float>; weighting_function = image::linear_weighting]’: ../src/image/ml/cnn.hpp:664:83: required from here ../src/image/numerical/interpolation.hpp:223:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ix + 1 >= geo[0] || iy + 1>= geo[1]) ^ ../src/image/numerical/interpolation.hpp:223:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ix + 1 >= geo[0] || iy + 1>= geo[1]) ^ In file included from ../src/image/numerical/basic_op.hpp:6:0, from ../src/image/morphology/morphology.hpp:7, from ../src/image/image.hpp:31, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/utility/multi_thread.hpp: In instantiation of ‘void image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’: ../src/image/ml/cnn.hpp:1012:10: required from here ../src/image/utility/multi_thread.hpp:25:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(thread_count > size) ^ ../src/image/utility/multi_thread.hpp: In instantiation of ‘image::par_for(T, Func, int)::<lambda()> [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’: ../src/image/utility/multi_thread.hpp:29:91: required from ‘struct image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]::<lambda()>’ ../src/image/utility/multi_thread.hpp:33:10: required from ‘void image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’ ../src/image/ml/cnn.hpp:1012:10: required from here ../src/image/utility/multi_thread.hpp:31:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = id; i < size; i += thread_count) ^ ../src/image/utility/multi_thread.hpp: In instantiation of ‘void image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’: ../src/image/ml/cnn.hpp:1012:10: required from here ../src/image/utility/multi_thread.hpp:35:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < size; i += thread_count) ^ In file included from ../src/image/morphology/morphology.hpp:7:0, from ../src/image/image.hpp:31, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/basic_op.hpp: In instantiation of ‘void image::change_endian(type&) [with type = double]’: ../src/image/numerical/basic_op.hpp:904:34: required from ‘void image::change_endian(datatype, int) [with datatype = double]’ ../src/image/io/dicom.hpp:201:90: required from here ../src/image/numerical/basic_op.hpp:865:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (char i = 0; i < sizeof(type); ++i,--pdata) ^ ../src/image/numerical/basic_op.hpp:866:17: warning: array subscript has type ‘char’ [-Wchar-subscripts] temp[i] = *pdata; ^ In file included from ../src/image/image.hpp:40:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::downsampling(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<float, 2u>; ImageType2 = image::basic_image<float, 2u>]’: ../src/image/numerical/resampling.hpp:618:23: required from ‘void image::downsampling(ImageType&) [with ImageType = image::basic_image<float, 2u>]’ ../src/image/ml/cnn.hpp:1011:52: required from here ../src/image/numerical/resampling.hpp:604:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::upsampling_nearest(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<float, 2u>; ImageType2 = image::basic_image<float, 2u>]’: ../src/image/numerical/resampling.hpp:480:29: required from ‘void image::upsampling_nearest(ImageType&) [with ImageType = image::basic_image<float, 2u>]’ ../src/image/ml/cnn.hpp:1026:58: required from here ../src/image/numerical/resampling.hpp:455:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 0;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp:462:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::upsampling_nearest(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<image::rgb_color, 2u>; ImageType2 = image::basic_image<image::rgb_color, 2u>]’: ../src/image/numerical/resampling.hpp:480:29: required from ‘void image::upsampling_nearest(ImageType&) [with ImageType = image::basic_image<image::rgb_color, 2u>]’ ../src/image/ml/cnn.hpp:1095:56: required from here ../src/image/numerical/resampling.hpp:455:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 0;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp:462:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::downsampling(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<image::rgb_color, 2u>; ImageType2 = image::basic_image<image::rgb_color, 2u>]’: ../src/image/numerical/resampling.hpp:618:23: required from ‘void image::downsampling(ImageType&) [with ImageType = image::basic_image<image::rgb_color, 2u>]’ ../src/image/ml/cnn.hpp:1100:50: required from here ../src/image/numerical/resampling.hpp:604:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ make: *** [main.o] Error 1

Could you please help with this? Thanks a lot.

Best Regards, Felix Yu

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/13#issuecomment-364645480, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ0cfMYBLwhva06c-F9Vs_KVaLZwk-0ks5tTX8igaJpZM4IJkx9 .

ghost commented 6 years ago

Dear Frank,

Thank you for your reply! I've solved this problem and installed DSIstudio successfully. Thank you again for this amazing tool.

Best, Felix Yu

On Mon, Feb 12, 2018 at 11:56 PM, frankyeh notifications@github.com wrote:

I updated the TIPL library to fix this bug.

Thank you for reporting this error!

Best regards, Frank

On Sat, Feb 10, 2018 at 6:36 AM, felixyu1996 notifications@github.com wrote:

Hi Frank, I meet a similar problem on the "make" step.My Qt version is 5.2.1, g++ version is 4.9.4.

from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9:

../src/image/io/io.hpp: In member function ‘void image::io::volume::change_orientation(bool, bool, bool)’: ../src/image/io/io.hpp:45:36: warning: array subscript has type ‘char’ [-Wchar-subscripts] if(xyz[dim_order[index]]) ^ ../src/image/io/io.hpp: In member function ‘bool image::io::volume::load_from_files(const string_list_type&, unsigned int)’: ../src/image/io/io.hpp:109:46: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr dicom_header(new dicom); ^ ../src/image/io/io.hpp:120:46: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr nifti_header(new nifti); ^ In file included from ../src/image/image.hpp:51:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/io/mat.hpp: In constructor ‘image::io::matmatrix::mat matrix(const string&)’: ../src/image/io/mat.hpp:92:18: warning: ‘image::io::mat_matrix::namelen’ will be initialized after [-Wreorder] unsigned int namelen; ^ ../src/image/io/mat.hpp:91:17: warning: ‘std::string image::io::mat_matrix::name’ [-Wreorder] std::string name; ^ ../src/image/io/mat.hpp:115:5: warning: when initialized here [-Wreorder] matmatrix(const std::string& name):type(0),rows(0),cols(0) ,namelen((unsigned int)name.size()+1),name(name),data_ptr(0) {} ^ In file included from ../src/image/image.hpp:51:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/io/mat.hpp: In member function ‘bool image::io::mat_read_base< input_interface>::load_from_file(const char_type, unsigned int, std::string)’: ../src/image/io/mat.hpp:387:45: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr matrix(new mat_matrix); ^ ../src/image/io/mat.hpp: In member function ‘bool image::io::mat_read_base< input_interface>::load_from_file(const char_type)’: ../src/image/io/mat.hpp:407:45: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr matrix(new mat_matrix); ^ ../src/image/io/mat.hpp: In member function ‘void image::io::mat_read_base::add(const char, const Type, unsigned int, unsigned int)’: ../src/image/io/mat.hpp:419:41: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr matrix(new mat_matrix); ^ In file included from ../src/image/image.hpp:65:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/reg/linear.hpp: In function ‘void image::reg::get_bound(const image_type1&, const transform_type&, transform_type&, transform_type&, image::reg::reg_type)’: ../src/image/reg/linear.hpp:303:49: warning: typedef ‘value_type’ locally defined but not used [-Wunused-local-typedefs] typedef typename transform_type::value_type value_type; ^ In file included from ../src/image/reg/lddmm.hpp:5:0, from ../src/image/image.hpp:66, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant_dis(const image::basic_image<PixelType, 3u>&, DetType&)’: ../src/image/numerical/dif.hpp:225:42: warning: typedef ‘value_type’ locally defined but not used [-Wunused-local-typedefs] typedef typename DetType::value_type value_type; ^ In file included from ../src/image/image.hpp:80:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::basic_layer::initialize_weight(image::uniform_dist&)’: ../src/image/ml/cnn.hpp:110:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < weight.size(); ++i) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::fully_connected_layer::initialize_weight( image::uniform_dist&)’: ../src/image/ml/cnn.hpp:184:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < bias.size();++j,++index) ^ ../src/image/ml/cnn.hpp:187:85: error: invalid initialization of non-const reference of type ‘image::pointer_image<float, 2u>&’ from an rvalue of type ‘image::pointer_image<float, 2u>’ image::geometry<2>(in_dim[0],in_dim[1]))); ^ In file included from ../src/image/image.hpp:58:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/filter/gaussian.hpp:181:6: note: in passing argument 1 of ‘void image::filter::gaussian(image_type&) [with image_type = image::pointer_image<float, 2u>]’ void gaussian(image_type& src) ^ In file included from ../src/image/image.hpp:80:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::forward_propagation(const float, float)’: ../src/image/ml/cnn.hpp:291:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < o2w_1i.size();++j) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::calculate_dwdb(const float, const float, std::vector&, std::vector&)’: ../src/image/ml/cnn.hpp:301:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < w2o_1.size(); i++) ^ ../src/image/ml/cnn.hpp:306:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < w2o_1i.size();++j) ^ ../src/image/ml/cnn.hpp:311:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < b2o.size(); i++) ^ ../src/image/ml/cnn.hpp:315:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < outs.size();++j) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::back_propagation(float, float, const float)’: ../src/image/ml/cnn.hpp:329:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < i2w_1i.size();++j) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::max_pooling_layer::forward_propagation(const float, float)’: ../src/image/ml/cnn.hpp:414:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < o2i.size(); i++) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::max_pooling_layer::back_propagation(float, float, const float)’: ../src/image/ml/cnn.hpp:431:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < o2i.size(); i++) ^ ../src/image/ml/cnn.hpp:443:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < i2o.size(); i++) ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::convolutional_layer::initialize_weight( image::uniform_dist&)’: ../src/image/ml/cnn.hpp:516:89: error: invalid initialization of non-const reference of type ‘image::pointer_image<float, 2u>&’ from an rvalue of type ‘image::pointer_image<float, 2u>’ image::geometry<2>(kernel_size,kernel_size))); ^ In file included from ../src/image/image.hpp:58:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/filter/gaussian.hpp:181:6: note: in passing argument 1 of ‘void image::filter::gaussian(image_type&) [with image_type = image::pointer_image<float, 2u>]’ void gaussian(image_type& src) ^ In file included from ../src/image/image.hpp:80:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/ml/cnn.hpp: In member function ‘virtual bool image::ml::rotation_invariant_layer::init(const image::geometry<3>&, const image::geometry<3>&)’: ../src/image/ml/cnn.hpp:651:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < rotator.size();++i) ^ ../src/image/ml/cnn.hpp: In constructor ‘image::ml::dropout_layer:: dropout_layer(float)’: ../src/image/ml/cnn.hpp:705:11: warning: ‘image::ml::dropout_layer:: dropout_rate’ will be initialized after [-Wreorder] float dropout_rate; ^ ../src/image/ml/cnn.hpp:703:22: warning: ‘image::bernoulli image::ml::dropout_layer::bgen’ [-Wreorder] image::bernoulli bgen; ^ ../src/image/ml/cnn.hpp:706:5: warning: when initialized here [-Wreorder] dropout_layer(float dropoutrate) ^ ../src/image/ml/cnn.hpp: In member function ‘const image::ml::network& image::ml::network::operator=(const image::ml::network&)’: ../src/image/ml/cnn.hpp:910:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < rhs.layers.size();++i) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::add_noise()’: ../src/image/ml/cnn.hpp:924:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < layers.size();++i) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::reinit_weights()’: ../src/image/ml/cnn.hpp:945:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < w.size();++i) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::to_image(image::color_image&, std::vector, int, int, int)’: ../src/image/ml/cnn.hpp:1014:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < layers.size();++i) ^ ../src/image/ml/cnn.hpp:1016:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < layers.size();++i) ^ ../src/image/ml/cnn.hpp:1032:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < layer_images[i].size();++j) ^ ../src/image/ml/cnn.hpp:1057:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:1075:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < Iv1.size();++j) ^ ../src/image/ml/cnn.hpp:1112:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:1119:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i < layers.size()) ^ ../src/image/ml/cnn.hpp: In member function ‘std::string image::ml::network::get_layer_text() const’: ../src/image/ml/cnn.hpp:1241:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:1246:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i < layers.size()) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::forward_propagation(const float, float)’: ../src/image/ml/cnn.hpp:1322:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k = 0;k < layers.size();++k) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::calculate_dwdb(const float, const float, float, std::vector&, std::vector&)’: ../src/image/ml/cnn.hpp:1354:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k = 0;k < layers.size();++k) ^ ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network:: initialize_training()’: ../src/image/ml/cnn.hpp:1377:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0;j < layers.size();++j) ^ In file included from ../src/image/image.hpp:83:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/vis/color_map.hpp: In member function ‘const image::vector<3>& image::color_map::operator[](unsigned int) const’: ../src/image/vis/color_map.hpp:58:89: warning: left operand of comma operator has no effect [-Wunused-value] const image::vector<3,float>& operator[](unsigned int index) const{return color[255,index];} ^ In file included from ../src/libs/tracking/fib_data.hpp:9:0, from ../src/libs/tracking/tract_model.hpp:6, from ../src/libs/vbc/vbc_database.h:8, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/libs/mapping/connectometry_db.hpp: In constructor ‘stat_model::stat_model()’: ../src/libs/mapping/connectometry_db.hpp:87:18: warning: ‘stat_model::individual_data’ will be initialized after [-Wreorder] const float individual_data; ^ ../src/libs/mapping/connectometry_db.hpp:83:70: warning: ‘stat_model:: stat_model::threshold_type’ [-Wreorder] enum {percentage = 0,t = 1,beta = 2,percentile = 3,mean_dif = 4} threshold_type; ^ ../src/libs/mapping/connectometry_db.hpp:90:5: warning: when initialized here [-Wreorder] stat_model(void):individual_data(0),threshold_type(t){} ^ In file included from ../src/cmd/cnt.cpp:3:0, from ../src/main.cpp:16: ../src/connectometry/group_connectometry.hpp: At global scope: ../src/connectometry/group_connectometry.hpp:54:31: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr model; ^ In file included from ../src/main.cpp:16:0: ../src/cmd/cnt.cpp: In function ‘int cnt()’: ../src/cmd/cnt.cpp:82:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < vbc->vbc->threads.size();++i) ^ ../src/main.cpp: In function ‘QStringList search_files(QString, QString)’: ../src/main.cpp:43:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned int i = 0;i < dir_list.size();++i) ^ ../src/main.cpp:47:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned int index = 0;index < new_list.size();++index) ^ ../src/main.cpp:50:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (unsigned int index = 0;index < file_list.size();++index) ^ In file included from ../src/image/numerical/transformation.hpp:3:0, from ../src/image/image.hpp:34, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/matrix.hpp: In instantiation of ‘void image::mat::eigen_decomposition_sym(input_iterator, output_iterator1, output_iterator2, const dym_type&) [with input_iterator = gnu_cxx::normal_iterator<double*, std::vector >; output_iterator1 = gnu_cxx::normal_iterator<double, std::vector >; output_iterator2 = __gnu_cxx::__normal_iterator<double, std::vector >; dym_type = image::dyndim]’: ../src/image/ml/em.hpp:33:108: required from here ../src/image/numerical/matrix.hpp:1901:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (k != i) ^ ../src/image/numerical/matrix.hpp: In instantiation of ‘void image::mat::svd(input_iterator, output_iterator1, output_iterator2, dym_type) [with input_iterator = float; output_iterator1 = float; output_iterator2 = float; dym_type = image::dyndim]’: ../src/image/ml/cnn.hpp:181:92: required from here ../src/image/numerical/matrix.hpp:2306:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (n != dimension.row_count()) ^ In file included from ../src/image/numerical/numerical.hpp:7:0, from ../src/image/segmentation/otsu.hpp:4, from ../src/image/segmentation/segmentation.hpp:6, from ../src/image/image.hpp:32, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/interpolation.hpp: In instantiation of ‘bool image::interpolation<weighting_function, 2u>::get_location(const image::geometry<2>&, const VTorType&) [with VTorType = image::vector<2, float>; weighting_function = image::linear_weighting]’: ../src/image/ml/cnn.hpp:664:83: required from here ../src/image/numerical/interpolation.hpp:223:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ix + 1 >= geo[0] || iy + 1>= geo[1]) ^ ../src/image/numerical/interpolation.hpp:223:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ix + 1 >= geo[0] || iy + 1>= geo[1]) ^ In file included from ../src/image/numerical/basic_op.hpp:6:0, from ../src/image/morphology/morphology.hpp:7, from ../src/image/image.hpp:31, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/utility/multi_thread.hpp: In instantiation of ‘void image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’: ../src/image/ml/cnn.hpp:1012:10: required from here ../src/image/utility/multi_thread.hpp:25:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(thread_count > size) ^ ../src/image/utility/multi_thread.hpp: In instantiation of ‘image::par_for(T, Func, int)::<lambda()> [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’: ../src/image/utility/multi_thread.hpp:29:91: required from ‘struct image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]::<lambda()>’ ../src/image/utility/multi_thread.hpp:33:10: required from ‘void image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’ ../src/image/ml/cnn.hpp:1012:10: required from here ../src/image/utility/multi_thread.hpp:31:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = id; i < size; i += thread_count) ^ ../src/image/utility/multi_thread.hpp: In instantiation of ‘void image::par_for(T, Func, int) [with T = long unsigned int; Func = image::ml::network::to_image(image::color_image&, std::vector, int, int, int)::<lambda(int)>]’: ../src/image/ml/cnn.hpp:1012:10: required from here ../src/image/utility/multi_thread.hpp:35:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < size; i += thread_count) ^ In file included from ../src/image/morphology/morphology.hpp:7:0, from ../src/image/image.hpp:31, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/basic_op.hpp: In instantiation of ‘void image::change_endian(type&) [with type = double]’: ../src/image/numerical/basic_op.hpp:904:34: required from ‘void image::change_endian(datatype, int) [with datatype = double]’ ../src/image/io/dicom.hpp:201:90: required from here ../src/image/numerical/basic_op.hpp:865:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (char i = 0; i < sizeof(type); ++i,--pdata) ^ ../src/image/numerical/basic_op.hpp:866:17: warning: array subscript has type ‘char’ [-Wchar-subscripts] temp[i] = *pdata; ^ In file included from ../src/image/image.hpp:40:0, from ../src/libs/vbc/vbc_database.h:5, from ../src/mainwindow.h:6, from ../src/main.cpp:9: ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::downsampling(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<float, 2u>; ImageType2 = image::basic_image<float, 2u>]’: ../src/image/numerical/resampling.hpp:618:23: required from ‘void image::downsampling(ImageType&) [with ImageType = image::basic_image<float, 2u>]’ ../src/image/ml/cnn.hpp:1011:52: required from here ../src/image/numerical/resampling.hpp:604:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::upsampling_nearest(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<float, 2u>; ImageType2 = image::basic_image<float, 2u>]’: ../src/image/numerical/resampling.hpp:480:29: required from ‘void image::upsampling_nearest(ImageType&) [with ImageType = image::basic_image<float, 2u>]’ ../src/image/ml/cnn.hpp:1026:58: required from here ../src/image/numerical/resampling.hpp:455:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 0;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp:462:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::upsampling_nearest(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<image::rgb_color, 2u>; ImageType2 = image::basic_image<image::rgb_color, 2u>]’: ../src/image/numerical/resampling.hpp:480:29: required from ‘void image::upsampling_nearest(ImageType&) [with ImageType = image::basic_image<image::rgb_color, 2u>]’ ../src/image/ml/cnn.hpp:1095:56: required from here ../src/image/numerical/resampling.hpp:455:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 0;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp:462:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ ../src/image/numerical/resampling.hpp: In instantiation of ‘void image::downsampling(const ImageType1&, ImageType2&) [with ImageType1 = image::basic_image<image::rgb_color, 2u>; ImageType2 = image::basic_image<image::rgb_color, 2u>]’: ../src/image/numerical/resampling.hpp:618:23: required from ‘void image::downsampling(ImageType&) [with ImageType = image::basic_image<image::rgb_color, 2u>]’ ../src/image/ml/cnn.hpp:1100:50: required from here ../src/image/numerical/resampling.hpp:604:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int dim = 1;dim < ImageType1::dimension;++dim) ^ make: *** [main.o] Error 1

Could you please help with this? Thanks a lot.

Best Regards, Felix Yu

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/frankyeh/DSI-Studio/issues/13#issuecomment-364645480 , or mute the thread https://github.com/notifications/unsubscribe- auth/AAQ0cfMYBLwhva06c-F9Vs_KVaLZwk-0ks5tTX8igaJpZM4IJkx9 .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/13#issuecomment-364966535, or mute the thread https://github.com/notifications/unsubscribe-auth/AipXgt_T_1uzBD4fvrB4XTJWh5nPS4b2ks5tUF8UgaJpZM4IJkx9 .