<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:"Times New Roman", serif;font-size:12pt"><DIV>Hello! <BR><BR>I wanted my watershed-segmentation result (from ITK) through vtkVolumeProMapper 3D So make a volume. I have used vtkVolumeProMapper and vtkVolume. But I always get the error "undefined reference to vtkVolumeProMapper". Where is my mistake? I would be glad if you can help. <BR><BR>Thank you! <BR><BR>My code and CMakeList:<BR><BR>void MIRCIT::imageDisplayingWatershed(){<BR><BR> this-&gt;displayImage3D-&gt;show();<BR> this-&gt;displayImage3D-&gt;redraw();<BR><BR>  typedef unsigned char PixelType;<BR>  const unsigned int Dimension = 3;<BR><BR>  typedef itk::OrientedImage&lt; PixelType, Dimension &gt; ImageType;<BR>  typedef itk::ImageSeriesReader&lt; ImageType &gt; ReaderType;<BR>  ReaderType::Pointer reader = ReaderType::New();<BR><BR>  typedef itk::GDCMImageIO ImageIOType;<BR> 
 ImageIOType::Pointer dicomIO = ImageIOType::New();<BR>  <BR>  reader-&gt;SetImageIO( dicomIO );<BR><BR>  typedef itk::GDCMSeriesFileNames NamesGeneratorType;<BR>  NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();<BR><BR>  nameGenerator-&gt;SetUseSeriesDetails( true );<BR>  nameGenerator-&gt;AddSeriesRestriction("0008|0021" );<BR>  nameGenerator-&gt;SetDirectory( selectedDirectory);<BR><BR>  typedef std::vector&lt; std::string &gt; SeriesIdContainer;<BR>   <BR>  const SeriesIdContainer &amp; seriesUID = nameGenerator-&gt;GetSeriesUIDs();<BR>  SeriesIdContainer::const_iterator seriesItr = seriesUID.begin();<BR>  SeriesIdContainer::const_iterator seriesEnd = seriesUID.end();<BR><BR>  while( seriesItr != seriesEnd )<BR>  {<BR>  seriesItr++;<BR>  }<BR><BR>  std::string seriesIdentifier;<BR>  seriesIdentifier = seriesUID.begin()-&gt;c_str();<BR><BR>  typedef std::vector&lt; std::string &gt; FileNamesContainer;<BR> 
 FileNamesContainer fileNames;<BR><BR>  fileNames = nameGenerator-&gt;GetFileNames( seriesIdentifier );<BR>  reader-&gt;SetFileNames( fileNames );<BR>  reader-&gt;Update();<BR><BR>  typedef float InternalPixelType;<BR>  typedef itk::RGBPixel&lt;unsigned char&gt; RGBPixelType;<BR>  typedef itk::Image&lt; RGBPixelType, Dimension &gt; RGBImageType;<BR>  typedef itk::ImageFileWriter&lt; RGBImageType &gt; WriterType;<BR>  typedef itk::WatershedImageFilter&lt; ImageType &gt; WatershedFilterType;<BR>  typedef itk::Functor::ScalarToRGBPixelFunctor&lt; unsigned long&gt; ColorMapFunctorType;<BR>  typedef WatershedFilterType::OutputImageType LabeledImageType;<BR>  typedef itk::UnaryFunctorImageFilter&lt;LabeledImageType,RGBImageType,ColorMapFunctorType &gt; ColorMapFilterType;<BR>  typedef itk::ImageToVTKImageFilter &lt;LabeledImageType&gt; ConnectorType;<BR>  typedef itk::GradientMagnitudeImageFilter&lt;ImageType, ImageType&gt;
 GradientMagnitudeFilterType;<BR> <BR>  GradientMagnitudeFilterType::Pointer magnitudeFilter = GradientMagnitudeFilterType::New();<BR>  magnitudeFilter-&gt;SetInput(reader-&gt;GetOutput());<BR><BR>  WatershedFilterType::Pointer watershedFilter = WatershedFilterType::New();<BR>  watershedFilter-&gt;SetInput( magnitudeFilter-&gt;GetOutput() );<BR>  watershedFilter-&gt;SetLevel(this-&gt;sliderLevelWatershed-&gt;value());<BR>  watershedFilter-&gt;SetThreshold(this-&gt;sliderLevelWatershed-&gt;value());<BR><BR>  ColorMapFilterType::Pointer colorMapFilter = ColorMapFilterType::New();<BR>  colorMapFilter-&gt;SetInput( watershedFilter-&gt;GetOutput() );<BR><BR>  ConnectorType::Pointer connector = ConnectorType::New();<BR>  connector-&gt;SetInput(watershedFilter-&gt;GetOutput());<BR><BR>  vtkImageShiftScale *shift = vtkImageShiftScale::New();<BR>  shift-&gt;SetInput(connector-&gt;GetOutput());<BR> 
 shift-&gt;SetOutputScalarTypeToUnsignedChar();<BR><BR>  vtkVolumeProMapper *mapperb = vtkVolumeProMapper::New();<BR>  mapperb-&gt;SetInputConnection(shift-&gt;GetOutputPort());<BR><BR>  vtkVolume *volumeb = vtkVolume::New();<BR>  volumeb-&gt;SetMapper(mapperb);<BR><BR>  camera3D = vtkCamera::New();<BR>  camera3D-&gt;SetViewUp(0, 0, -1);<BR>  camera3D-&gt;SetPosition(0, 1, 0);<BR>  camera3D-&gt;SetFocalPoint(0, 0, 0);<BR>  camera3D-&gt;ComputeViewPlaneNormal();<BR>  camera3D-&gt;Azimuth(20);<BR><BR>  renderer3DWaterShed = vtkRenderer::New();<BR>  renderWindow3DWaterShed = vtkRenderWindow::New();<BR>  renderWindow3DWaterShed-&gt;AddRenderer(renderer3DWaterShed);<BR><BR>  displayImage3D-&gt;SetRenderWindow(renderWindow3DWaterShed);<BR>  displayImage3D-&gt;SetInteractorStyle(mode3DWaterShed);<BR>  displayImage3D-&gt;Initialize();<BR><BR>  renderer3DWaterShed-&gt;AddViewProp(volumeb);<BR> 
 renderer3DWaterShed-&gt;SetActiveCamera(camera3D);<BR>  renderer3DWaterShed-&gt;ResetCamera();<BR>  camera3D-&gt;Dolly(1.3);<BR>  renderer3DWaterShed-&gt;ResetCameraClippingRange();<BR>  renderer3DWaterShed-&gt;Render();<BR><BR>  this-&gt;displayImage3D-&gt;show();<BR>  this-&gt;displayImage3D-&gt;redraw();<BR><BR>  WriterType::Pointer writer = WriterType::New();<BR>  writer-&gt;SetInput( colorMapFilter-&gt;GetOutput() );<BR>  writer-&gt;SetFileName("fds.tiff" );<BR>  writer-&gt;Update();<BR>}</DIV><DIV></DIV><DIV></DIV><DIV><BR>project (MIRCIT)<BR><BR>#<BR>#FIND ITK<BR>#<BR>FIND_PACKAGE(ITK)<BR>IF (USE_ITK_FILE)<BR>  INCLUDE (${USE_ITK_FILE})<BR>ELSE (USE_ITK_FILE)<BR>  MESSAGE( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration")<BR>ENDIF (USE_ITK_FILE)<BR><BR><BR>#<BR>#FIND VTK<BR>#<BR>FIND_PACKAGE(VTK)<BR>IF(USE_VTK_FILE)<BR> INCLUDE(${USE_VTK_FILE})<BR>ELSE
 (USE_VTK_FILE)<BR> MESSAGE( FATAL_ERROR "This app. req. VTK. One of these comp. is. missing. Please verify conf.")<BR>ENDIF (USE_VTK_FILE)<BR><BR><BR>#<BR>#FIND FLTK<BR>#<BR>FIND_PACKAGE(FLTK)<BR>  IF (FLTK_FOUND)<BR>  INCLUDE_DIRECTORIES (${FLTK_INCLUDE_DIR})<BR>  LINK_LIBRARIES( ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES} )<BR>  ELSE (FLTK_FOUND)<BR>  MESSAGE( FATAL_ERROR "This application requires FLTK. One of these components is missing. Please verify configuration")<BR>ENDIF (FLTK_FOUND)<BR><BR>add_executable (MIRCIT main.cpp MIRCIT.cpp MIRCIT.h MIRCITGui.cpp MIRCITGui.h info.cpp vtkFlRenderWindowInteractor.cpp)<BR><BR><BR>TARGET_LINK_LIBRARIES(MIRCIT vtkCommon vtkexpat vtkFiltering vtkfreetype vtkftgl vtkGraphics vtkHybrid vtkImaging vtkIO vtkjpeg vtkpng vtkVolumeRendering vtkRendering vtktiff vtkzlib ITKBasicFilters ITKCommon ITKIO ${ITK_LIBRARIES})<BR><BR></DIV></div><br>


      </body></html>