[Insight-users] Re: Problems with ImageToHistogramGenerator

Prename Surname bsd.diverse at gmail.com
Fri Oct 20 05:52:21 EDT 2006


He means that in your CMakeLists.txt you should include ITKStatistics in
your TARGET_LINK_LIBRARIES(...) command

Regards


2006/10/20, Luca Binotto <binotto at lycos.de>:
>
> Hello Gaetan,
> thanks for the replay !
> I don't understand what do you mean with "linking a program with
> ITKStatistics",
> Can u give me an example ?
> Thanks again   Luca
>
> Hi,
>
> have you linked your program with ITKStatistics ?
>
> Regards,
>
> Gaetan
>
> On Thu, 19 Oct 2006 15:50:29 +0200, Luca Binotto <binotto at lycos.de>
> wrote:
>
> > 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
>
>
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr
>
>    * Previous message: [Insight-users] Problems with
> ImageToHistogramGenerator
>    * Next message: [Insight-users] error C2440
>    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
> More information about the Insight-users mailing list
>
> Schnell und einfach ohne Anschlusswechsel zur Lycos DSL Flatrate wechseln
> und 3 Monate kostenlos ab effektiven 5,21 EUR pro Monat im ersten Jahr
> surfen.
>
> http://www.lycos.de/startseite/online/dsl/index.html?prod=DSL&trackingID=email_footertxt
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20061020/ef9e2565/attachment.htm


More information about the Insight-users mailing list