frankyeh / TIPL

template image processing library
Other
20 stars 10 forks source link

[image::pixel_index] missing `is_valid` and `next`? #3

Closed WillForan closed 4 years ago

WillForan commented 8 years ago

trying to compile within dsi studio i see the following errors

../src/image/numerical/basic_op.hpp:691:41: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
../src/image/numerical/basic_op.hpp:691:73: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
../src/image/numerical/numerical.hpp:173:43: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
../src/image/numerical/numerical.hpp:173:74: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
../src/image/numerical/optimization.hpp:25:43: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
../src/image/numerical/optimization.hpp:25:72: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
../src/image/numerical/dif.hpp:131:66: error: ‘class image::pixel_index<3u>’ has no member named ‘next’
../src/image/numerical/dif.hpp:192:66: error: ‘class image::pixel_index<3u>’ has no member named ‘next’
../src/image/numerical/dif.hpp:251:45: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
../src/image/numerical/dif.hpp:251:66: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
../src/image/numerical/dif.hpp:283:45: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
../src/image/numerical/dif.hpp:283:66: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
../src/image/reg/reg.hpp:41:14: error: declaration of ‘class value_type’
../src/image/reg/reg.hpp:11:10: error:  shadows template parm ‘class value_type’
../src/image/ml/cnn.hpp:42:22: error: ‘expf’ is not a member of ‘std’
../src/image/ml/cnn.hpp:59:35: error: ‘expf’ is not a member of ‘std’
../src/image/ml/cnn.hpp:612:22: error: ‘expf’ is not a member of ‘std’
../src/image/ml/cnn.hpp:793:92: error: no matching function for call to ‘std::istream_iterator<float>::istream_iterator(std::istringstream)’
../src/image/ml/cnn.hpp:798:92: error: no matching function for call to ‘std::istream_iterator<float>::istream_iterator(std::istringstream)’

the full output:

+ make
g++ -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/usr/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 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/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::project(const image::basic_image<PixelType, 2u>&, OutImageType&, unsigned int)’:
../src/image/numerical/basic_op.hpp:691:41: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
         for(pixel_index<2> index; index.is_valid(src.geometry()); index.next(src.geometry()))
                                         ^
../src/image/numerical/basic_op.hpp:691:73: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
         for(pixel_index<2> index; index.is_valid(src.geometry()); index.next(src.geometry()))
                                                                         ^
In file included from ../src/image/segmentation/otsu.hpp:4:0,
                 from ../src/image/segmentation/segmentation.hpp:6,
                 from ../src/image/image.hpp:32,
                 from ../src/main.cpp:10:
../src/image/numerical/numerical.hpp: In function ‘void image::gradient_multiple_sampling(const image::basic_image<pixel_type1, 2u, storage_type1>&, VectorImageType&, double, unsigned int, unsigned int)’:
../src/image/numerical/numerical.hpp:173:43: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
     for (image::pixel_index<2> iter; iter.is_valid(src.geometry()); iter.next(src.geometry()))
                                           ^
../src/image/numerical/numerical.hpp:173:74: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
     for (image::pixel_index<2> iter; iter.is_valid(src.geometry()); iter.next(src.geometry()))
                                                                          ^
In file included from ../src/image/image.hpp:43:0,
                 from ../src/main.cpp:10:
../src/image/numerical/optimization.hpp: In function ‘void image::optimization::plot_fun_2d(image_type&, iter_type1, iter_type1, iter_type1, iter_type1, function_type&, unsigned int, unsigned int, unsigned int)’:
../src/image/numerical/optimization.hpp:25:43: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
     for(image::pixel_index<2> index;index.is_valid(I.geometry());index.next(I.geometry()))
                                           ^
../src/image/numerical/optimization.hpp:25:72: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
     for(image::pixel_index<2> index;index.is_valid(I.geometry());index.next(I.geometry()))
                                                                        ^
In file included from ../src/image/image.hpp:47:0,
                 from ../src/main.cpp:10:
