[ITK] ThresholdImageFilter on VectorImage
David Froger
david.froger.ml at mailoo.org
Fri Mar 6 05:52:57 EST 2015
Note: this is an example with a real VectorImage that segfault (first email):
https://github.com/dfroger/issue/blob/53b2b44/itk/main2.cxx
Quoting David Froger (2015-03-06 10:22:08)
> Hello Bradley
>
> > On Mar 1, 2015, at 11:11 AM, David Froger <david.froger.ml at mailoo.org> wrote:
> > > Modifying the example:
> > > http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/NthElementImageAdaptor
> I post the wrong link, the correct one was:
> http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement
>
> > OK, you are using an Image of CovarientVectors not a VectorImage. There are different types and beats :) Confusing, I know.
> You're right!
>
> > My first guess here it that there is a problem with the output type of the threshold ImageFilter:
> >
> > template< typename TImage >
> > class ThresholdImageFilter:public InPlaceImageFilter< TImage, TImage >
> >
> > What to note here it that output type is the same as the input. That is the output is also an Adaptor image.
> >
> > You are not running the filter "inplace". Therefore the output is a new vector image, but there is an adaptor so only one component is being set.
> >
> > What are you expecting in the output? What are you trying to do?
> Thanks for the explanations.
>
> What I'm trying to to: I have a VectorImage, and I want to replace all pixel
> compoment values that are below a value TH with the value TH.
>
> I first tried to apply ThresholdImageFilter on the VectorImage, but I seems
> to accept only Image:
> https://github.com/dfroger/issue/blob/7d8ebbb/itk/main0.cxx#L86-L87
>
> Then I tried to loop with NthElementImageAdaptor on the VectorImage and apply
> ThresholdImageFilter on each VectorImage component, and then re-crete the
> VectorImage using ComposeImageFilter (don't work for now):
> https://github.com/dfroger/issue/blob/master/itk/main1.cxx
>
> Thank you,
> David
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
More information about the Community
mailing list