Discussion:
[ITK-users] Patch for ApproximateSignedDistanceMapImageFilter
Chr. Rossmanith
2017-03-01 13:12:59 UTC
Permalink
For binary images with 0 for background and 1 for objects with an
integer input pixel type there is a problem representing the average of
0 and 1 = 0.5 with the input pixel type. The output pixel type is
required to be a floating pixel type (filter documentation), so it
should be safe to change the type of levelSetValue to OutputPixelType.

Regards,
Christina
Francois Budin
2017-03-01 13:42:54 UTC
Permalink
Hello Christina,

Thanks for the patch. Do you mind submitting it on Gerrit? This will
simplify the review process. If you do not already have a user account on
Gerrit, you can follow the instructions available here [1]. It will also
help to keep track of your own contributions, and will make potential
future contributions easy.

Thanks for helping,
Francois

[1] https://itk.org/Wiki/ITK/Git/Develop

On Wed, Mar 1, 2017 at 8:12 AM, Chr. Rossmanith <
For binary images with 0 for background and 1 for objects with an integer
input pixel type there is a problem representing the average of 0 and 1 =
0.5 with the input pixel type. The output pixel type is required to be a
floating pixel type (filter documentation), so it should be safe to change
the type of levelSetValue to OutputPixelType.
Regards,
Christina
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-users
Chr. Rossmanith
2017-03-01 13:47:18 UTC
Permalink
I'm behind a firewall and authentication fails. I can login into gerrit,
so it is not a wrong password. The wiki [1] told me to send the patch to
the ML because something is currently out of order...

[1] https://itk.org/Wiki/ITK/Git/Account#Gerrit

Christina
Post by Francois Budin
Hello Christina,
Thanks for the patch. Do you mind submitting it on Gerrit? This will
simplify the review process. If you do not already have a user account
on Gerrit, you can follow the instructions available here [1]. It will
also help to keep track of your own contributions, and will make
potential future contributions easy.
Thanks for helping,
Francois
[1] https://itk.org/Wiki/ITK/Git/Develop
On Wed, Mar 1, 2017 at 8:12 AM, Chr. Rossmanith
For binary images with 0 for background and 1 for objects with an
integer input pixel type there is a problem representing the
average of 0 and 1 = 0.5 with the input pixel type. The output
pixel type is required to be a floating pixel type (filter
documentation), so it should be safe to change the type of
levelSetValue to OutputPixelType.
Regards,
Christina
_____________________________________
Powered by www.kitware.com <http://www.kitware.com>
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
<http://www.kitware.com/opensource/opensource.html>
http://www.kitware.com/products/protraining.php
<http://www.kitware.com/products/protraining.php>
http://www.itk.org/Wiki/ITK_FAQ <http://www.itk.org/Wiki/ITK_FAQ>
http://public.kitware.com/mailman/listinfo/insight-users
<http://public.kitware.com/mailman/listinfo/insight-users>
Jon Haitz Legarreta
2017-03-10 13:56:11 UTC
Permalink
Patch file applied:
http://review.source.kitware.com/#/c/22149/

Let's see what the robots say.

Thanks Christina.

JON HAITZ

--
Post by Chr. Rossmanith
I'm behind a firewall and authentication fails. I can login into gerrit,
so it is not a wrong password. The wiki [1] told me to send the patch to
the ML because something is currently out of order...
[1] https://itk.org/Wiki/ITK/Git/Account#Gerrit
Christina
Hello Christina,
Thanks for the patch. Do you mind submitting it on Gerrit? This will
simplify the review process. If you do not already have a user account on
Gerrit, you can follow the instructions available here [1]. It will also
help to keep track of your own contributions, and will make potential
future contributions easy.
Thanks for helping,
Francois
[1] https://itk.org/Wiki/ITK/Git/Develop
On Wed, Mar 1, 2017 at 8:12 AM, Chr. Rossmanith <
For binary images with 0 for background and 1 for objects with an integer
input pixel type there is a problem representing the average of 0 and 1 =
0.5 with the input pixel type. The output pixel type is required to be a
floating pixel type (filter documentation), so it should be safe to change
the type of levelSetValue to OutputPixelType.
Regards,
Christina
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-users
Chr. Rossmanith
2017-03-31 12:07:13 UTC
Permalink
Hi,

2nd attempt using approach 1) (see below). What about typos in comments
I removed during bug fixing? Include into this patch as well or keep
them separate?

Additionally you find a small application creating an image with a
bright square on dark background which displays the image together with
the result of ApproximateSignedDistanceMapImageFilter. The pixel value
of the square is 1 by default but can be changed via command line.