../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 ‘void image::io::volume::reorientation()’:
../src/image/io/io.hpp:56:52: warning: array subscript has type ‘char’ [-Wchar-subscripts]
                 spatial_resolution[dim_order[index]] = sr[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:133:46: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
             std::auto_ptr<dicom> dicom_header(new dicom);
                                              ^
../src/image/io/io.hpp:144:46: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
             std::auto_ptr<nifti> nifti_header(new nifti);
                                              ^
In file included from ../src/image/image.hpp:51:0,
                 from ../src/main.cpp:10:
../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]
     mat_matrix(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/main.cpp:10:
../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<mat_matrix> 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<mat_matrix> matrix(new mat_matrix);
                                             ^
../src/image/io/mat.hpp: In member function ‘void image::io::mat_read_base<input_interface>::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<mat_matrix> matrix(new mat_matrix);
                                         ^
In file included from ../src/image/image.hpp:58:0,
                 from ../src/main.cpp:10:
../src/image/filter/gaussian.hpp: In function ‘void image::filter::gaussian(image_type&)’:
../src/image/filter/gaussian.hpp:113:69: warning: to refer to a type member of a template parameter, use ‘typename image_type:: value_type’ [-fpermissive]
     gaussian_filter_imp<image_type::value_type,image_type::dimension>()(src);
                                                                     ^
In file included from ../src/image/reg/lddmm.hpp:5:0,
                 from ../src/image/image.hpp:66,
                 from ../src/main.cpp:10:
../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant(const image::basic_image<PixelType, 3u>&, DetType&)’:
../src/image/numerical/dif.hpp:131:66: error: ‘class image::pixel_index<3u>’ has no member named ‘next’
     for (image::pixel_index<3> index; index.is_valid(geo); index.next(geo))
                                                                  ^
../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant_dis(const image::basic_image<PixelType, 3u>&, DetType&)’:
../src/image/numerical/dif.hpp:192:66: error: ‘class image::pixel_index<3u>’ has no member named ‘next’
     for (image::pixel_index<3> index; index.is_valid(geo); index.next(geo))
                                                                  ^
../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant(const image::basic_image<PixelType, 2u>&, image::basic_image<PixelType2, 2u>&)’:
../src/image/numerical/dif.hpp:251:45: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
     for (image::pixel_index<2> index; index.is_valid(geo); index.next(geo))
                                             ^
../src/image/numerical/dif.hpp:251:66: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
     for (image::pixel_index<2> index; index.is_valid(geo); index.next(geo))
                                                                  ^
../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant_dis(const image::basic_image<PixelType, 2u>&, image::basic_image<PixelType2, 2u>&)’:
../src/image/numerical/dif.hpp:283:45: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’
     for (image::pixel_index<2> index; index.is_valid(geo); index.next(geo))
                                             ^
../src/image/numerical/dif.hpp:283:66: error: ‘class image::pixel_index<2u>’ has no member named ‘next’
     for (image::pixel_index<2> index; index.is_valid(geo); index.next(geo))
                                                                  ^
In file included from ../src/image/image.hpp:69:0,
                 from ../src/main.cpp:10:
../src/image/reg/reg.hpp: At global scope:
../src/image/reg/reg.hpp:41:14: error: declaration of ‘class value_type’
     template<typename value_type>
              ^
../src/image/reg/reg.hpp:11:10: error:  shadows template parm ‘class value_type’
 template<typename value_type>
          ^
../src/image/reg/reg.hpp: In member function ‘void image::reg::normalization<value_type>::run_reg(const image_type&, const vector_type&, const image_type&, const vector_type&, int, image::reg::reg_cost_type, image::reg::reg_type, terminate_type&, int)’:
../src/image/reg/reg.hpp:85:72: warning: to refer to a type member of a template parameter, use ‘typename image_type:: value_type’ [-fpermissive]
         image::basic_image<image_type::value_type,image_type::dimension> new_from(to.geometry());
                                                                        ^
In file included from ../src/image/image.hpp:83:0,
                 from ../src/main.cpp:10:
../src/image/ml/cnn.hpp: In function ‘float image::ml::tanh_f(value_type)’:
../src/image/ml/cnn.hpp:42:22: error: ‘expf’ is not a member of ‘std’
     const float ep = std::expf(v + v);
                      ^
../src/image/ml/cnn.hpp:42:22: note: suggested alternative:
In file included from /usr/include/c++/4.9/cmath:44:0,
                 from /usr/include/c++/4.9/random:38,
                 from /usr/include/c++/4.9/bits/stl_algo.h:66,
                 from /usr/include/c++/4.9/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:89,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:1,
                 from ../src/main.cpp:5:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: note:   ‘expf’
 __MATHCALL (exp,, (_Mdouble_ __x));
 ^
In file included from ../src/image/image.hpp:83:0,
                 from ../src/main.cpp:10:
../src/image/ml/cnn.hpp: In function ‘float image::ml::sigmoid_f(value_type)’:
../src/image/ml/cnn.hpp:59:35: error: ‘expf’ is not a member of ‘std’
     return float(1) / (float(1) + std::expf(-v));
                                   ^
../src/image/ml/cnn.hpp:59:35: note: suggested alternative:
In file included from /usr/include/c++/4.9/cmath:44:0,
                 from /usr/include/c++/4.9/random:38,
                 from /usr/include/c++/4.9/bits/stl_algo.h:66,
                 from /usr/include/c++/4.9/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:89,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:1,
                 from ../src/main.cpp:5:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: note:   ‘expf’
 __MATHCALL (exp,, (_Mdouble_ __x));
 ^
In file included from ../src/image/image.hpp:83:0,
                 from ../src/main.cpp:10:
../src/image/ml/cnn.hpp: In member function ‘void image::ml::basic_layer::reset()’:
../src/image/ml/cnn.hpp:102:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i = 0; i < weight.size(); ++i)
                          ^
