Abstract
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.
Keywords
Source Code and Data
Reviews
Hans Johnson
Monday 9 October 2006
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
Dan Mueller
Thursday 14 September 2006
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’:
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).
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:
Use vnl_math::pi (see above).
Think about the ‘magic number’ 10.0 (see above).
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.
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.
Add a baseline output image (see above).
Bryn Lloyd
Monday 28 August 2006
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:
