<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></DIV><DIV></DIV><DIV>My CMakeList.cxx :</DIV><DIV></DIV><DIV></DIV><DIV>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>Thanks!<BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><BR><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><FONT size="2" face="Tahoma"><HR size="1"><B><SPAN style="font-weight: bold;">Von:</SPAN></B> zhouyu &lt;iconme@163.com&gt;<BR><B><SPAN style="font-weight: bold;">An:</SPAN></B> Yusuf OEZBEK &lt;nasil122002@yahoo.de&gt;<BR><B><SPAN
 style="font-weight: bold;">Gesendet:</SPAN></B> Montag, den 1. Juni 2009, 10:08:33 Uhr<BR><B><SPAN style="font-weight: bold;">Betreff:</SPAN></B> Re: [vtkusers] VolumeRendering Problem<BR></FONT><BR>
<STYLE type="text/css">DIV {
MARGIN:0px;}
</STYLE>
<STYLE> _filtered {
font-family:宋体;
}
 _filtered {
font-family:Verdana;
}
 _filtered {

}
 _filtered {margin:72.0pt 90.0pt 72.0pt 90.0pt;}
P.MsoNormal {
TEXT-JUSTIFY:inter-ideograph;FONT-SIZE:10.5pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Times New Roman";TEXT-ALIGN:justify;}
LI.MsoNormal {
TEXT-JUSTIFY:inter-ideograph;FONT-SIZE:10.5pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Times New Roman";TEXT-ALIGN:justify;}
DIV.MsoNormal {
TEXT-JUSTIFY:inter-ideograph;FONT-SIZE:10.5pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Times New Roman";TEXT-ALIGN:justify;}
A:link {
COLOR:blue;TEXT-DECORATION:underline;}
SPAN.MsoHyperlink {
COLOR:blue;TEXT-DECORATION:underline;}
A:visited {
COLOR:purple;TEXT-DECORATION:underline;}
SPAN.MsoHyperlinkFollowed {
COLOR:purple;TEXT-DECORATION:underline;}
SPAN.EmailStyle17 {
FONT-WEIGHT:normal;COLOR:windowtext;FONT-STYLE:normal;FONT-FAMILY:Verdana;TEXT-DECORATION:none;}
DIV.Section1 {
}
UNKNOWN {
FONT-SIZE:10pt;}
BLOCKQUOTE {
MARGIN-TOP:0px;MARGIN-BOTTOM:0px;MARGIN-LEFT:2em;}
OL {
MARGIN-TOP:0px;MARGIN-BOTTOM:0px;}
UL {
MARGIN-TOP:0px;MARGIN-BOTTOM:0px;}
</STYLE>
<DIV><FONT face="Verdana" color="#000080" size="2">You may miss linking some 
libraries, I'm not quite sure though. If so, you can add them in the 
CMakeList.txt.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color="#000080">Yu</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face="Verdana" color="#c0c0c0" size="2">2009-06-01 </FONT></DIV><FONT face="Verdana" color="#000080" size="2">
<HR style="WIDTH:122px;HEIGHT:2px;" align="left" size="2">
</FONT><FONT face="Verdana" color="#000080" size="2">
<HR>
</FONT>
<DIV><FONT face="Verdana" size="2"><STRONG>发件人:</STRONG> Yusuf OEZBEK </FONT></DIV>
<DIV><FONT face="Verdana" size="2"><STRONG>发送时间:</STRONG> 2009-06-01  04:25:14 
</FONT></DIV>
<DIV><FONT face="Verdana" size="2"><STRONG>收件人:</STRONG> VTK Mailinglist 
</FONT></DIV>
<DIV><FONT face="Verdana" size="2"><STRONG>抄送:</STRONG> </FONT></DIV>
<DIV><FONT face="Verdana" size="2"><STRONG>主题:</STRONG> [vtkusers] VolumeRendering 
Problem </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Verdana" size="2">
<DIV style="">
<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:<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>}<BR><BR><BR></DIV></DIV><BR></FONT></DIV>
</DIV></DIV></div><br>


      </body></html>