../src/image/ml/cnn.hpp: At global scope:
../src/image/ml/cnn.hpp:129:46: warning: unused parameter ‘dE_da’ [-Wunused-parameter]
     virtual void calculate_dwdb(const float* dE_da,
                                              ^
../src/image/ml/cnn.hpp:130:48: warning: unused parameter ‘prev_out’ [-Wunused-parameter]
                                   const float* prev_out,
                                                ^
../src/image/ml/cnn.hpp:131:55: warning: unused parameter ‘dweight’ [-Wunused-parameter]
                                   std::vector<float>& dweight,
                                                       ^
../src/image/ml/cnn.hpp:132:55: warning: unused parameter ‘dbias’ [-Wunused-parameter]
                                   std::vector<float>& dbias){}
                                                       ^
../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:236: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<float, std::allocator<float> >&, std::vector<float, std::allocator<float> >&)’:
../src/image/ml/cnn.hpp:246: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:251: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:256:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i = 0; i < b2o.size(); i++)
                          ^
../src/image/ml/cnn.hpp:260: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:274: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 constructor ‘image::ml::connection_table::connection_table(int, int)’:
../src/image/ml/cnn.hpp:419:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int y = 0;y < c.height();++y)
                         ^
../src/image/ml/cnn.hpp: In constructor ‘image::ml::convolutional_layer::convolutional_layer(image::ml::activation_type, int, const image::ml::connection_table&)’:
../src/image/ml/cnn.hpp:442:9: warning: ‘image::ml::convolutional_layer::kernel_size’ will be initialized after [-Wreorder]
     int kernel_size;
         ^
../src/image/ml/cnn.hpp:439:22: warning:   ‘image::ml::connection_table image::ml::convolutional_layer::connection’ [-Wreorder]
     connection_table connection;
                      ^
../src/image/ml/cnn.hpp:444:5: warning:   when initialized here [-Wreorder]
     convolutional_layer(activation_type af_,int kernel_size_,const connection_table& connection_ = connection_table())
     ^
In file included from ../src/image/image.hpp:83:0,
                 from ../src/main.cpp:10:
../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::soft_max_layer::forward_propagation(const float*, float*)’:
../src/image/ml/cnn.hpp:612:22: error: ‘expf’ is not a member of ‘std’
             out[i] = std::expf(data[i]);
                      ^
../src/image/ml/cnn.hpp:612:22: note: suggested alternative:
In file included from /usr/include/c++/4.9/cmath:44:0,
                 from /usr/include/c++/4.9/random:38,
                 from /usr/include/c++/4.9/bits/stl_algo.h:66,
                 from /usr/include/c++/4.9/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:89,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:1,
                 from ../src/main.cpp:5:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: note:   ‘expf’
 __MATHCALL (exp,, (_Mdouble_ __x));
 ^
In file included from ../src/image/image.hpp:83:0,
                 from ../src/main.cpp:10:
../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::save_to_file(const char*)’:
../src/image/ml/cnn.hpp:743:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i = 0;i < geo.size();++i)
                         ^
../src/image/ml/cnn.hpp:748:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if(i < layers.size())
                  ^
../src/image/ml/cnn.hpp: In member function ‘bool image::ml::network::load_from_file(const char*)’:
../src/image/ml/cnn.hpp:793:92: error: no matching function for call to ‘std::istream_iterator<float>::istream_iterator(std::istringstream)’
                 std::vector<float> w((std::istream_iterator<float>(std::istringstream(line))),(std::istream_iterator<float>()));
                                                                                            ^
../src/image/ml/cnn.hpp:793:92: note: candidates are:
In file included from /usr/include/c++/4.9/iterator:66:0,
                 from ../src/main.cpp:2:
/usr/include/c++/4.9/bits/stream_iterator.h:72:7: note: std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator(const std::istream_iterator<_Tp, _CharT, _Traits, _Dist>&) [with _Tp = float; _CharT = char; _Traits = std::char_traits<char>; _Dist = long int]
       istream_iterator(const istream_iterator& __obj)
       ^
/usr/include/c++/4.9/bits/stream_iterator.h:72:7: note:   no known conversion for argument 1 from ‘std::istringstream {aka std::basic_istringstream<char>}’ to ‘const std::istream_iterator<float>&’
/usr/include/c++/4.9/bits/stream_iterator.h:68:7: note: std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator(std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_type&) [with _Tp = float; _CharT = char; _Traits = std::char_traits<char>; _Dist = long int; std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_type = std::basic_istream<char>]
       istream_iterator(istream_type& __s)
       ^