Regards,
Christina
Post by Francois Budin
Hello Christina,
I see different paths to try to solve this issue and I am not sure
1) You could modify the itkIsoContourDistanceImageFilter class so that
m_LevelSetValue is of some real type. When looking in the
implementation of this filter, you can see that sometimes,
m_LevelSetValue is casted to a real type [1], so maybe it makes sense
to do that.
2) Casting is one solution, but you have to be careful if you want to
cast to float or double. If you cast to float, and the input is of
type double, you will loose precision. If you always cast to double,
you might use a lot of memory. Sadly, in the itkNumericTraits, there
is no way of asking for "the smallest floating type that contains my
current type". You can call "RealType" which will be "double", or
"FloatType" which will be float. One strength of casting, is that if
you perform it in place, it can actually not do anything if it doesn't
need to [2].
3) To avoid casting when you don't need to (your type is float or
double), you could use the SFINAE concept like it is used here [3].
This is more complex and may not be worth it.
Beware that images may contain pixels that are not only scalar values,
but also RGB, RGBA, vectors. I am not sure if the ApproximateDistance
filter supports these types, but it is good to be careful, when
modifying the code, to not restrict the usage of a filter to scalar if
not required. To avoid that kind of issues, and to answer your
original question, you can use the Rebind structure [4].
I hope this helps.
I will be out of town for a week, and most likely will have limited to
no access to the internet, so don't be surprised if I do not answer
your next message within the next week.
Thanks for helping!
Francois
[1]
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx#L314
[2]
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.hxx#L42
[3]
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/ImageBase/include/itkConvertPixelBuffer.h#L153-L161
[4]
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h#L84-L85
On Wed, Mar 29, 2017 at 7:10 AM, Chr. Rossmanith
Hi Francois,
I'm getting back to this issue. I'll introduce an intermediate
image in the mini pipeline used in
ApproximateSignedDistanceMapImageFilter which has a floating type
for pixel values. Given
/** Type for input image. */
typedef TInputImage InputImageType;
how can I define a corresponding image type FloatImageType
replacing the unknown pixel type by float? I can't write
itk::Image< float, xxx > because I don't know xxx.
Is there a way to query the pixel type to avoid applying the
CastImageFilter in case we already get floating valued pixels?
Christina
Hi Christina,
Maybe your idea was good but needs more work (e.g. cast the input
image to the output type? at least if input is not a float, or
maybe something else). I am glad you found a solution that works
for you. If you need your software to be faster, you can also
replace the SignedDanielssonDistanceMap with the
SignedMauerDistanceMap [1].
Hope this helps, and thanks for your contribution. Do not
hesitate to submit a new patch to solve your original problem if
you find a solution.
Francois
[1]
https://itk.org/Doxygen/html/classitk_1_1SignedMaurerDistanceMapImageFilter.html
<https://itk.org/Doxygen/html/classitk_1_1SignedMaurerDistanceMapImageFilter.html>
On Fri, Mar 3, 2017 at 8:23 AM, Chr. Rossmanith
Hi Francois,
really strange, on Wednesday changing the data type made my
application work as expected (but obviously there must have
been an additional change which really made the application
work...). When trying to build a small example for you, I
failed. I still think that feeding a 0/1 image into
ApproximateSignedDistanceMapImageFilter makes sense.
Originally I'm interested in ContourExtractor2D, which
operates on a distance map using 0 as contour level. Unlike
in the ContourExtractor2D example I've decided to use
SignedDanielssonDistanceMap which works fine without any patches.
So send the patch to /dev/null for the moment...
Christina
Post by Francois Budin
Hello Christina,
I just reviewed you patch. You are changing the type of the
variable levelSetValue to OutputPixelType which is suppose
to be a floating point value.
However, the computation is done with InputPixelType
variables (m_InsideValue and m_OutsideValue) and divided by
m_IsoContourFilter->SetLevelSetValue(levelSetValue);
which accepts values of InputPixelType [1] since
typedef IsoContourDistanceImageFilter< InputImageType,
OutputImageType > IsoContourType;
I am not sure if your patch solves the problem that you
mentioned. Do you have a test that would verify that the new
behavior corresponds to your expectations? Based on the code
review I have done, I would not expect the behavior of the
filter to change.
Let me know if I missed a detail. Thank you for your
contribution!
Francois
[1]
https://itk.org/Doxygen/html/classitk_1_1IsoContourDistanceImageFilter.html
<https://itk.org/Doxygen/html/classitk_1_1IsoContourDistanceImageFilter.html>
On Wed, Mar 1, 2017 at 8:12 AM, Chr. Rossmanith
For binary images with 0 for background and 1 for
objects with an integer input pixel type there is a
problem representing the average of 0 and 1 = 0.5 with
the input pixel type. The output pixel type is required
to be a floating pixel type (filter documentation), so
it should be safe to change the type of levelSetValue to
OutputPixelType.
Regards,
Christina
_____________________________________
Powered by www.kitware.com <http://www.kitware.com>
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
<http://www.kitware.com/opensource/opensource.html>
Kitware offers ITK Training Courses, for more
http://www.kitware.com/products/protraining.php
<http://www.kitware.com/products/protraining.php>
http://www.itk.org/Wiki/ITK_FAQ
<http://www.itk.org/Wiki/ITK_FAQ>
http://public.kitware.com/mailman/listinfo/insight-users
<http://public.kitware.com/mailman/listinfo/insight-users>
Matt McCormick
2017-04-03 19:18:03 UTC
Permalink
Hi Christina,
2nd attempt using approach 1) (see below). What about typos in comments I
removed during bug fixing? Include into this patch as well or keep them
separate?
Thanks! This patch has been uploaded:

