[Insight-developers] strange results with python wrapper
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Fri Apr 22 15:46:19 EDT 2005
Hi,
Can someone look at this problem ? It is an important problem : how can we use
python wrapper if we can't konw when result is good or not ?
I'm ready to give more details, make all needed tests etc, but I'm not able to
find the bug by myself.
Gaetan
On Monday 18 April 2005 07:18 pm, Gaetan Lehmann wrote:
> Hi,
>
> I have a strange and non reproducible result with a python script in which
> I try to implement a simple white top hat. The resulting image have some
> out of normal range pixels, and those pixels are not always at the same
> position, and haven't got the same value.
> I try to execute my script on 2 computers (running linux) with the same
> result.
> Here is an example of maximum and minimum values I get in the final image
> with different types and difference filters :
> [glehmann at pcconf5 pitk]$ python
> WhiteTopHatFilter.py
> /usr/share/itk-data/Baseline/Filtering/MedianImageFilter.png modules loaded
> <itk class type itk.SubtractImageFilter<US2US2US2>>
> 2 230
> 2 230
> 2 230
> 0 65535
> <itk class type itk.SubtractImageFilter<F2F2F2>>
> 2.0 230.0
> 2.0 230.0
> 2.0 230.0
> -146.0 147.0
> <itk class type itk.ConstrainedValueDifferenceImageFilter<US2US2US2>>
> 2 231
> 2 231
> 3 231
> 0 188
> <itk class type itk.ConstrainedValueDifferenceImageFilter<F2F2F2>>
> 2.0 230.0
> 2.0 230.0
> 2.0 230.0
> 1.17549435082e-38 147.0
>
> A second run gives :
> [glehmann at pcconf5 pitk]$ python
> WhiteTopHatFilter.py
> /usr/share/itk-data/Baseline/Filtering/MedianImageFilter.png modules loaded
> <itk class type itk.SubtractImageFilter<US2US2US2>>
> 2 230
> 2 230
> 2 230
> 0 65535
> <itk class type itk.SubtractImageFilter<F2F2F2>>
> 2.0 230.0
> 2.0 230.0
> 2.0 230.0
> -146.0 147.0
> <itk class type itk.ConstrainedValueDifferenceImageFilter<US2US2US2>>
> 2 230
> 2 230
> 2 230
> 0 140
> <itk class type itk.ConstrainedValueDifferenceImageFilter<F2F2F2>>
> 2.0 230.0
> 2.0 230.0
> 2.0 230.0
> 1.17549435082e-38 147.0
>
>
> I also tried to make the same pipeline in C++, and it works just fine.
> The script is attached. It use itk module I have proposed in
> http://www.itk.org/Bug/bug.php?op=show&bugid=1766&pos=0 . The result is the
> same with a pure InsightToolkit, but I have tested only one type.
> I have also wrapped missing filters.
> I can send files if needed...
>
> I really don't know where I should look to find the problem, so any help is
> very welcome.
>
> Regards,
>
> Gaetan.
More information about the Insight-developers
mailing list