/usr/include/c++/4.9/bits/stream_iterator.h:68:7: note:   no known conversion for argument 1 from ‘std::istringstream {aka std::basic_istringstream<char>}’ to ‘std::istream_iterator<float>::istream_type& {aka std::basic_istream<char>&}’
/usr/include/c++/4.9/bits/stream_iterator.h:64:26: note: constexpr std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator() [with _Tp = float; _CharT = char; _Traits = std::char_traits<char>; _Dist = long int]
       _GLIBCXX_CONSTEXPR istream_iterator()
                          ^
/usr/include/c++/4.9/bits/stream_iterator.h:64:26: note:   candidate expects 0 arguments, 1 provided
In file included from ../src/image/image.hpp:83:0,
                 from ../src/main.cpp:10:
../src/image/ml/cnn.hpp:798:92: error: no matching function for call to ‘std::istream_iterator<float>::istream_iterator(std::istringstream)’
                 std::vector<float> b((std::istream_iterator<float>(std::istringstream(line))),(std::istream_iterator<float>()));
                                                                                            ^
../src/image/ml/cnn.hpp:798:92: note: candidates are:
In file included from /usr/include/c++/4.9/iterator:66:0,
                 from ../src/main.cpp:2:
/usr/include/c++/4.9/bits/stream_iterator.h:72:7: note: std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator(const std::istream_iterator<_Tp, _CharT, _Traits, _Dist>&) [with _Tp = float; _CharT = char; _Traits = std::char_traits<char>; _Dist = long int]
       istream_iterator(const istream_iterator& __obj)
       ^
/usr/include/c++/4.9/bits/stream_iterator.h:72:7: note:   no known conversion for argument 1 from ‘std::istringstream {aka std::basic_istringstream<char>}’ to ‘const std::istream_iterator<float>&’
/usr/include/c++/4.9/bits/stream_iterator.h:68:7: note: std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator(std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_type&) [with _Tp = float; _CharT = char; _Traits = std::char_traits<char>; _Dist = long int; std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_type = std::basic_istream<char>]
       istream_iterator(istream_type& __s)
       ^
/usr/include/c++/4.9/bits/stream_iterator.h:68:7: note:   no known conversion for argument 1 from ‘std::istringstream {aka std::basic_istringstream<char>}’ to ‘std::istream_iterator<float>::istream_type& {aka std::basic_istream<char>&}’
/usr/include/c++/4.9/bits/stream_iterator.h:64:26: note: constexpr std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator() [with _Tp = float; _CharT = char; _Traits = std::char_traits<char>; _Dist = long int]
       _GLIBCXX_CONSTEXPR istream_iterator()
                          ^
/usr/include/c++/4.9/bits/stream_iterator.h:64:26: note:   candidate expects 0 arguments, 1 provided
In file included from ../src/image/image.hpp:83:0,
                 from ../src/main.cpp:10:
../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::forward_propagation(const float*, float*)’:
../src/image/ml/cnn.hpp:811:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int k = 0;k < layers.size();++k)
                         ^
In file included from ../src/image/image.hpp:86:0,
                 from ../src/main.cpp:10:
../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/cmd/cnt.cpp:3:0,
                 from ../src/main.cpp:16:
../src/tracking/vbc_dialog.hpp: At global scope:
../src/tracking/vbc_dialog.hpp:64:31: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
     std::auto_ptr<stat_model> model;
                               ^
In file included from ../src/main.cpp:16:0:
../src/cmd/cnt.cpp: In function ‘int cnt()’:
../src/cmd/cnt.cpp:9:41: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
     std::auto_ptr<vbc_database> database(new vbc_database);
                                         ^
../src/cmd/cnt.cpp:120: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:57:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(unsigned int i = 0;i < dir_list.size();++i)
                              ^
../src/main.cpp:61:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(unsigned int index = 0;index < new_list.size();++index)
                                          ^
../src/main.cpp:64: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/main.cpp:10:
../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<double> >; output_iterator1 = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; output_iterator2 = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; dym_type = image::dyndim]’:
../src/image/ml/em.hpp:33:108:   required from here
../src/image/numerical/matrix.hpp:1796:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                             for (int k = 0;k < i;++k,Vrowk += dim)
                                              ^
../src/image/numerical/matrix.hpp:1805:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     for (int k = 0;k < i;++k,Vrowk += dim)
                                      ^
../src/image/numerical/matrix.hpp:1827:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int l = 0,iter = 0;l < dim && iter < 30;++iter)
                                   ^
In file included from ../src/image/image.hpp:69:0,
                 from ../src/main.cpp:10:
../src/image/reg/reg.hpp: In instantiation of ‘image::reg::normalization<value_type>::normalization() [with value_type = double]’:
../src/libs/tracking/fib_data.hpp:141:33:   required from here
../src/image/reg/reg.hpp:23:9: warning: ‘image::reg::normalization<double>::prog’ will be initialized after [-Wreorder]
     int prog;
         ^
../src/image/reg/reg.hpp:19:10: warning:   ‘bool image::reg::normalization<double>::has_T’ [-Wreorder]
     bool has_T;
          ^
