[Insight-users] simple ITK App keeps crashing - what do I do
wrong?
Henning Meyer
tutmann at gmail.com
Fri May 12 12:06:46 EDT 2006
Hello Luis,
thanks for your answer.
I thought ris->GetOutput() will give me an FilterImage::Pointer, to
which I can call Update().
Why is that not true?
I thought I could also chain Filters, like having a blurImageFilter, and saying
filter->SetInput( ris->GetOutput() ); without calling ris->Update(); before.
Why does chaining work sometimes and sometimes not?
I thought the reference to ris is still held (with a smartpointer) in
the FilterImage::Pointer, which is returned to main and later passed
to gaussTransform.
Is that not true?
Is ris being destroyed when the program leaves the context of getImage?
I read the chapter about smartpointers and chaining of filters, but I
still have problems understanding whats going on here and causing my
error.
Henning
2006/5/12, Luis Ibanez <luis.ibanez at kitware.com>:
>
> Hi Henning,
>
> What is wrong with your getImage() function:
>
> FilterImageType::Pointer getImage(void) {
>
> RandomImageSourceType::Pointer ris =
> RandomImageSourceType::New();
>
> return ris->GetOutput();
> }
>
>
> is that you are missing to call the "Update()"
> method in the "ris" filter. The output of the
> filter does not exist until you call the Update()
> method.
More information about the Insight-users
mailing list