<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:"Nimbus Roman No9 L [urw]", serif;font-size:12pt"><DIV>Hello,<BR></DIV><DIV></DIV><DIV>I need help with my following problem.<BR>How can I show my DICOM images as 3D (volumetric display) with VTK?<BR>I read the DICOM images with itk::ImageSeriesReader and filter it with itk::WatershedImageFilter. For the connection between ITK and VTK I use itk:: ImageToVTKImageFilter. What classes should I use this in VTK, so that a volumetric display is out.<BR></DIV><DIV><BR></DIV><DIV></DIV><DIV>My Code:<BR><BR></DIV><DIV>         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>         typedef itk::GDCMImageIO ImageIOType;<BR>         typedef itk::GDCMSeriesFileNames NamesGeneratorType;<BR>
        typedef std::vector< std::string > SeriesIdContainer;<BR>         typedef std::vector< std::string > FileNamesContainer;<BR><BR>         ImageIOType::Pointer dicomIO = ImageIOType::New();<BR><BR>         ReaderType::Pointer reader = ReaderType::New();<BR>         reader->SetImageIO( dicomIO );<BR><BR>         NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();<BR>         nameGenerator->SetUseSeriesDetails( true );<BR>         nameGenerator->AddSeriesRestriction("0008|0021" );<BR>         nameGenerator->SetDirectory( selectedDirectory);<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>         FileNamesContainer fileNames;<BR>         fileNames = nameGenerator->GetFileNames( seriesIdentifier );<BR><BR>         reader->SetFileNames( fileNames );<BR>         reader->Update();<BR><BR></DIV><DIV></DIV><DIV></DIV><DIV>         typedef float InternalPixelType;<BR>         typedef itk::RGBPixel<unsigned char> RGBPixelType;<BR>         typedef itk::Image< InternalPixelType, Dimension > InternalImageType;<BR>         typedef itk::Image< RGBPixelType, Dimension > RGBImageType;<BR>//         typedef itk::ImageFileWriter< RGBImageType > WriterType;<BR>         typedef itk::GradientMagnitudeImageFilter<ImageType, ImageType> GradientMagnitudeFilterType;<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><BR> typedef itk::ImageToVTKImageFilter<LabeledImageType> ConnectorType;<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->SetThreshold(this->sliderThresholdWatershed->value());<BR>         watershedFilter->SetLevel(this->sliderLevelWatershed->value());<BR><BR> ColorMapFilterType::Pointer colorMapFilter = ColorMapFilterType::New();<BR> colorMapFilter->SetInput( watershedFilter->GetOutput() );<BR> <BR>         WriterType::Pointer writer =
WriterType::New();<BR>         writer->SetInput( colorMapFilter->GetOutput() );<BR>         writer->SetFileName("abc.tiff" );<BR>         writer->Update();<BR></DIV><DIV></DIV><DIV> ConnectorType::Pointer connector = ConnectorType::New();<BR> connector->SetInput( colorMapFilter->GetOutput());<BR></DIV><DIV></DIV><DIV></DIV><DIV>Thank you very much.<BR><BR></DIV>
</div><br>__________________________________________________<br>Do You Yahoo!?<br>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. <br>http://mail.yahoo.com </body></html>