../src/image/reg/reg.hpp:28:5: warning:   when initialized here [-Wreorder]
     normalization(void):prog(0),has_T(false){}
     ^
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 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:786: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: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;
           ^
In file included from ../src/image/image.hpp:83:0,
                 from ../src/main.cpp:10:
../src/image/ml/cnn.hpp: In function ‘float image::ml::sigmoid_f(value_type) [with value_type = float]’:
../src/image/ml/cnn.hpp:60:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

Makefile:1630: recipe for target 'main.o' failed
make: *** [main.o] Error 1
frankyeh commented 8 years ago

Hi Will,

I fixed the bug here and please see if it works for you.

Best regards, Frank

On Fri, Apr 1, 2016 at 2:15 PM, Will Foran notifications@github.com wrote:

trying to compile within dsi studio i see the following errors

../src/image/numerical/basic_op.hpp:691:41: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ ../src/image/numerical/basic_op.hpp:691:73: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ ../src/image/numerical/numerical.hpp:173:43: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ ../src/image/numerical/numerical.hpp:173:74: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ ../src/image/numerical/optimization.hpp:25:43: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ ../src/image/numerical/optimization.hpp:25:72: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ ../src/image/numerical/dif.hpp:131:66: error: ‘class image::pixel_index<3u>’ has no member named ‘next’ ../src/image/numerical/dif.hpp:192:66: error: ‘class image::pixel_index<3u>’ has no member named ‘next’ ../src/image/numerical/dif.hpp:251:45: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ ../src/image/numerical/dif.hpp:251:66: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ ../src/image/numerical/dif.hpp:283:45: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ ../src/image/numerical/dif.hpp:283:66: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ ../src/image/reg/reg.hpp:41:14: error: declaration of ‘class value_type’ ../src/image/reg/reg.hpp:11:10: error: shadows template parm ‘class value_type’ ../src/image/ml/cnn.hpp:42:22: error: ‘expf’ is not a member of ‘std’ ../src/image/ml/cnn.hpp:59:35: error: ‘expf’ is not a member of ‘std’ ../src/image/ml/cnn.hpp:612:22: error: ‘expf’ is not a member of ‘std’ ../src/image/ml/cnn.hpp:793:92: error: no matching function for call to ‘std::istream_iterator::istream_iterator(std::istringstream)’ ../src/image/ml/cnn.hpp:798:92: error: no matching function for call to ‘std::istream_iterator::istream_iterator(std::istringstream)’

