itkEllipseBoundaryToImageFilter

Please use this identifier to cite or link to this publication: http://hdl.handle.net/1926/218
The current conversion from an ellipse spatial object to an image
using SpatialObjectToImageFilter filter could cost minutes because
the filter traverses all pixels in the output image. This delay is
quite noticeable during applications such as human-machine
interface. This document describes a contribution to the Insight
Toolkit ITK www.itk.org, which implements what we call an
itk::EllipseBoundaryToImageFilter. This is a derived from
SpatialObjectToImageFilter. It marks the output image by setting
the pixels along the boundary of the input ellipse to the
InsideValue and the OutsideValue elsewhere. This filter is fast
because it traverses the boundary only. This paper is accompanied
with the source code.
Data
minus 11 Files (108Kb)
Code
minus Automatic Testing Results by Insight-Journal Dashboard on Mon Sep 25 10:20:28 2006 for revision #2
starstarstarstarstar expertise: 5 sensitivity: 4.3
yellow This project passed all of its tests.
Click here for more details.

Go here to access the main testing dashboard.
plus Automatic Testing Results by Insight-Journal Dashboard on Thu Jul 13 12:41:37 2006 for revision #1
starstarstarstarstar expertise: 5 sensitivity: 5

Reviews
minus Ellipse Boundary To Image specialization by Hans Johnson on 10-09-2006 for revision #2
starstarstarstarstar expertise: 2 sensitivity: 4.8
yellow
Summary:
This article describes a proposed new filter that is a specialization similar to that of the SpatialObjectToImageFilter that is optimized for creating a boundary of an ellipse.

Hypothesis:
Generating an image of the boundary of an ellipse is an important and commonly used task.

Evidence:
No evidence given.


Open Science:
Not much science here, just specialization to fill a need.

Reproducibility:
I did not compile this source code in my environment.

Use of Open Source Software:
This is intended to be incorporated into ITK.

Open Source Contributions:
Source code is provided, along with a minimalistic test case.

Code Quality:
This is a specialization of similar ITK filters, and it follows the ITK conventions for coding style.

Applicability to other problems:
It seems that this is one of many specializations for converting spatial objects into images.


Suggestions for future work:
None

Requests for additional information from authors:
None

Additional Comments:
None
minus Fast Ellipse SpatialObject to Boundary Image by Dan Mueller on 09-14-2006 for revision #2
starstarstarstarstar expertise: 3 sensitivity: 4.8
yellow
Summary:
This paper presents a new fitler (derived from SpatialObjectToImageFilter) which converts only the boundary of an Ellipse SpatialObject to an image.

Open Science:
All source and tests are available. However, no baseline output images were provided to test my output with the 'expected' output.

Reproducibility:
I reproduced the work. I compiled the project on WinXP, with MSVC 8.0, using CMake 2.4.2 with no problems. I ran the test provided with the project and it reportedly passed. I added the #define SAVEIMAGE in itkEllipseBoundaryToImageFilterTest.cxx to force the output image to written to disk - the output was as described in the paper.

As meantioned above, it would be useful to provide a baseline output image with the paper.

Open Source Contributions:
Uses ITK.

Code Quality:
The code is in the ITK coding style, however some more comments would be good. I am also concerned regarding the use of 'magic numbers':
1. PI is defined as a const in EllipseBoundaryToImageFilter::ConvertOneSOToPoints. Try using ' #include "vnl/vnl_math.h" ' and then 'vnl_math::pi' (make sure that the project is linked with the VNL libraries).
2. What is the magic number '10.0' for in the following line: ' double numOfIter = maxRadius * 10.0 ; ' ? Is it possible to compute this number from the input SO? Will this number be correct for all cases? Perhaps I am misunderstanding what it is used for, some more comments would help...

Suggestions for future work:
1. Use vnl_math::pi (see above).
2. Think about the 'magic number' 10.0 (see above).
3. It's probably wise to separate the single test function into multiple tests. If one test fails, it appears that they all fail, even if this is not the case (because they are in the same function). Have a look at the CMake documentation and ITK test code for how to register multiple tests per project.
4. It seems the code for automatically computing the Size, Spacing, and Origin is disabled - it would be good if the filter could automatically compute these using the SO bounding box, etc.
5. Add a baseline output image (see above).

Comment by Zheen Zhao: Thanks! yellow
Thanks for your suggestions. A new revision has been uploaded.

In this revision:

1. The PI constant has been replaced by Use vnl_math::pi.
2. The magic number 10.0 is selected to ensure the sample rate is adaptive to the radius. This setting is adaptive to the SO because the maxRadius is from the SO.
3. I am wondering what will be the benefit to separate the test codes into multiple test cases?
4. "It seems the code for automatically computing the Size, Spacing, and Origin is disabled" Because there are multiple input SOs, so the automated setting of Size, Spacing and Origin from a single SO is not feasible in this case.
5. A baseline output image has been added.
minus itkEllipseBoundaryToImageFilter Review by Bryn Lloyd on 08-28-2006 for revision #2
starstarstarstarstar expertise: 3 sensitivity: 4.8
yellow
Summary:
This filter creates an image from an ellipse spatial object.

Hypothesis:
Not Applicable

Evidence:
The author has written a filter which is faster than alternative exitsing methods in ITK. The speedup is not given and has not been measured or documented.

Open Science:
This is open.

Reproducibility:
[Did you reproduce the authors’ work? yes
Did you download their code? Did you compile it? Did you run it? yes
Did you managed to get the same results that they reported? yes, using his parameters. For larger radius the method fails.

Use of Open Source Software:
This is open.

Open Source Contributions:
The code is written in ITK-style and is easy follow. The test gives an example of how to use the filter.

Code Quality:
The code is written in the ITK-style. Very easy to compile, it passes all it's tests. If the radius of the ellipse is increased though (e.g. to 50), the method produces an ellipse with holes/gaps. This happens because the method samples the surface and uses constant sampling angle-differences. The sampled points are then passed to a PointSetToImageFilter. On the other hand, if the radius is small too many sampling points are used.

Applicability to other problems:
Not sure how applicable this is to other projects/applications. The author does not say what the application is and why it needs to be fast.

Suggestions for future work:

Requests for additional information from authors:

Additional Comments:

Comment by Zheen Zhao: Thanks for pointing out the bug yellow
The author does not say what the application is and why it needs to be fast.
When visulizing a ellipse, the speed matters.
In revision 9, the the parameter of smapling is sensetive to the size of radius. Therefore, the bug is fixed. Thanks for pointing that out.
Add a new review
Quick Comments


Resources
backyellow
Download All

Statistics more
backyellow
Global rating: starstarstarstarstar
Review rating: starstarstarstarstar [review]
Code rating: starstarstarstarstar
Paper Quality: plus minus

Information more
backyellow
Keywords: EllipseBoundaryToImageFilter
Toolkits: ITK
Export citation:

Share
backyellow
Share

Linked Publications more
backyellow
Mesh Similarity Calculator Mesh Similarity Calculator
by Li W., Magnotta V.
Kappa Sigma Clipping Kappa Sigma Clipping
by Lehmann G.

View license
Loading license...

Send a message to the author
main_flat
Powered by Midas