8000 Does not build with new dcmtk: API changed · Issue #550 · vxl/vxl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Does not build with new dcmtk: API changed #550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sanjayankur31 opened this issue Nov 15, 2018 · 4 comments
Open

Does not build with new dcmtk: API changed #550

sanjayankur31 opened this issue Nov 15, 2018 · 4 comments

Comments

@sanjayankur31
Copy link
Contributor
sanjayankur31 commented Nov 15, 2018

In this commit from 2009, the declaration of the DiInputPixelTemplate function was changed. So, unless one uses the even older bundled version of dcmtk that vxl provides, one cannot build vxl with a native dcmtk installation that is up to date.

The current version of dcmtk is: 3.6.3 that was released this year. The version vxl bundles appears to be from 2002.

The build failures are of this type:

[ 37%] Building CXX object core/vil/CMakeFiles/vil.dir/file_formats/vil_dicom.cxx.o
cd /builddir/build/BUILD/vxl-1.18.0/core/vil && /usr/bin/c++  -DOPJ_STATIC -DVXL_LEGACY_ERROR_REPORTING -DVXL_WARN_DEPRECATED -DVXL_WARN_DEPRECATED_ONCE -Dvil_EXPORTS -I/builddir/build/BUILD/vxl-1.18.0/vcl -I/builddir/build/BUILD/vxl-1.18.0/core -I/builddir/build/BUILD/vxl-1.18.0/v3p/openjpeg2 -I/builddir/build/BUILD/vxl-1.18.0/core/vil  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fpermissive  -O2 -g -DNDEBUG -fPIC   -Wno-undefined-var-template -o CMakeFiles/vil.dir/file_formats/vil_dicom.cxx.o -c /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx: In instantiation of 'void {anonymous}::convert_src_type(const InT*, DcmPixelData*, unsigned int, Uint16, Uint16, Uint16, Uint16, DiInputPixel*&, vil_pixel_format&) [with InT = short unsigned int; Uint16 = short unsigned int]':
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:1050:105:   required from here
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:980:20: error: no matching function for call to 'DiInputPixelTemplate<short unsigned int, unsigned char>::DiInputPixelTemplate(DcmPixelData*&, Uint16&, Uint16&, Uint16&, int, unsigned int&)'
       pixel_data = new DiInputPixelTemplate<InT,Uint8>( pixels, alloc, stored, high, 0, num_samples );
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiInputPixelTemplate<T1, T2>&) [with T1 = short unsigned int; T2 = unsigned char]'
     DiInputPixelTemplate(const DiInputPixelTemplate<T1,T2> &);
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note:   candidate expects 1 argument, 6 provided
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiDocument*, Uint16, Uint16, Uint16, long unsigned int, long unsigned int, long unsigned int, DcmFileCache*, Uint32&) [with T1 = short unsigned int; T2 = unsigned char; Uint16 = short unsigned int; Uint32 = unsigned int]'
     DiInputPixelTemplate(const DiDocument *document,
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note:   candidate expects 9 arguments, 6 provided
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:984:20: error: no matching function for call to 'DiInputPixelTemplate<short unsigned int, short unsigned int>::DiInputPixelTemplate(DcmPixelData*&, Uint16&, Uint16&, Uint16&, int, unsigned int&)'
       pixel_data = new DiInputPixelTemplate<InT,Uint16>( pixels, alloc, stored, high, 0, num_samples );
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiInputPixelTemplate<T1, T2>&) [with T1 = short unsigned int; T2 = short unsigned int]'
     DiInputPixelTemplate(const DiInputPixelTemplate<T1,T2> &);
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note:   candidate expects 1 argument, 6 provided
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiDocument*, Uint16, Uint16, Uint16, long unsigned int, long unsigned int, long unsigned int, DcmFileCache*, Uint32&) [with T1 = short unsigned int; T2 = short unsigned int; Uint16 = short unsigned int; Uint32 = unsigned int]'
     DiInputPixelTemplate(const DiDocument *document,
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note:   candidate expects 9 arguments, 6 provided
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:988:20: error: no matching function for call to 'DiInputPixelTemplate<short unsigned int, signed char>::DiInputPixelTemplate(DcmPixelData*&, Uint16&, Uint16&, Uint16&, int, unsigned int&)'
       pixel_data = new DiInputPixelTemplate<InT,Sint8>( pixels, alloc, stored, high, 0, num_samples );
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiInputPixelTemplate<T1, T2>&) [with T1 = short unsigned int; T2 = signed char]'
     DiInputPixelTemplate(const DiInputPixelTemplate<T1,T2> &);
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note:   candidate expects 1 argument, 6 provided
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiDocument*, Uint16, Uint16, Uint16, long unsigned int, long unsigned int, long unsigned int, DcmFileCache*, Uint32&) [with T1 = short unsigned int; T2 = signed char; Uint16 = short unsigned int; Uint32 = unsigned int]'
     DiInputPixelTemplate(const DiDocument *document,
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note:   candidate expects 9 arguments, 6 provided
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:992:20: error: no matching function for call to 'DiInputPixelTemplate<short unsigned int, short int>::DiInputPixelTemplate(DcmPixelData*&, Uint16&, Uint16&, Uint16&, int, unsigned int&)'
       pixel_data = new DiInputPixelTemplate<
8000
InT,Sint16>( pixels, alloc, stored, high, 0, num_samples );
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiInputPixelTemplate<T1, T2>&) [with T1 = short unsigned int; T2 = short int]'
     DiInputPixelTemplate(const DiInputPixelTemplate<T1,T2> &);
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note:   candidate expects 1 argument, 6 provided
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiDocument*, Uint16, Uint16, Uint16, long unsigned int, long unsigned int, long unsigned int, DcmFileCache*, Uint32&) [with T1 = short unsigned int; T2 = short int; Uint16 = short unsigned int; Uint32 = unsigned int]'
     DiInputPixelTemplate(const DiDocument *document,
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note:   candidate expects 9 arguments, 6 provided
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx: In instantiation of 'void {anonymous}::convert_src_type(const InT*, DcmPixelData*, unsigned int, Uint16, Uint16, Uint16, Uint16, DiInputPixel*&, vil_pixel_format&) [with InT = unsigned char; Uint16 = short unsigned int]':
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:1053:104:   required from here
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:980:20: error: no matching function for call to 'DiInputPixelTemplate<unsigned char, unsigned char>::DiInputPixelTemplate(DcmPixelData*&, Uint16&, Uint16&, Uint16&, int, unsigned int&)'
       pixel_data = new DiInputPixelTemplate<InT,Uint8>( pixels, alloc, stored, high, 0, num_samples );
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiInputPixelTemplate<T1, T2>&) [with T1 = unsigned char; T2 = unsigned char]'
     DiInputPixelTemplate(const DiInputPixelTemplate<T1,T2> &);
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note:   candidate expects 1 argument, 6 provided
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiDocument*, Uint16, Uint16, Uint16, long unsigned int, long unsigned int, long unsigned int, DcmFileCache*, Uint32&) [with T1 = unsigned char; T2 = unsigned char; Uint16 = short unsigned int; Uint32 = unsigned int]'
     DiInputPixelTemplate(const DiDocument *document,
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note:   candidate expects 9 arguments, 6 provided
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:984:20: error: no matching function for call to 'DiInputPixelTemplate<unsigned char, short unsigned int>::DiInputPixelTemplate(DcmPixelData*&, Uint16&, Uint16&, Uint16&, int, unsigned int&)'
       pixel_data = new DiInputPixelTemplate<InT,Uint16>( pixels, alloc, stored, high, 0, num_samples );
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiInputPixelTemplate<T1, T2>&) [with T1 = unsigned char; T2 = short unsigned int]'
     DiInputPixelTemplate(const DiInputPixelTemplate<T1,T2> &);
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note:   candidate expects 1 argument, 6 provided
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiDocument*, Uint16, Uint16, Uint16, long unsigned int, long unsigned int, long unsigned int, DcmFileCache*, Uint32&) [with T1 = unsigned char; T2 = short unsigned int; Uint16 = short unsigned int; Uint32 = unsigned int]'
     DiInputPixelTemplate(const DiDocument *document,
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note:   candidate expects 9 arguments, 6 provided
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:988:20: error: no matching function for call to 'DiInputPixelTemplate<unsigned char, signed char>::DiInputPixelTemplate(DcmPixelData*&, Uint16&, Uint16&, Uint16&, int, unsigned int&)'
       pixel_data = new DiInputPixelTemplate<InT,Sint8>( pixels, alloc, stored, high, 0, num_samples );
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiInputPixelTemplate<T1, T2>&) [with T1 = unsigned char; T2 = signed char]'
     DiInputPixelTemplate(const DiInputPixelTemplate<T1,T2> &);
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note:   candidate expects 1 argument, 6 provided
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiDocument*, Uint16, Uint16, Uint16, long unsigned int, long unsigned int, long unsigned int, DcmFileCache*, Uint32&) [with T1 = unsigned char; T2 = signed char; Uint16 = short unsigned int; Uint32 = unsigned int]'
     DiInputPixelTemplate(const DiDocument *document,
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note:   candidate expects 9 arguments, 6 provided
/builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:992:20: error: no matching function for call to 'DiInputPixelTemplate<unsigned char, short int>::DiInputPixelTemplate(DcmPixelData*&, Uint16&, Uint16&, Uint16&, int, unsigned int&)'
       pixel_data = new DiInputPixelTemplate<InT,Sint16>( pixels, alloc, stored, high, 0, num_samples );
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiInputPixelTemplate<T1, T2>&) [with T1 = unsigned char; T2 = short int]'
     DiInputPixelTemplate(const DiInputPixelTemplate<T1,T2> &);
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:669:5: note:   candidate expects 1 argument, 6 provided
In file included from /builddir/build/BUILD/vxl-1.18.0/core/vil/file_formats/vil_dicom.cxx:37:
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note: candidate: 'DiInputPixelTemplate<T1, T2>::DiInputPixelTemplate(const DiDocument*, Uint16, Uint16, Uint16, long unsigned int, long unsigned int, long unsigned int, DcmFileCache*, Uint32&) [with T1 = unsigned char; T2 = short int; Uint16 = short unsigned int; Uint32 = unsigned int]'
     DiInputPixelTemplate(const DiDocument *document,
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/dcmtk/dcmimgle/diinpxt.h:131:5: note:   candidate expects 9 arguments, 6 provided
cc1plus: warning: unrecognized command line option '-Wno-undefined-var-template'
make[2]: *** [core/vil/CMakeFiles/vil.dir/build.make:599: core/vil/CMakeFiles/vil.dir/file_formats/vil_dicom.cxx.o] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/vxl-1.18.0'
make[2]: *** Waiting for unfinished jobs....
@hjmjohnson
Copy link
Contributor

@sanjayankur31 It would be GREAT if you could update this. There is currently not anyone on the VXL team with time or resources to address all issues. We, however, are happy to review pull requests.

Hans

@sanjayankur31
Copy link
Contributor Author

Unfortunately I don't have experience with dcmtk and the related libraries, so it'll take me much longer to get to grips with this code than it would someone with some experience in the area.

I've put it on my list, but I don't expect to find the time/resources to give to this in the near future either. Leaving this open in case someone knowledgeable comes along to work on it.

@ptrnine
Copy link
ptrnine commented Dec 13, 2018

I fixed that, but I only got a temporary fix. In an amicable way, a lot of code in vil/file_formats which is responsible for loading dcm images should be rewritten. If it suits you I can make a pull request. When I will have more free time, I can do it for the full.

@sanjayankur31
Copy link
Contributor Author

I fixed that, but I only got a temporary fix. In an amicable way, a lot of code in vil/file_formats which is responsible for loading dcm images should be rewritten. If it suits you I can make a pull request. When I will have more free time, I can do it for the full.

Hi @ptrnine : have you had a chance to work on this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0