[Insight-users] Problems with ImageToHistogramGenerator
Luca Binotto
binotto at lycos.de
Thu Oct 19 09:50:29 EDT 2006
Hello there,
I'm working on a 3D scalar dataset, I applied the gradient magnitude
and the laplacian filter to it, then I combined them in a
vector image by means of the itkCompose3DVectorImageFilter.
After that I gave its output to the itkImageToHistogramGenerator
but I got errors.Cannot understand what's going wrong.
The read image is: (256x256x128)
typedef unsigned char PixelType;
const unsigned int Dimension = 3;
typedef itk::Image<PixelType,Dimension> ImageType;
typedef itk::Compose3DVectorImageFilter<ImageType > vectImageFilterType;
vectImageFilterType::Pointer composer = vectImageFilterType::New();
composer->SetInput1( reader->GetOutput() );
composer->SetInput2( gradientMagnitude->GetOutput() );
composer->SetInput3( laplacian->GetOutput() );
typedef vectImageFilterType::OutputImageType CompImageType;
typedef itk::Statistics::ImageToHistogramGenerator< CompImageType > HistogramGeneratorType;
HistogramGeneratorType::Pointer histogramGenerator = HistogramGeneratorType::New();
typedef HistogramGeneratorType::SizeType SizeType;
SizeType size;
size[0] = 255;
size[1] = 255;
size[2] = 255;
histogramGenerator->SetNumberOfBins( size );
histogramGenerator->SetInput( composer->GetOutput());
histogramGenerator->SetMarginalScale( 10.0 );
histogramGenerator->Compute();
my compiler output:
CMakeFiles/vtkitkOTF.dir/main.o: In function `itk::ObjectFactory<itk::Statistics::DenseFrequencyContainer>::Create()':
main.cpp:(.text._ZN3itk13ObjectFactoryINS_10Statistics23DenseFrequencyContainerEE6CreateEv[itk::ObjectFactory<itk::Statistics::DenseFrequencyContainer>::Create()]+0x8): undefined reference to `typeinfo for itk::Statistics::DenseFrequencyContainer'
main.cpp:(.text._ZN3itk13ObjectFactoryINS_10Statistics23DenseFrequencyContainerEE6CreateEv[itk::ObjectFactory<itk::Statistics::DenseFrequencyContainer>::Create()]+0x55): undefined reference to `typeinfo for itk::Statistics::DenseFrequencyContainer'
CMakeFiles/vtkitkOTF.dir/main.o: In function `itk::Statistics::Histogram<double, 3u, itk::Statistics::DenseFrequencyContainer>::GetFrequency(unsigned long const&) const':
main.cpp:(.text._ZNK3itk10Statistics9HistogramIdLj3ENS0_23DenseFrequencyContainerEE12GetFrequencyERKm[itk::Statistics::Histogram<double, 3u, itk::Statistics::DenseFrequencyContainer>::GetFrequency(unsigned long const&) const]+0x22): undefined reference to `itk::Statistics::DenseFrequencyContainer::GetFrequency(unsigned long) const'
CMakeFiles/vtkitkOTF.dir/main.o: In function `itk::Statistics::DenseFrequencyContainer::New()':
main.cpp:(.text._ZN3itk10Statistics23DenseFrequencyContainer3NewEv[itk::Statistics::DenseFrequencyContainer::New()]+0x55): undefined reference to `itk::Statistics::DenseFrequencyContainer::DenseFrequencyContainer()'
CMakeFiles/vtkitkOTF.dir/main.o: In function `itk::Statistics::Histogram<double, 3u, itk::Statistics::DenseFrequencyContainer>::SetToZero()':
main.cpp:(.text._ZN3itk10Statistics9HistogramIdLj3ENS0_23DenseFrequencyContainerEE9SetToZeroEv[itk::Statistics::Histogram<double, 3u, itk::Statistics::DenseFrequencyContainer>::SetToZero()]+0x18): undefined reference to `itk::Statistics::DenseFrequencyContainer::SetToZero()'
CMakeFiles/vtkitkOTF.dir/main.o: In function `itk::Statistics::Histogram<double, 3u, itk::Statistics::DenseFrequencyContainer>::Initialize(itk::Size<3u> const&)':
main.cpp:(.text._ZN3itk10Statistics9HistogramIdLj3ENS0_23DenseFrequencyContainerEE10InitializeERKNS_4SizeILj3EEE[itk::Statistics::Histogram<double, 3u, itk::Statistics::DenseFrequencyContainer>::Initialize(itk::Size<3u> const&)]+0x238): undefined reference to `itk::Statistics::DenseFrequencyContainer::Initialize(unsigned long)'
CMakeFiles/vtkitkOTF.dir/main.o: In function `itk::Statistics::Histogram<double, 3u, itk::Statistics::DenseFrequencyContainer>::IncreaseFrequency(unsigned long const&, float)':
main.cpp:(.text._ZN3itk10Statistics9HistogramIdLj3ENS0_23DenseFrequencyContainerEE17IncreaseFrequencyERKmf[itk::Statistics::Histogram<double, 3u, itk::Statistics::DenseFrequencyContainer>::IncreaseFrequency(unsigned long const&, float)]+0x2b): undefined reference to `itk::Statistics::DenseFrequencyContainer::IncreaseFrequency(unsigned long, float)'
collect2: ld returned 1 exit status
make[2]: *** [vtkitkOTF] Error 1
make[2]: Leaving directory `/home/luca/devel/vtkitkOTF'
make[1]: *** [CMakeFiles/vtkitkOTF.dir/all] Error 2
make[1]: Leaving directory `/home/luca/devel/vtkitkOTF'
make: *** [all] Error 2
Someone can explain me the problem ?
Thanks in advance, Luca
Benachrichtigung bei E-Mail Empfang! - http://mail.lycos.de/app/lycosinside/setupLI.exe
More information about the Insight-users
mailing list