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

Ross McGurk rjm31 at duke.edu
Fri Aug 17 10:58:08 EDT 2012


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



More information about the Insight-users mailing list