the full output:

  • make g++ -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/usr/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 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/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::project(const image::basic_image<PixelType, 2u>&, OutImageType&, unsigned int)’: ../src/image/numerical/basic_op.hpp:691:41: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ for(pixel_index<2> index; index.is_valid(src.geometry()); index.next(src.geometry())) ^ ../src/image/numerical/basic_op.hpp:691:73: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ for(pixel_index<2> index; index.is_valid(src.geometry()); index.next(src.geometry())) ^ In file included from ../src/image/segmentation/otsu.hpp:4:0, from ../src/image/segmentation/segmentation.hpp:6, from ../src/image/image.hpp:32, from ../src/main.cpp:10: ../src/image/numerical/numerical.hpp: In function ‘void image::gradient_multiple_sampling(const image::basic_image<pixel_type1, 2u, storage_type1>&, VectorImageType&, double, unsigned int, unsigned int)’: ../src/image/numerical/numerical.hpp:173:43: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ for (image::pixel_index<2> iter; iter.is_valid(src.geometry()); iter.next(src.geometry())) ^ ../src/image/numerical/numerical.hpp:173:74: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ for (image::pixel_index<2> iter; iter.is_valid(src.geometry()); iter.next(src.geometry())) ^ In file included from ../src/image/image.hpp:43:0, from ../src/main.cpp:10: ../src/image/numerical/optimization.hpp: In function ‘void image::optimization::plot_fun_2d(image_type&, iter_type1, iter_type1, iter_type1, iter_type1, function_type&, unsigned int, unsigned int, unsigned int)’: ../src/image/numerical/optimization.hpp:25:43: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ for(image::pixel_index<2> index;index.is_valid(I.geometry());index.next(I.geometry())) ^ ../src/image/numerical/optimization.hpp:25:72: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ for(image::pixel_index<2> index;index.is_valid(I.geometry());index.next(I.geometry())) ^ In file included from ../src/image/image.hpp:47:0, from ../src/main.cpp:10: ../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 ‘void image::io::volume::reorientation()’: ../src/image/io/io.hpp:56:52: warning: array subscript has type ‘char’ [-Wchar-subscripts] spatial_resolution[dim_order[index]] = sr[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:133: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:144: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/main.cpp:10: ../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/main.cpp:10: ../src/image/io/mat.hpp: In member function ‘bool image::io::mat_read_base::load_from_file(const chartype, 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 chartype)’: ../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:58:0, from ../src/main.cpp:10: ../src/image/filter/gaussian.hpp: In function ‘void image::filter::gaussian(image_type&)’: ../src/image/filter/gaussian.hpp:113:69: warning: to refer to a type member of a template parameter, use ‘typename image_type:: value_type’ [-fpermissive] gaussian_filter_imp<image_type::value_type,image_type::dimension>()(src); ^ In file included from ../src/image/reg/lddmm.hpp:5:0, from ../src/image/image.hpp:66, from ../src/main.cpp:10: ../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant(const image::basic_image<PixelType, 3u>&, DetType&)’: ../src/image/numerical/dif.hpp:131:66: error: ‘class image::pixel_index<3u>’ has no member named ‘next’ for (image::pixel_index<3> index; index.is_valid(geo); index.next(geo)) ^ ../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant_dis(const image::basic_image<PixelType, 3u>&, DetType&)’: ../src/image/numerical/dif.hpp:192:66: error: ‘class image::pixel_index<3u>’ has no member named ‘next’ for (image::pixel_index<3> index; index.is_valid(geo); index.next(geo)) ^ ../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant(const image::basic_image<PixelType, 2u>&, image::basic_image<PixelType2, 2u>&)’: ../src/image/numerical/dif.hpp:251:45: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ for (image::pixel_index<2> index; index.is_valid(geo); index.next(geo)) ^ ../src/image/numerical/dif.hpp:251:66: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ for (image::pixel_index<2> index; index.is_valid(geo); index.next(geo)) ^ ../src/image/numerical/dif.hpp: In function ‘void image::jacobian_determinant_dis(const image::basic_image<PixelType, 2u>&, image::basic_image<PixelType2, 2u>&)’: ../src/image/numerical/dif.hpp:283:45: error: ‘class image::pixel_index<2u>’ has no member named ‘is_valid’ for (image::pixel_index<2> index; index.is_valid(geo); index.next(geo)) ^ ../src/image/numerical/dif.hpp:283:66: error: ‘class image::pixel_index<2u>’ has no member named ‘next’ for (image::pixel_index<2> index; index.is_valid(geo); index.next(geo)) ^ In file included from ../src/image/image.hpp:69:0, from ../src/main.cpp:10: ../src/image/reg/reg.hpp: At global scope: ../src/image/reg/reg.hpp:41:14: error: declaration of ‘class value_type’ template ^ ../src/image/reg/reg.hpp:11:10: error: shadows template parm ‘class value_type’ template ^ ../src/image/reg/reg.hpp: In member function ‘void image::reg::normalization::run_reg(const image_type&, const vector_type&, const image_type&, const vector_type&, int, image::reg::reg_cost_type, image::reg::reg_type, terminate_type&, int)’: ../src/image/reg/reg.hpp:85:72: warning: to refer to a type member of a template parameter, use ‘typename image_type:: value_type’ [-fpermissive] image::basic_image<image_type::value_type,image_type::dimension> new_from(to.geometry()); ^ In file included from ../src/image/image.hpp:83:0, from ../src/main.cpp:10: ../src/image/ml/cnn.hpp: In function ‘float image::ml::tanh_f(value_type)’: ../src/image/ml/cnn.hpp:42:22: error: ‘expf’ is not a member of ‘std’ const float ep = std::expf(v + v); ^ ../src/image/ml/cnn.hpp:42:22: note: suggested alternative: In file included from /usr/include/c++/4.9/cmath:44:0, from /usr/include/c++/4.9/random:38, from /usr/include/c++/4.9/bits/stl_algo.h:66, from /usr/include/c++/4.9/algorithm:62, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:89, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:45, from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:45, from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:1, from ../src/main.cpp:5: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: note: ‘expf’ MATHCALL (exp,, (Mdouble x)); ^ In file included from ../src/image/image.hpp:83:0, from ../src/main.cpp:10: ../src/image/ml/cnn.hpp: In function ‘float image::ml::sigmoid_f(value_type)’: ../src/image/ml/cnn.hpp:59:35: error: ‘expf’ is not a member of ‘std’ return float(1) / (float(1) + std::expf(-v)); ^ ../src/image/ml/cnn.hpp:59:35: note: suggested alternative: In file included from /usr/include/c++/4.9/cmath:44:0, from /usr/include/c++/4.9/random:38, from /usr/include/c++/4.9/bits/stl_algo.h:66, from /usr/include/c++/4.9/algorithm:62, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:89, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:45, from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:45, from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:1, from ../src/main.cpp:5: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: note: ‘expf’ MATHCALL (exp,, (Mdouble x)); ^ In file included from ../src/image/image.hpp:83:0, from ../src/main.cpp:10: ../src/image/ml/cnn.hpp: In member function ‘void image::ml::basic_layer::reset()’: ../src/image/ml/cnn.hpp:102:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < weight.size(); ++i) ^ ../src/image/ml/cnn.hpp: At global scope: ../src/image/ml/cnn.hpp:129:46: warning: unused parameter ‘dE_da’ [-Wunused-parameter] virtual void calculate_dwdb(const float* dE_da, ^ ../src/image/ml/cnn.hpp:130:48: warning: unused parameter ‘prev_out’ [-Wunused-parameter] const float* prev_out, ^ ../src/image/ml/cnn.hpp:131:55: warning: unused parameter ‘dweight’ [-Wunused-parameter] std::vector& dweight, ^ ../src/image/ml/cnn.hpp:132:55: warning: unused parameter ‘dbias’ [-Wunused-parameter] std::vector& dbias){} ^ ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::partial_connected_layer::forwardpropagation(const float, float_)’: ../src/image/ml/cnn.hpp:236: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::calculatedwdb(const float, const float_, std::vector<float, std::allocator >&, std::vector<float, std::allocator >&)’: ../src/image/ml/cnn.hpp:246: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:251: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:256:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < b2o.size(); i++) ^ ../src/image/ml/cnn.hpp:260: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::backpropagation(float, float, const float)’: ../src/image/ml/cnn.hpp:274: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 constructor ‘image::ml::connection_table::connection_table(int, int)’: ../src/image/ml/cnn.hpp:419:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int y = 0;y < c.height();++y) ^ ../src/image/ml/cnn.hpp: In constructor ‘image::ml::convolutional_layer::convolutional_layer(image::ml::activation_type, int, const image::ml::connection_table&)’: ../src/image/ml/cnn.hpp:442:9: warning: ‘image::ml::convolutional_layer::kernel_size’ will be initialized after [-Wreorder] int kernel_size; ^ ../src/image/ml/cnn.hpp:439:22: warning: ‘image::ml::connection_table image::ml::convolutional_layer::connection’ [-Wreorder] connection_table connection; ^ ../src/image/ml/cnn.hpp:444:5: warning: when initialized here [-Wreorder] convolutional_layer(activationtype af,int kernelsize,const connectiontable& connection = connection_table()) ^ In file included from ../src/image/image.hpp:83:0, from ../src/main.cpp:10: ../src/image/ml/cnn.hpp: In member function ‘virtual void image::ml::soft_max_layer::forwardpropagation(const float, float_)’: ../src/image/ml/cnn.hpp:612:22: error: ‘expf’ is not a member of ‘std’ out[i] = std::expf(data[i]); ^ ../src/image/ml/cnn.hpp:612:22: note: suggested alternative: In file included from /usr/include/c++/4.9/cmath:44:0, from /usr/include/c++/4.9/random:38, from /usr/include/c++/4.9/bits/stl_algo.h:66, from /usr/include/c++/4.9/algorithm:62, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:89, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:45, from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:45, from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:1, from ../src/main.cpp:5: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: note: ‘expf’ MATHCALL (exp,, (Mdouble x)); ^ In file included from ../src/image/image.hpp:83:0, from ../src/main.cpp:10: ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::save_tofile(const char)’: ../src/image/ml/cnn.hpp:743:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0;i < geo.size();++i) ^ ../src/image/ml/cnn.hpp:748:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i < layers.size()) ^ ../src/image/ml/cnn.hpp: In member function ‘bool image::ml::network::load_fromfile(const char)’: ../src/image/ml/cnn.hpp:793:92: error: no matching function for call to ‘std::istream_iterator::istream_iterator(std::istringstream)’ std::vector w((std::istream_iterator(std::istringstream(line))),(std::istream_iterator())); ^ ../src/image/ml/cnn.hpp:793:92: note: candidates are: In file included from /usr/include/c++/4.9/iterator:66:0, from ../src/main.cpp:2: /usr/include/c++/4.9/bits/stream_iterator.h:72:7: note: std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator(const std::istream_iterator<_Tp, _CharT, _Traits, _Dist>&) [with _Tp = float; _CharT = char; _Traits = std::char_traits; _Dist = long int] istream_iterator(const istream_iterator& obj) ^ /usr/include/c++/4.9/bits/stream_iterator.h:72:7: note: no known conversion for argument 1 from ‘std::istringstream {aka std::basic_istringstream}’ to ‘const std::istream_iterator&’ /usr/include/c++/4.9/bits/stream_iterator.h:68:7: note: std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator(std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_type&) [with _Tp = float; _CharT = char; _Traits = std::char_traits; _Dist = long int; std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_type = std::basic_istream] istream_iterator(istream_type& s) ^ /usr/include/c++/4.9/bits/stream_iterator.h:68:7: note: no known conversion for argument 1 from ‘std::istringstream {aka std::basic_istringstream}’ to ‘std::istream_iterator::istream_type& {aka std::basic_istream&}’ /usr/include/c++/4.9/bits/stream_iterator.h:64:26: note: constexpr std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator() [with _Tp = float; _CharT = char; _Traits = std::char_traits; _Dist = long int] _GLIBCXX_CONSTEXPR istream_iterator() ^ /usr/include/c++/4.9/bits/stream_iterator.h:64:26: note: candidate expects 0 arguments, 1 provided In file included from ../src/image/image.hpp:83:0, from ../src/main.cpp:10: ../src/image/ml/cnn.hpp:798:92: error: no matching function for call to ‘std::istream_iterator::istream_iterator(std::istringstream)’ std::vector b((std::istream_iterator(std::istringstream(line))),(std::istream_iterator())); ^ ../src/image/ml/cnn.hpp:798:92: note: candidates are: In file included from /usr/include/c++/4.9/iterator:66:0, from ../src/main.cpp:2: /usr/include/c++/4.9/bits/stream_iterator.h:72:7: note: std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator(const std::istream_iterator<_Tp, _CharT, _Traits, _Dist>&) [with _Tp = float; _CharT = char; _Traits = std::char_traits; _Dist = long int] istream_iterator(const istream_iterator& obj) ^ /usr/include/c++/4.9/bits/stream_iterator.h:72:7: note: no known conversion for argument 1 from ‘std::istringstream {aka std::basic_istringstream}’ to ‘const std::istream_iterator&’ /usr/include/c++/4.9/bits/stream_iterator.h:68:7: note: std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator(std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_type&) [with _Tp = float; _CharT = char; _Traits = std::char_traits; _Dist = long int; std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_type = std::basic_istream] istream_iterator(istream_type& s) ^ /usr/include/c++/4.9/bits/stream_iterator.h:68:7: note: no known conversion for argument 1 from ‘std::istringstream {aka std::basic_istringstream}’ to ‘std::istream_iterator::istream_type& {aka std::basic_istream&}’ /usr/include/c++/4.9/bits/stream_iterator.h:64:26: note: constexpr std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator() [with _Tp = float; _CharT = char; _Traits = std::char_traits; _Dist = long int] _GLIBCXX_CONSTEXPR istream_iterator() ^ /usr/include/c++/4.9/bits/stream_iterator.h:64:26: note: candidate expects 0 arguments, 1 provided In file included from ../src/image/image.hpp:83:0, from ../src/main.cpp:10: ../src/image/ml/cnn.hpp: In member function ‘void image::ml::network::forwardpropagation(const float, float_)’: ../src/image/ml/cnn.hpp:811:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k = 0;k < layers.size();++k) ^ In file included from ../src/image/image.hpp:86:0, from ../src/main.cpp:10: ../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/cmd/cnt.cpp:3:0, from ../src/main.cpp:16: ../src/tracking/vbc_dialog.hpp: At global scope: ../src/tracking/vbc_dialog.hpp:64: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:9:41: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.9/backward/auto_ptr.h:87) [-Wdeprecated-declarations] std::auto_ptr database(new vbc_database); ^ ../src/cmd/cnt.cpp:120: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:57:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned int i = 0;i < dir_list.size();++i) ^ ../src/main.cpp:61:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned int index = 0;index < new_list.size();++index) ^ ../src/main.cpp:64: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/main.cpp:10: ../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::__normaliterator<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:1796:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int k = 0;k < i;++k,Vrowk += dim) ^ ../src/image/numerical/matrix.hpp:1805:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int k = 0;k < i;++k,Vrowk += dim) ^ ../src/image/numerical/matrix.hpp:1827:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int l = 0,iter = 0;l < dim && iter < 30;++iter) ^ In file included from ../src/image/image.hpp:69:0, from ../src/main.cpp:10: ../src/image/reg/reg.hpp: In instantiation of ‘image::reg::normalization::normalization() [with value_type = double]’: ../src/libs/tracking/fib_data.hpp:141:33: required from here ../src/image/reg/reg.hpp:23:9: warning: ‘image::reg::normalization::prog’ will be initialized after [-Wreorder] int prog; ^ ../src/image/reg/reg.hpp:19:10: warning: ‘bool image::reg::normalization::has_T’ [-Wreorder] bool has_T; ^ ../src/image/reg/reg.hpp:28:5: warning: when initialized here [-Wreorder] normalization(void):prog(0),has_T(false){} ^ 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 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:786: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:787:13: warning: array subscript has type ‘char’ [-Wchar-subscripts] temp[i] = pdata; ^ ../src/image/numerical/basicop.hpp:788:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] value = *(type)temp; ^ In file included from ../src/image/image.hpp:83:0, from ../src/main.cpp:10: ../src/image/ml/cnn.hpp: In function ‘float image::ml::sigmoid_f(value_type) [with value_type = float]’: ../src/image/ml/cnn.hpp:60:1: warning: control reaches end of non-void function [-Wreturn-type] } ^

Makefile:1630: recipe for target 'main.o' failed make: *\ [main.o] Error 1

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/frankyeh/TIPL/issues/3