[Insight-users] Graft error: cannot cast: is it a mini pipeline problem?

lynx.abraxas at freenet.de lynx.abraxas at freenet.de
Sun Jul 26 07:08:17 EDT 2009


Dear Richard Beare,


Thanks  for  Your  hints. Pointing me the HMinima filter broght up the idea to
not let it transform between two different data formats (eg short and char). I
checked this and found out if the input and output format are the same (either
signed or unsigned short) it works.  I'm  not  sure  if  that's  a  bug  or  a
requirement. If it is a requirement it should be mentioned in the docs. As far
as I understand the input format  has  not  to  match  the  output  format  in
general.
Thanks  alsor  for  describing  how to debug filter. Why do I not have to call
update on each filter if update the writer? Is the  writer  update()  updating
all filters in the pipeline as well?

Regards,
Lynx


On 26/07/09 17:30:50, Richard Beare wrote:
> Hi,
> 
> On closer examination it looks to me like there is something wrong
> with the HMinima filter. The class has two template parameters - input
> and output image types, but the internal erode filter is instantiated
> using only the input type. This looks like a bug to me.
> 
> On Sat, Jul 25, 2009 at 8:44 PM, Richard Beare<richard.beare at gmail.com> wrote:
> > The error seems to be coming from the HMinima filter (determined by
> > updating each filter in your pipeline individually and asking the
> > debugger where the crash happens), but I can't see any obvious problem
> > with it. Perhaps there is some problem with reconstruction by erosion
> > filter, used by the HMinima filter.
> >
> >
> > On Sat, Jul 25, 2009 at 5:38 PM, <lynx.abraxas at freenet.de> wrote:
> >> Hello!
> >>
> >>
> >> Looking  at the other threads about Graft() I wonder if my "cannot cast" error
> >> has something to do with some minipipeline somewhere in the filters I use.  As
> >> far  as  I  understand  MorphologicalWatershedImageFilter  has a mini pipeline
> >> where as MorphologicalWatershedFromMarkersImageFilter has not.
> >> Another idea I have: Could the filters I connect in my program  be  the  wrong
> >> ones  and they don't fit to each other? Contrary they are pretty much the same
> >> as in segGel.cxx (from the watershed insight publication).
> >> How can I find out what PKN3itk10DataObjectE and  PKN3itk5ImageIsLj2EEE  stand
> >> for?
> >>
> >> Many thanks for any hints or help
> >> Lynx
> >>
> >> On 23/07/09 23:31:21, lynx.abraxas at freenet.de wrote:
> >>> Hello!
> >>>
> >>>
> >>> I've written the little test program below but it only works if I use MorphologicalWatershedImageFilter directly but not if I use MorphologicalWatershedFromMarkersImageFilter and hm, rm and cc as discribed in the publication. I used segGel.cxx as an example.
> >>> What is wrong with my test in long form?
> >>> What is causing:
> >>> terminate called after throwing an instance of 'itk::ExceptionObject'
> >>>   what():  /usr/local/include/InsightToolkit/Common/itkImage.txx:135:
> >>> itk::ERROR: Image(0x85dd268): itk::Image::Graft() cannot cast PKN3itk10DataObjectE to PKN3itk5ImageIsLj2EEE
> >>>
> >>> Many thanks for any hints or help
> >>> Lynx


More information about the Insight-users mailing list