<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 <iconme@163.com><BR><B><SPAN style="font-weight: bold;">An:</SPAN></B> Yusuf OEZBEK <nasil122002@yahoo.de><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->displayImage3D->show();<BR> this->displayImage3D->redraw();<BR><BR>
typedef unsigned char PixelType;<BR> const unsigned int Dimension =
3;<BR><BR> typedef itk::OrientedImage< PixelType, Dimension >
ImageType;<BR> typedef itk::ImageSeriesReader< ImageType >
ReaderType;<BR> ReaderType::Pointer reader =
ReaderType::New();<BR><BR> typedef itk::GDCMImageIO ImageIOType;<BR>
ImageIOType::Pointer dicomIO = ImageIOType::New();<BR> <BR>
reader->SetImageIO( dicomIO );<BR><BR> typedef itk::GDCMSeriesFileNames
NamesGeneratorType;<BR> NamesGeneratorType::Pointer nameGenerator =
NamesGeneratorType::New();<BR><BR> nameGenerator->SetUseSeriesDetails(
true );<BR> nameGenerator->AddSeriesRestriction("0008|0021"
);<BR> nameGenerator->SetDirectory( selectedDirectory);<BR><BR>
typedef std::vector< std::string > SeriesIdContainer;<BR>
<BR> const SeriesIdContainer & seriesUID =
nameGenerator->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()->c_str();<BR><BR> typedef std::vector< std::string
> FileNamesContainer;<BR> FileNamesContainer fileNames;<BR><BR>
fileNames = nameGenerator->GetFileNames( seriesIdentifier );<BR>
reader->SetFileNames( fileNames );<BR>
reader->Update();<BR><BR> typedef float InternalPixelType;<BR>
typedef itk::RGBPixel<unsigned char> RGBPixelType;<BR> typedef
itk::Image< RGBPixelType, Dimension > RGBImageType;<BR> typedef
itk::ImageFileWriter< RGBImageType > WriterType;<BR> typedef
itk::WatershedImageFilter< ImageType > WatershedFilterType;<BR>
typedef itk::Functor::ScalarToRGBPixelFunctor< unsigned long>
ColorMapFunctorType;<BR> typedef WatershedFilterType::OutputImageType
LabeledImageType;<BR> typedef
itk::UnaryFunctorImageFilter<LabeledImageType,RGBImageType,ColorMapFunctorType
> ColorMapFilterType;<BR> typedef itk::ImageToVTKImageFilter
<LabeledImageType> ConnectorType;<BR> typedef
itk::GradientMagnitudeImageFilter<ImageType, ImageType>
GradientMagnitudeFilterType;<BR> <BR>
GradientMagnitudeFilterType::Pointer magnitudeFilter =
GradientMagnitudeFilterType::New();<BR>
magnitudeFilter->SetInput(reader->GetOutput());<BR><BR>
WatershedFilterType::Pointer watershedFilter =
WatershedFilterType::New();<BR> watershedFilter->SetInput(
magnitudeFilter->GetOutput() );<BR>
watershedFilter->SetLevel(this->sliderLevelWatershed->value());<BR>
watershedFilter->SetThreshold(this->sliderLevelWatershed->value());<BR><BR>
ColorMapFilterType::Pointer colorMapFilter =
ColorMapFilterType::New();<BR> colorMapFilter->SetInput(
watershedFilter->GetOutput() );<BR><BR> ConnectorType::Pointer
connector = ConnectorType::New();<BR>
connector->SetInput(watershedFilter->GetOutput());<BR><BR>
vtkImageShiftScale *shift = vtkImageShiftScale::New();<BR>
shift->SetInput(connector->GetOutput());<BR>
shift->SetOutputScalarTypeToUnsignedChar();<BR><BR> vtkVolumeProMapper
*mapperb = vtkVolumeProMapper::New();<BR>
mapperb->SetInputConnection(shift->GetOutputPort());<BR><BR>
vtkVolume *volumeb = vtkVolume::New();<BR>
volumeb->SetMapper(mapperb);<BR><BR> camera3D =
vtkCamera::New();<BR> camera3D->SetViewUp(0, 0, -1);<BR>
camera3D->SetPosition(0, 1, 0);<BR> camera3D->SetFocalPoint(0, 0,
0);<BR> camera3D->ComputeViewPlaneNormal();<BR>
camera3D->Azimuth(20);<BR><BR> renderer3DWaterShed =
vtkRenderer::New();<BR> renderWindow3DWaterShed =
vtkRenderWindow::New();<BR>
renderWindow3DWaterShed->AddRenderer(renderer3DWaterShed);<BR><BR>
displayImage3D->SetRenderWindow(renderWindow3DWaterShed);<BR>
displayImage3D->SetInteractorStyle(mode3DWaterShed);<BR>
displayImage3D->Initialize();<BR><BR>
renderer3DWaterShed->AddViewProp(volumeb);<BR>
renderer3DWaterShed->SetActiveCamera(camera3D);<BR>
renderer3DWaterShed->ResetCamera();<BR>
camera3D->Dolly(1.3);<BR>
renderer3DWaterShed->ResetCameraClippingRange();<BR>
renderer3DWaterShed->Render();<BR><BR>
this->displayImage3D->show();<BR>
this->displayImage3D->redraw();<BR><BR> WriterType::Pointer writer =
WriterType::New();<BR> writer->SetInput( colorMapFilter->GetOutput()
);<BR> writer->SetFileName("fds.tiff" );<BR>
writer->Update();<BR>}<BR><BR><BR></DIV></DIV><BR></FONT></DIV>
</DIV></DIV></div><br>
</body></html>