<div dir="ltr"><div>Hi Aida,<br><br></div>VTK changed to a modular system some time ago and the library names changed. You just need to find the new ones. The names match the directory containg the classes: for example vtkPolyDataToImageStencil is in Imaging/Stencil and the library is vtkImagingStencil, with a suffix of the VTK version, e.g. vtkImagingStencil-8.1. Similarly, for vtkImageAccumulate you need vtkImagingStatistics (+ suffix).<br><br><div class="gmail_quote"><div dir="ltr">Missatge de Aida Ninyerola <<a href="mailto:aida.ninyerola@gmail.com" target="_blank">aida.ninyerola@gmail.com</a>> del dia dc., 30 de maig 2018 a les 14:22:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>While compiling my project I get some linking problems.</div><div>tlQuantification.cpp:(.text+0x1623): undefined reference to `vtkPolyDataToImageStencil::New()'<br>tlQuantification.cpp:(.text+0x162b): undefined reference to `vtkImageAccumulate::New()'<br>tlQuantification.cpp:(.text+0x168e): undefined reference to `vtkImageAccumulate::SetStencilData(vtkImageStencilData*)'</div><div><br></div><div><div>I found that I sould add in CmakeLists.txt the following lines but I doesn't work:<br></div>if(VTK_LIBRARIES)<br> target_link_libraries(quantification ${VTK_LIBRARIES} )<br>else()<br> target_link_libraries(quantification vtkHybrid vtkWidgets)<br>endif()</div><div><br></div><div>I'm trying to compile and old project that work properly with a former VTK version (I can't remember the VTK version).</div><div><br></div><div></div><div>I was thinking that maybe is a migration problem but I'm not able to find what I need to change. <br></div><div><br></div><div>What I'm doing is clipping an image by a cylinder (m_rotate_tformer[id]) to calculate the mean activity of the image inside the cylinder. Maybe there is a better way to perform it.<br></div><div><br></div><div> vtkPolyDataToImageStencil* sts = vtkPolyDataToImageStencil::New();<br> vtkImageAccumulate* act = vtkImageAccumulate::New();<br><br> sts->SetInputData(m_rotate_tformer[id]->GetPolyDataOutput());<br> sts->SetInformationInput(vtkInputImage.GetPointer());<br> sts->Update();<br> <br> act->SetInputData(vtkInputImage.GetPointer());<br> act->SetStencilData(sts->GetOutput());<br> act->Update();</div><div><br></div><div>I'm running out of ideas. I'll appreciate any idea.<br></div><div><br></div><div>Thanks,</div><div>Aida</div></div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div></div>