[Tubetk-developers] How to use tubeRidgeExtractor

kenichiro yoshimi rccm.kyoshimi at gmail.com
Tue Jun 25 07:21:40 EDT 2013


Dear TubeTK developers,

I'm newbie in TubeTK library. I want to extract tube objects in a 3D image
using "itktubeRidgeExtractor".  So, I write code such as
itktubeRidgeExtractorTest2.cxx, but a function "LocalRidge" always returns
false. My input 3D image is
  Spacing: 0.04, 0.04, 0.00616
  Dimension: 126, 101, 500
  Origin: 0, 0, 0,
while Branch.n010.sub.mha used in the Testing directory is
  Spacing: 1.0, 1.0, 1.0.
Could you tell me whether Spacing must be (1.0, 1.0, 1.0) or not in
tubeRidgeExtractor?

~~~~~~~~~~~~~~~~~~~~~
  ImageReaderType::Pointer imReader = ImageReaderType::New();
  imReader->SetFileName( argv[1] );
  imReader->Update();
  ImageType::Pointer im = imReader->GetOutput();

  typedef itk::tube::RidgeExtractor<ImageType> RidgeOpType;
  RidgeOpType::Pointer ridgeOp = RidgeOpType::New();

  ridgeOp->SetInputImage( im );
  ridgeOp->SetStepX( 0.75 );
  ridgeOp->SetExtent( 2.5 );
  ridgeOp->SetDynamicScale( true );
  ridgeOp->SetScale( 1.0 );

  RidgeOpType::ContinuousIndexType x0;
  x0[0] = 2.5;
  x0[1] = 2.0;
  x0[2] = 1.5;;

  if( !ridgeOp->LocalRidge( x0 ) )
    {
    std::cout << "Local ridge computation failed.  No ridge found." <<
std::endl;
    return EXIT_FAILURE;
    }
~~~~~~~~~~~~~~~~~~~~~

Thanks a lot,
yoshimi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/tubetk-developers/attachments/20130625/465e46c1/attachment.html>


More information about the Tubetk-developers mailing list