[Insight-users] Compilation error while using ImageSeriesReader

Desikachari Nadadur dnadadur at abla-tx.com
Tue May 13 12:43:40 EDT 2008


Hi All,

I used DicomSeriesReadImageWrite2.cxx as an example and wrote a small 
read function inside my own class that reads a series of DICOM files in 
a given directory and creates a 3D volume image. While compiling that I 
received the following error message regarding fill() function.

Someone else had reported the same error message to the list, but their 
question has not been answered; at least I could not find one in the 
list. So, I am trying to find out what I am doing wrong.

Important things to note is that I was able to successfully compile the 
InsightToolkit/Examples/ directory and received no error messages. I was 
able to execute DicomSeriesReadImageWrite2 and get the expected results.

I am using ITK 2.8.1, and GCC 4.2.3 compiler. Could you please help? 
Here is the error message:

====================================================================
/usr/local/include/InsightToolkit/Common/itkArray.h: In member function 
'void itk::Array<TValueType>::Fill(const TValueType&) [with TValueType = 
float]':
/usr/local/include/InsightToolkit/IO/itkImageSeriesReader.txx:77:   
instantiated from 'void 
itk::ImageSeriesReader<TOutputImage>::GenerateOutputInformation() [with 
TOutputImage = itk::Image<short int, 3u>]'
/home/dnadadur/research/projects/dnadadur-20080507112155-3DBasicFromWork/common/test/testCommon3D/testCommon3D.cpp:89:   
instantiated from here
/usr/local/include/InsightToolkit/Common/itkArray.h:81: error: no 
matching function for call to 'fill(const float&)'
/usr/local/lib/gcc-4.2.3/include/c++/bits/stl_algobase.h:596: note: 
candidates are: void std::fill(unsigned char*, unsigned char*, const 
unsigned char&)
/usr/local/lib/gcc-4.2.3/include/c++/bits/stl_algobase.h:604: 
note:                 void std::fill(signed char*, signed char*, const 
signed char&)
/usr/local/lib/gcc-4.2.3/include/c++/bits/stl_algobase.h:612: 
note:                 void std::fill(char*, char*, const char&)
/usr/local/lib/gcc-4.2.3/include/c++/bits/stl_bvector.h:364: 
note:                 void std::fill(std::_Bit_iterator, 
std::_Bit_iterator, const bool&)
gmake[2]: *** [CMakeFiles/testCommon3D.dir/testCommon3D.o] Error 1
gmake[1]: *** [CMakeFiles/testCommon3D.dir/all] Error 2
gmake: *** [all] Error 2
====================================================================

Thanks,
Desika

-----------------------------------
Desikachari Nadadur, PhD
Abla-Tx, Inc.



More information about the Insight-users mailing list