http://review.source.kitware.com/#/c/22149/3


The typos could go in a different patch (ideally), but it is OK, if
they are included.

Thanks,
Matt
Additionally you find a small application creating an image with a bright
square on dark background which displays the image together with the result
of ApproximateSignedDistanceMapImageFilter. The pixel value of the square is
1 by default but can be changed via command line.
Regards,
Christina
Hello Christina,
I see different paths to try to solve this issue and I am not sure which one
1) You could modify the itkIsoContourDistanceImageFilter class so that
m_LevelSetValue is of some real type. When looking in the implementation of
this filter, you can see that sometimes, m_LevelSetValue is casted to a
real type [1], so maybe it makes sense to do that.
2) Casting is one solution, but you have to be careful if you want to cast
to float or double. If you cast to float, and the input is of type double,
you will loose precision. If you always cast to double, you might use a lot
of memory. Sadly, in the itkNumericTraits, there is no way of asking for
"the smallest floating type that contains my current type". You can call
"RealType" which will be "double", or "FloatType" which will be float. One
strength of casting, is that if you perform it in place, it can actually not
do anything if it doesn't need to [2].
3) To avoid casting when you don't need to (your type is float or double),
you could use the SFINAE concept like it is used here [3]. This is more
complex and may not be worth it.
Beware that images may contain pixels that are not only scalar values, but
also RGB, RGBA, vectors. I am not sure if the ApproximateDistance filter
supports these types, but it is good to be careful, when modifying the code,
to not restrict the usage of a filter to scalar if not required. To avoid
that kind of issues, and to answer your original question, you can use the
Rebind structure [4].
I hope this helps.
I will be out of town for a week, and most likely will have limited to no
access to the internet, so don't be surprised if I do not answer your next
message within the next week.
Thanks for helping!
Francois
[1]
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx#L314
[2]
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.hxx#L42
[3]
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/ImageBase/include/itkConvertPixelBuffer.h#L153-L161
[4]
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h#L84-L85
On Wed, Mar 29, 2017 at 7:10 AM, Chr. Rossmanith
Post by Francois Budin
Hi Francois,
I'm getting back to this issue. I'll introduce an intermediate image in
the mini pipeline used in ApproximateSignedDistanceMapImageFilter which has
a floating type for pixel values. Given
/** Type for input image. */
typedef TInputImage InputImageType;
how can I define a corresponding image type FloatImageType replacing the
unknown pixel type by float? I can't write itk::Image< float, xxx > because
I don't know xxx.
Is there a way to query the pixel type to avoid applying the
CastImageFilter in case we already get floating valued pixels?
Christina
Hi Christina,
Maybe your idea was good but needs more work (e.g. cast the input image to
the output type? at least if input is not a float, or maybe something else).
I am glad you found a solution that works for you. If you need your software
to be faster, you can also replace the SignedDanielssonDistanceMap with the
SignedMauerDistanceMap [1].
Hope this helps, and thanks for your contribution. Do not hesitate to
submit a new patch to solve your original problem if you find a solution.
Francois
[1]
https://itk.org/Doxygen/html/classitk_1_1SignedMaurerDistanceMapImageFilter.html
On Fri, Mar 3, 2017 at 8:23 AM, Chr. Rossmanith
Post by Francois Budin
Hi Francois,
really strange, on Wednesday changing the data type made my application
work as expected (but obviously there must have been an additional change
which really made the application work...). When trying to build a small
example for you, I failed. I still think that feeding a 0/1 image into
ApproximateSignedDistanceMapImageFilter makes sense.
Originally I'm interested in ContourExtractor2D, which operates on a
distance map using 0 as contour level. Unlike in the ContourExtractor2D
example I've decided to use SignedDanielssonDistanceMap which works fine
without any patches.
So send the patch to /dev/null for the moment...
Christina
Hello Christina,
I just reviewed you patch. You are changing the type of the variable
levelSetValue to OutputPixelType which is suppose to be a floating point
value.
However, the computation is done with InputPixelType variables
(m_InsideValue and m_OutsideValue) and divided by an integer. Additionally,
m_IsoContourFilter->SetLevelSetValue(levelSetValue);
which accepts values of InputPixelType [1] since IsoContourType is
typedef IsoContourDistanceImageFilter< InputImageType, OutputImageType
Post by Francois Budin
IsoContourType;
I am not sure if your patch solves the problem that you mentioned. Do you
have a test that would verify that the new behavior corresponds to your
expectations? Based on the code review I have done, I would not expect the
behavior of the filter to change.
Let me know if I missed a detail. Thank you for your contribution!
Francois
[1]
https://itk.org/Doxygen/html/classitk_1_1IsoContourDistanceImageFilter.html
On Wed, Mar 1, 2017 at 8:12 AM, Chr. Rossmanith
Post by Francois Budin
For binary images with 0 for background and 1 for objects with an
integer input pixel type there is a problem representing the average of 0
and 1 = 0.5 with the input pixel type. The output pixel type is required to
be a floating pixel type (filter documentation), so it should be safe to
change the type of levelSetValue to OutputPixelType.
Regards,
Christina
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
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.php

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://public.kitware.com/mailman/listinfo/insight-users
Francois Budin
2017-04-06 13:27:58 UTC
Permalink
Thanks Christina for taking care of this problem! The patch you submitted
looks good to me. It would be perfect if you could create a test using the
images your generate to ensure that the problem does not appear again in
the future.

