[Insight-users] Watershed with Image<float, 3>

Harri Tapio Jaalinoja hajaalin@cc.helsinki.fi
Tue, 8 Oct 2002 16:43:37 +0300 (EET DST)


Hi all,

I'm trying to make a watershed transformation of 3D density data.
I start by modifying the existing watershed example

Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx

To reproduce my problem, go to line 96 and replace
  typedef itk::Image<float, 2> ImageType;
with
  typedef itk::Image<float, 3> ImageType;

When I "make" it, I get:

/home/butcher/Harri/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:
In function `int main (int, char **)':
/home/butcher/Harri/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:225:
no matching function for call to `itk::ImageFileWriter<main (int, char
**)::UnsignedImageType>::SetInput
(itk::Image<long unsigned int, 3> *)'
/home/butcher/Harri/Insight/Code/IO/itkImageFileWriter.txx:51:
candidates are:
void itk::ImageFileWriter<TInputImage>::SetInput (const TInputImage *)
[with TInputImage = main (int, char **)::UnsignedImageType]
make[1]: *** [itkWatershedSegmentationExample.o] Error 1
make: *** [default_target] Error 2


Your help is highly appreciated. I am new to c++, so please bear with me
if this is trivial :)

Thanks,
Harri