[Insight-users] Gradient vector flow output image is empty

Arunachalam Kana Kana.Arunachalam at fh-wels.at
Fri Feb 19 14:59:53 EST 2010


Hi Luis  & Users,

 

Few days back you suggested me to read 3 papers.

A) "Flux driven medial curve extraction"

     http://www.insight-journal.org/browse/publication/165
<http://www.insight-journal.org/browse/publication/165> 

     Mellado X., Larrabide I., Hernandez M., Frangi A.

     Pompeu Fabra University, University of Zaragoza

 

      ****useful pre processing step for my application

 

B)  "Fast Marching Minimal Path Extraction in ITK"

      http://www.insight-journal.org/browse/publication/213
<http://www.insight-journal.org/browse/publication/213> 

      Mueller D.

      Queensland University of Technology

 

      ****Not very useful for my application as i cannot provide seed
point, start point or end point,

      as i have to extract few 100,000 tubular shaped fibres. I am
looking for an automatic solution.

 

C)   "Generalizing vesselness with respect to dimensionality and shape"

       http://www.insight-journal.org/browse/publication/175
<http://www.insight-journal.org/browse/publication/175> 

       Antiga L.

       Mario Negri Institute, Italy

      

      ****useful and i am trying to use the example and try to use for
my application.

 

Apart from the above 2 paper which suits my application, i am interested
to use Gradient vector flow snakes.

As the gradient vector flow of tubular structure point towards the
center of the tube. I plan to use GVF along with hessian matrix and
Frangi's vesselness

measure to extract the tubular shape.

 

I am trying to run the itkgradientvectorflow.cxx example. I made some
changes in the code. The changes are based on a itk user email i found
in itk user achieves. 

The pipeline is:

Input image -> gradient magnitude image filter (edge map) -> gradient
image filter -> gradient vector flow.

 

The input image is 3D Ct image and pixel type is unsigned short. No. Of
iteration = 200, noise = 300.

I do not get compilation error. The output of the pipeline is empty
image. I used paraview to visualise the output image, but the image was
empty.

 

I am interested in realising the gradient vector flow. Some help to
solve the issue will be highly appreciated.

 

int main( int argc, char * argv[] )

{

  if( argc < 5 ) 

    { 

    std::cerr << "Usage: " << std::endl;

    std::cerr << argv[0] << "  inputImageFile  outputImageFile";

    std::cerr << " numberOfIterations  noiseLevel" << std::endl;

    return EXIT_FAILURE;

    }

  const unsigned int  Dimension = 3;

  typedef    unsigned short    InputPixelType;

  typedef float MagPixelType;

  typedef    itk::CovariantVector< float, Dimension >  OutputPixelType;

 

  typedef itk::Image< InputPixelType,  Dimension >   InputImageType;

  typedef itk::Image< MagPixelType, Dimension > MagImageType;

  typedef itk::Image< OutputPixelType, Dimension >   OutputImageType;

 

  //set image reader filter

  typedef itk::ImageFileReader< InputImageType >  ReaderType;

  ReaderType::Pointer reader = ReaderType::New();

  reader->SetFileName( argv[1] );

  reader->Update();

  

  //set gradient magnitude filter

  typedef itk::GradientMagnitudeImageFilter<InputImageType,
MagImageType> MagnitudeType;

  MagnitudeType::Pointer magnitude = MagnitudeType::New();

  magnitude->SetInput( reader->GetOutput() ) ;

  magnitude->Update();

 

  //set gradient image filter

  typedef itk::GradientImageFilter<MagImageType, float, float>
GradientType;

  GradientType::Pointer gradient = GradientType::New();

  gradient->SetInput( magnitude->GetOutput() );

  gradient->Update();

 

  //set gradient vector flow filter

  typedef itk::GradientVectorFlowImageFilter< OutputImageType,
OutputImageType >  FilterType;

  FilterType::Pointer filter = FilterType::New();

  filter->SetInput( gradient->GetOutput() );

 

  const unsigned int numberOfIterations = atoi( argv[3] );

  const double       noiseLevel = atof( argv[4] );

  filter->SetIterationNum( numberOfIterations );

  filter->SetNoiseLevel( noiseLevel );

  filter->Update();

 

  //set writer image filter

  typedef itk::ImageFileWriter< OutputImageType >  WriterType;

  WriterType::Pointer writer = WriterType::New();

  writer->SetFileName( argv[2] );

 

  writer->SetInput( filter->GetOutput() );

  writer->Update();

 

  return EXIT_SUCCESS;

}

 

 

Regards,

Kana

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100219/c81bc56f/attachment.htm>


More information about the Insight-users mailing list