[Insight-users] Gradient vector flow output image is empty
Luis Ibanez
luis.ibanez at kitware.com
Tue Feb 23 17:11:56 EST 2010
Hi Arunachalam,
If the image at the end of the pipeline looks empty,
you should start saving the images that are produced
by each one of the intermediate filters in the pipeline,
until you find one that is not empty.
The filter that sits between the non-empty image and
the empty one, is the filter for which you must fine
tune the parameters.
Please let us know what you find.
Thanks
Luis
--------------------------------------------------
On Fri, Feb 19, 2010 at 2:59 PM, Arunachalam Kana
<Kana.Arunachalam at fh-wels.at> wrote:
> 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
>
> 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
>
> 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
>
> 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
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list