[Insight-users] it works just once!
Luis Ibanez
luis.ibanez at kitware.com
Tue Dec 28 09:10:41 EST 2004
Hi Heros,
Are you invoking "Update()" in the filter
after you change the input ?
The filter will not execute until you invoke
Update() or UpdateLargestPossibleRegion().
Maybe it will help if you post a more complete
piece of your code.
Thanks
Luis
-------------------
heros deiddA wrote:
> I'm a newbie of ITK and i wrote a
> program which import a 256 grayscale image from a pointer
> to ITK,use a MedianImageFilter and export the result back
> overwriting the source image.
> First time the filter works and I obtain a processed image as result,
> but when I change the input Image, this is not processed and I obtain
> always the first image!
>
> The problem is that the pointer does'nt change, but changes the
> image to which the pointer refers. I solved that setting
> a parameter twice..
>
> origin[0]=1.0;//dummy change
> origin[0]=1.0;//dummy change
> importFilter->SetOrigin( origin ); //dummy change
> origin[0] = 0.0; // X coordinate
> origin[1] = 0.0; // Y coordinate
> importFilter->SetOrigin( origin );
>
>
> Is there a better solution?
> Thank you in advance,
> Heros
>
More information about the Insight-users
mailing list