[Insight-users] priors in itkBayesianClassifierImageFilter

Bruno Arbter bruno.arbter at isv.uni-stuttgart.de
Tue Dec 15 07:44:41 EST 2009


Works fine up to the calculation of the posteriors with priors (line 205 in
itkBayesianClassifierImageFilter.txx). I'm not very familiar with iterators
up to now, but the posteriors cannot be accessed in this way
(posteriors[i]=). Perhaps the variable needs some kind of memory allocation,
doesn't it?

> -----Ursprüngliche Nachricht-----
> Von: Karthik Krishnan [mailto:karthik.krishnan at kitware.com]
> Gesendet: Dienstag, 15. Dezember 2009 11:32
> An: Bruno Arbter
> Cc: insight-users at itk.org
> Betreff: Re: [Insight-users] priors in itkBayesianClassifierImageFilter
> 
> Thanks for catching this...
> 
> Fix committed :
> 
> /cvsroot/Insight/Insight/Code/Algorithms/itkBayesianClassifierImageFilt
> er.h,v
>  <--  itkBayesianClassifierImageFilter.h
> new revision: 1.16; previous revision: 1.15
> /cvsroot/Insight/Insight/Code/Algorithms/itkBayesianClassifierImageFilt
> er.txx,v
>  <--  itkBayesianClassifierImageFilter.txx
> new revision: 1.10; previous revision: 1.9
> 
> Update and please let us know..
> 
> On Tue, Dec 15, 2009 at 5:10 AM, Bruno Arbter
> <bruno.arbter at isv.uni-stuttgart.de> wrote:
> > Okay, priors can be set via SetInput - but the flag
> m_UserProvidedPriors in
> > itkBayesianClassifierImageFilter remains false, and therefore the
> priors are
> > not used without changing the constructor.
> >
> > Is there an example that really uses priors?
> >
> > Thanks
> > Bruno
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Karthik Krishnan [mailto:karthik.krishnan at kitware.com]
> >> Gesendet: Montag, 14. Dezember 2009 14:14
> >> An: Bruno Arbter
> >> Cc: insight-users at itk.org
> >> Betreff: Re: [Insight-users] priors in
> itkBayesianClassifierImageFilter
> >>
> >> Take a look at Examples/Statistics/BayesianClassifier.cxx: and at
> >> Examples/Statistics/BayesianClassifierInitializer.cxx:
> >>
> >> This class does have a method to set the priors. The prior image
> >> expected (optionally as the second input) is a N component
> >> VectorImage, where N is the number of classes. If the prior image is
> >> not specified, a uniform distribution is taken, (ie no priors.).
> >>
> >> The API to do this is simply....
> >>
> >>    filter->SetInput( 1, priorVectorImage );
> >>
> >> This is documented clearly in the doxygen.
> >>
> >> Thanks
> >> --
> >> karthik
> >>
> >> On Mon, Dec 14, 2009 at 7:47 AM, Bruno Arbter
> >> <bruno.arbter at isv.uni-stuttgart.de> wrote:
> >> > I want to use itkBayesianClassifierImageFilter with priors but I
> >> cannot find
> >> > any function to set the priors (e.g. SetPriors) in the class
> >> > itkBayesianClassifierImageFilter. How is the correct way to set
> >> priors?
> >> >
> >> > Bruno
> >> >
> >> > _____________________________________
> >> > 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
> >> >
> >>
> >>
> >>
> >> --
> >> _________________________________
> >> Karthik Krishnan
> >> R&D Engineer,
> >> Kitware Inc.
> >> Ph: +1 5188814919, +91 9538477060
> >
> > _____________________________________
> > 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
> >
> 
> 
> 
> --
> _________________________________
> Karthik Krishnan
> R&D Engineer,
> Kitware Inc.
> Ph: +1 5188814919, +91 9538477060



More information about the Insight-users mailing list