[Insight-users] cmake failing to build an ITK function

Matt McCormick matt.mccormick at kitware.com
Sun Aug 19 18:12:33 EDT 2012


Hi Ross,

These errors are from an old version of ITK.  Please try the latest version.

Thanks,
Matt

On Fri, Aug 17, 2012 at 10:58 AM, Ross McGurk <rjm31 at duke.edu> wrote:
> Hi all,
>
> I'm trying to get the STAPLE segmentation code up and running. I've done
> this before on a 32-bit machine without too much trouble but are running
> into issues described below:
>
> I'm running Ubuntu 12.04 64-bit. I've installed cmake and it looks to
> have installed correctly. I have tried building ITK with both cmake
> 2.8.0 and 2.8.7 using the automated script provided by the authors of
> STAPLE. I've also tried to build ITK completely independently of the
> automated script according to the "Getting Started" instructions.
>
> Regardless of the method of trying to build ITK, the libraries appear to
> be getting built correctly right up until it reaches itkNiftiImageIO.cxx
> where I get the following error
>
> [ 57%] Building CXX object Code/IO/CMakeFiles/ITKIO.dir/itkNiftiImageIO.o
> In file included from
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIOBase.h:23:0,
> from
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkNiftiImageIO.h:33,
> from
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkNiftiImageIO.cxx:18:
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:62:11:
> error: ‘ptrdiff_t’ does not name a type
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:63:11:
> error: ‘ptrdiff_t’ does not name a type
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:67:23:
> error: ‘IndexValueType’ was not declared in this scope
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:67:37:
> error: template argument 1 is invalid
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:67:37:
> error: template argument 2 is invalid
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:126:3:
> error: ‘IndexValueType’ does not name a type
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:128:40:
> error: ‘IndexValueType’ has not been declared
> In file included from
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIOBase.h:23:0,
> from
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkNiftiImageIO.h:33,
> from
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkNiftiImageIO.cxx:18:
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h: In
> static member function ‘static void
> itk::ImageIORegionAdaptor<VDimension>::Convert(const ImageIORegionType&,
> itk::ImageIORegionAdaptor<VDimension>::ImageRegionType&, const
> ImageIndexType&)’:
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:238:39:
> error: no matching function for call to
> ‘itk::ImageIORegion::GetIndex(unsigned int&) const’
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:238:39:
> note: candidate is:
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:113:21:
> note: const IndexType& itk::ImageIORegion::GetIndex() const
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkImageIORegion.h:113:21:
> note: candidate expects 0 arguments, 1 provided
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkNiftiImageIO.cxx:
> In member function ‘virtual void itk::NiftiImageIO::Read(void*)’:
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkNiftiImageIO.cxx:435:24:
> error: request for member ‘size’ in ‘start’, which is of non-class type
> ‘itk::ImageIORegion::IndexType {aka int}’
> /home/ross/staple/crkit_build/itk/Insight/Code/IO/itkNiftiImageIO.cxx:437:43:
> error: invalid types ‘itk::ImageIORegion::IndexType {aka int}[unsigned
> int]’ for array subscript
> make[2]: *** [Code/IO/CMakeFiles/ITKIO.dir/itkNiftiImageIO.o] Error 1
> make[1]: *** [Code/IO/CMakeFiles/ITKIO.dir/all] Error 2
> make: *** [all] Error 2
>
>
> Any thoughts?
>
> Thanks,
> Ross
>
> --
> Ross McGurk
> PhD Candidate
> Duke University
> Medical Physics Graduate Program
> 2424 Erwin Road, Suite 101
> Durham, NC 27705
> ph: (919) 668-0293
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list