Francois
Hi Christina,
Post by Chr. Rossmanith
2nd attempt using approach 1) (see below). What about typos in comments
I
Post by Chr. Rossmanith
removed during bug fixing? Include into this patch as well or keep them
separate?
http://review.source.kitware.com/#/c/22149/3
The typos could go in a different patch (ideally), but it is OK, if
they are included.
Thanks,
Matt
Post by Chr. Rossmanith
Additionally you find a small application creating an image with a bright
square on dark background which displays the image together with the
result
Post by Chr. Rossmanith
of ApproximateSignedDistanceMapImageFilter. The pixel value of the
square is
Post by Chr. Rossmanith
1 by default but can be changed via command line.
Regards,
Christina
Hello Christina,
I see different paths to try to solve this issue and I am not sure which
one
Post by Chr. Rossmanith
1) You could modify the itkIsoContourDistanceImageFilter class so that
m_LevelSetValue is of some real type. When looking in the implementation
of
Post by Chr. Rossmanith
this filter, you can see that sometimes, m_LevelSetValue is casted to a
real type [1], so maybe it makes sense to do that.
2) Casting is one solution, but you have to be careful if you want to
cast
Post by Chr. Rossmanith
to float or double. If you cast to float, and the input is of type
double,
Post by Chr. Rossmanith
you will loose precision. If you always cast to double, you might use a
lot
Post by Chr. Rossmanith
of memory. Sadly, in the itkNumericTraits, there is no way of asking for
"the smallest floating type that contains my current type". You can call
"RealType" which will be "double", or "FloatType" which will be float.
One
Post by Chr. Rossmanith
strength of casting, is that if you perform it in place, it can actually
not
Post by Chr. Rossmanith
do anything if it doesn't need to [2].
3) To avoid casting when you don't need to (your type is float or
double),
Post by Chr. Rossmanith
you could use the SFINAE concept like it is used here [3]. This is more
complex and may not be worth it.
Beware that images may contain pixels that are not only scalar values,
but
Post by Chr. Rossmanith
also RGB, RGBA, vectors. I am not sure if the ApproximateDistance filter
supports these types, but it is good to be careful, when modifying the
code,
Post by Chr. Rossmanith
to not restrict the usage of a filter to scalar if not required. To avoid
that kind of issues, and to answer your original question, you can use
the
Post by Chr. Rossmanith
Rebind structure [4].
I hope this helps.
I will be out of town for a week, and most likely will have limited to no
access to the internet, so don't be surprised if I do not answer your
next
Post by Chr. Rossmanith
message within the next week.
Thanks for helping!
Francois
[1]
https://github.com/InsightSoftwareConsortium/ITK/
blob/master/Modules/Filtering/DistanceMap/include/
itkIsoContourDistanceImageFilter.hxx#L314
Post by Chr. Rossmanith
[2]
https://github.com/InsightSoftwareConsortium/ITK/
blob/master/Modules/Filtering/ImageFilterBase/include/
itkCastImageFilter.hxx#L42
Post by Chr. Rossmanith
[3]
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/
ImageBase/include/itkConvertPixelBuffer.h#L153-L161
Post by Chr. Rossmanith
[4]
https://github.com/InsightSoftwareConsortium/ITK/
blob/master/Modules/Filtering/Smoothing/include/
itkSmoothingRecursiveGaussianImageFilter.h#L84-L85
Post by Chr. Rossmanith
On Wed, Mar 29, 2017 at 7:10 AM, Chr. Rossmanith
Post by Francois Budin
Hi Francois,
I'm getting back to this issue. I'll introduce an intermediate image in
the mini pipeline used in ApproximateSignedDistanceMapImageFilter
which has
Post by Chr. Rossmanith
Post by Francois Budin
a floating type for pixel values. Given
/** Type for input image. */
typedef TInputImage InputImageType;
how can I define a corresponding image type FloatImageType replacing the
unknown pixel type by float? I can't write itk::Image< float, xxx >
because
Post by Chr. Rossmanith
Post by Francois Budin
I don't know xxx.
Is there a way to query the pixel type to avoid applying the
CastImageFilter in case we already get floating valued pixels?
Christina
Hi Christina,
Maybe your idea was good but needs more work (e.g. cast the input image
to
Post by Chr. Rossmanith
Post by Francois Budin
the output type? at least if input is not a float, or maybe something
else).
Post by Chr. Rossmanith
Post by Francois Budin
I am glad you found a solution that works for you. If you need your
software
Post by Chr. Rossmanith
Post by Francois Budin
to be faster, you can also replace the SignedDanielssonDistanceMap with
the
Post by Chr. Rossmanith
Post by Francois Budin
SignedMauerDistanceMap [1].
Hope this helps, and thanks for your contribution. Do not hesitate to
submit a new patch to solve your original problem if you find a
solution.
Post by Chr. Rossmanith
Post by Francois Budin
Francois
[1]
https://itk.org/Doxygen/html/classitk_1_1SignedMaurerDistanceMapImageF
ilter.html
Post by Chr. Rossmanith
Post by Francois Budin
On Fri, Mar 3, 2017 at 8:23 AM, Chr. Rossmanith
Post by Francois Budin
Hi Francois,
really strange, on Wednesday changing the data type made my application
work as expected (but obviously there must have been an additional
change
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
which really made the application work...). When trying to build a
small
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
example for you, I failed. I still think that feeding a 0/1 image into
ApproximateSignedDistanceMapImageFilter makes sense.
Originally I'm interested in ContourExtractor2D, which operates on a
distance map using 0 as contour level. Unlike in the
ContourExtractor2D
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
example I've decided to use SignedDanielssonDistanceMap which works
fine
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
without any patches.
So send the patch to /dev/null for the moment...
Christina
Hello Christina,
I just reviewed you patch. You are changing the type of the variable
levelSetValue to OutputPixelType which is suppose to be a floating
point
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
value.
However, the computation is done with InputPixelType variables
(m_InsideValue and m_OutsideValue) and divided by an integer.
Additionally,
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
m_IsoContourFilter->SetLevelSetValue(levelSetValue);
which accepts values of InputPixelType [1] since IsoContourType is
typedef IsoContourDistanceImageFilter< InputImageType,
OutputImageType
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
Post by Francois Budin
IsoContourType;
I am not sure if your patch solves the problem that you mentioned. Do
you
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
have a test that would verify that the new behavior corresponds to your
expectations? Based on the code review I have done, I would not expect
the
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
behavior of the filter to change.
Let me know if I missed a detail. Thank you for your contribution!
Francois
[1]
https://itk.org/Doxygen/html/classitk_1_1IsoContourDistanceImageFilter
.html
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
On Wed, Mar 1, 2017 at 8:12 AM, Chr. Rossmanith
Post by Francois Budin
For binary images with 0 for background and 1 for objects with an
integer input pixel type there is a problem representing the average
of 0
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
Post by Francois Budin
and 1 = 0.5 with the input pixel type. The output pixel type is
required to
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
Post by Francois Budin
be a floating pixel type (filter documentation), so it should be safe
to
Post by Chr. Rossmanith
Post by Francois Budin
Post by Francois Budin
Post by Francois Budin
change the type of levelSetValue to OutputPixelType.
Regards,
Christina
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-users
Loading...