[Insight-users] MultiScaleHessianBasedMeasureImageFilter
Luca Antiga
luca.antiga at gmail.com
Wed Jun 2 11:28:26 EDT 2010
Hi Juan Carlos,
try replacing GetRequestedRegion with GetBufferedRegion in the
iterator.
Cheers
Luca
On 02/giu/2010, at 17.23, Juan Carlos Prieto <juanprietob at gmail.com>
wrote:
> Hi Luca,
>
> Thank you for the response, I ran some other tests on the filter
> like printing values directly on the template
> (itkMultiScaleHessianBasedMeasureImageFilter.txx) and I think is
> working fine because the filter managed to show them. But my problem
> is that I can't get an iterator to go through the values after the
> update of the filter, like the example I sent you.
>
> _hessianmultiscale->Update();
> _hessianmultiscale->GetOutput(); //this is working fine
>
> TypeConstRegionIterator constit( _hessianmultiscale->GetScalesOutput
> (),
> _hessianmultiscale->GetScalesOutput()-
> >GetRequestedRegion() );
>
> for ( constit.GoToBegin(); !constit.IsAtEnd(); ++constit);
> {
> cout<<constit.Get()<< " "; //this output produces "0" only
> }
>
> I'm going to try saving the image and then reading it to see what
> happens.
> I'll let you know.
>
> Juan Carlos Prieto
>
> 2010/6/2 Luca Antiga <luca.antiga at gmail.com>
> Hi Juan Carlos,
> I ran the test for the filter in Testing/Code/Review on one of my
> images and it worked correctly, the scales image was filled with
> scale values. Find the code I ran attached.
> Can you try it out on your image?
>
> Luca
>
>
>
>
>
>
> On May 31, 2010, at 8:18 PM, Juan Carlos Prieto wrote:
>
> Hello Luis,
>
> I'm trying to use the MultiScaleHessianBasedMeasureImageFilter.
> My problem is that I don't know how to get the "GetScalesOutput()"
> to work, I have both methods to On "GenerateHessianOutputOn()" and
> "GenerateScalesOutputOn()", but the ScalesOutput produces
> nothing.
>
> This is my code
>
> _hessianvessel->SetAlpha1 (0.5);
> _hessianvessel->SetAlpha2 (2);
>
> _hessianmultiscale->SetInput(image);
> _hessianmultiscale->SetHessianToMeasureFilter(_hessianvessel);
> _hessianmultiscale->SetSigmaMinimum(0.5);
> _hessianmultiscale->SetSigmaMaximum(4.0);
> _hessianmultiscale->SetNumberOfSigmaSteps(5);
> _hessianmultiscale->GenerateHessianOutputOn();
> _hessianmultiscale->GenerateScalesOutputOn();
> _hessianmultiscale->Update();
>
> _outputimagefloat = ImageTypeFloat::New();
> _outputimagefloat->SetRegions(_hessianmultiscale->GetOutput()-
> >GetRequestedRegion());
> _outputimagefloat->Allocate();
>
> TypeConstRegionIterator constit( _hessianmultiscale-
> >GetScalesOutput(),
> _hessianmultiscale->GetScalesOutput()-
> >GetRequestedRegion() );
>
> TypeRegionIterator outputit( _outputimagefloat,
> _outputimagefloat->GetRequestedRegion() );
>
> for ( constit.GoToBegin(); !constit.IsAtEnd(); ++constit);
> {
> cout<<constit.Get()<< " "; //this output produces "0" only
> }
> /*for ( constit.GoToBegin(), outputit.GoToBegin(); !
> constit.IsAtEnd(); ++constit, ++outputit)
> {
> outputit.Set(constit.Get()); //does not work
> }*/
>
>
> I hope this is enough information
>
> Thank you for your time
>
> Juan Carlos Prieto
>
> _____________________________________
> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100602/25ceb541/attachment-0001.htm>
More information about the Insight-users
mailing list