Abstract
This documents describes a set of classes to integrate digital topology in the Insight Toolkit, with an application to homotopic thinning. The skeletonization filter implemented using our set of classes is twice as fast as BinaryThinningImageFilter and can be used on images of any dimension.
Keywords
Source Code and Data
Reviews
Martin Styner
Thursday 21 September 2006
Summary:
The paper presents the implementation of efficient connectivity framework based on ITK. By including all the recommendations suggested in Gaetan Lehmannâs earlier review, this makes a formidable example for an inclusion into ITK.
Open Science: The full source code, a testing program as well as the test data is provided.
Reproducibility: I have not compiled or reproduced the results.
Use of Open Source Software: The work is based on ITK and represents an extension of it.
Open Source Contributions: The author provide a flexible and efficient basic framework for connectivity operators as open source.
Code Quality: The code looks good, well structured and documented.
Applicability to other problems: The framework seems easily adapted and applicable to other connectivity problems.
Gaetan Lehmann
Monday 6 November 2006
Summary: This article present a set of new ITK classes designed to integrate digital topology in the toolkit, and a thinning filter implemented with those classes.
Open Science: Source code is provided, as well as test data
Reproducibility: I reproduced the author work, but with some problem (as reported by the automatic testing system). The author should use a contribution template to avoid those problems
Use of Open Source Software: The new classes are fully integrated to the toolkit
Open Source Contributions: Eveything is there and already easy to use
Code Quality: Code quality is very good and easy to read. However, it does not always follow the ITK coding style (naming and indentation)
Applicability to other problems: This contribution provides classes applicable to many problems: directly with the thinning algorithm, and in all transforms which are manipulating the connectivity notion (that's the case of several of my already publish contributions, and some of my contributions in preparation), and obviously the topology notions
Suggestions for future work:
- release the pre condition of the thining. An object should touch the border. I would set a border value to fix that, with a SetBorderInside(bool) for example, or always considere the outside of the image is inside or outside the object.
- let the user specify the connectivity at run time. I can't see in your code any efficiency reason to keep that as template parameter.
- There are already some filters in ITK which are manipulating connectivity - the reconstruction filters for example, or the connected component one. The connectivity option is limited to the smallest one (6 in 3D) and the largest on (26 in 3D) without the possibility to use an intermediate value. It would by nice to extend their capabilities with your connectivity framework, and so provide FullConnectivity(bool) adapter in the connectivity class.
- let the user choose the ordering image type
- it should be possible to get a Neighborhood from the Connectivity object. That way, an iterator can be used to access the neighbors, instead of offsets
- ordering input should be managed by the itk pipeline, not as an ivar, so the filter can be fully used in a pipeline
- the filter must require the entire input region to produce correct output. Without that, if a small region is requested, the output will not be the same than the same region of the image if the filter have produce all the image
- the filter should provide a progress reporter
- the hierarchical queue does not follow the itk coding style. I have also worked on such a class some weeks ago - it must be a real need in ITK
- the filter should let the user define the value of the pixels which are int the object, instead of considering that 0 pixels are outside
- the header should include the txx file only if ITK_MANUAL_INSTANTIATION is not defined
- copy constructor and operator= should be declared but not implemented, in order to be wrappable
- use a clean code structure to build properly on automatic testing system, and on reviewers systems
- improve queue performance by using a list instead of of a deque (36 s instead of 382 s with you rabbit image on my computer) (nice rabbit by the way)
- provide tests with cmake, so the reproducibility can be easily validated. Tests are also very useful as non rregession tests, hwen implementing new features (the changes above are validated that way)
Dan Mueller
Monday 23 July 2007
Summary:
This paper presents an ITK filter for skeletonization using homotopic thinning.
Hypothesis:
The author claims the presented filter is faster than the existing ITK method, and works for both 2-D and 3-D images.
Evidence:
A table of results in given on page 3 of the paper supporting the claim.
Open Science:
The source code, input data, and baseline result is supplied with the article.
Reproducibility:
I downloaded, compiled, and ran the work (there were some compilation issues, see below). I have also used the filter in other applications on a variety of 2-D and 3-D images.
Use of Open Source Software:
Extends ITK.
Open Source Contributions:
The full source code is provided, as well as a test executable. I would suggest using the CMake ADD_TEST functionality and ImageCompare for validating the output matches the baseline image.
Code Quality:
Most of the code is good. However I did encounter some issues compiling the code using Microsoft Visual Studio 8.0.50727.762:
- itkChamferDistanceTransformImageFilter.txx(180) : Error C2780: 'const _Ty &std::min(const _Ty &,const _Ty &,_Pr)' : expects 3 arguments - 2 provided
- itkUnitCubeCCCounter.txx(34) : Warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
I fixed the errors by specifying the template argument for std::min: minimum = std::min(minimum, it.GetPixel(i) + mask[i]);
There are a number of style considerations I would also suggest:
- Is there a good reason for the itkSkeletonizeImageFilter to be an InPlaceImageFilter? I have found that this causes issues when writing the output of the skeletonize filter to disk: the output must be disconnected before being plugged into a writer object. I think making the filter an ImageToImageFilter would fix this.
- I agree with Gaëtan's comment regarding the ForegroundConnectivity template: it should be removed (to help with wrapping).
- I agree with Gaëtan's comment regarding automated border padding: at the moment if the input image (accidentally) touches the edges a segfault is caused (perhaps this is the problem that Ruben described in this review?).
- I like Ivan's idea to add a template for the itkSkeletonizeImageFilter ordering image: except I would make the default the input image type for sake of ease.
- The txx file include in itkSkeletonizeImageFilter.h should be wrapped with the normal ITK_MANUAL_INSTANTIATION.
- The commenting in the header files does not seem to conform to the standard ITK style.
- The mechanism for setting the weights in itkChamferDistanceTransformImageFilter is not the typical ITK style (in fact it took me quite some time to work out how to set the values). To bring it more in line with the ITK standard, I suggest using a FixedArray typedef similar to that used by the BilateralImageFilter to specify the DomainSigma parameters, or the itkCannyEdgeDetectionImageFilter Variance parameter, etc.
Applicability to other problems:
The work is useful for a range of applications, including vessel centerline detection.
Overall:
A useful filter, with some further work it will make a great addition to ITK.
Ivan Macia
Wednesday 21 February 2007
Summary:
This paper describes an implementation in ITK of some concepts taken from digital topology. It implements a connectivity framework allowing to calculate the topological numbers of a point in a neighborhood and to discriminate simple points. The authors implement a useful algorithm for skeletonization using binary thinning based on these concepts. In my opinion it is a very useful contribution for the toolkit and one I was particularly interested in.
Open Science:
Source code as well as an example with data is provided that allows reproducibility.
Reproducibility:
I was able to compile and reproduce the mentioned results. Latest fixes solve most of the initial compilation problems.
Use of Open Source Software:
The implementation is based on ITK and is itself an extension of the libraries for some features that are not already implemented.
Open Source Contributions:
The provided source code is readily usable as it is, maybe requiring some minor changes/fixes. Main contributions are a framework for connectivity and an implementation of a skeletonization image filter based on binary thinning. More work could be derived by extending/using these concepts.
Code Quality:
The implementation is good and well structured, separating the different concepts involved into components.
I miss some more documentation/comments in some parts on the code that makes it easier to read.
Sometimes it does not follow the ITK coding style.
Additionally I made some fixes/improvements in the code :
- The ordering image type should be a template parameter. I have already been in the need of using an image type different from itk::Image
- There where some variables/members/methods that were using char/int where they should use unsigned char/unsigned int, for example the neighborhood image buffer and neighborhood sizes.
- I had linking problems with the global method factorial() when integrating it into an application. Changed this to a static method. Also reimplemented Factorial() to avoid recursive function calls.
My proposed changes are included as an attachment
Applicability to other problems:
More imaging algorithms based on concepts of digital topology could be implemented using this work. The skeletonization algorithm is very useful for vessel centerline extraction.
Suggestions for future work:
I miss some more introductory information in the paper. For example, the definition of simple points which is not obvious for non-experts.
Ruben Schilling
Sunday 24 June 2007
Summary:
Hypothesis:
The authors assume the image to be binary and not connected to the image's border. Their goal is a 1D line of good medial position reflecting the topology of the image.
Evidence:
Open Science:
The authors provide enough data, code and information to conduct the experiment.
The authors provide their source code. Except for a missing file (IJMacros.txt) everything was in place. After obtaining the missing file from a different place on the internet compilation was fine.
The code runs fine on my Mac OS X box and was nicely readable and structured.
Applicability to other problems:
Suggestions for future work:
Requests for additional information from authors:
Additional Comments:
Bipul Das
Wednesday 27 September 2006
I tried to build it using MSVC 6.0, ITK 2.2 and Cmake 2.2. I have a few questions:
Initially in the CMake file it tries to include file IJMacros.txt - which could not be found. What should this file be...
I made some changes to run the cmake part. While trying to build the following errors were found and warnings were found:
Errors
C:\\itksoftware\\InsightToolkit-2.4.0\\Code\\Common\\itkPoint.h(43) : error C2503: \‘FixedArray
Warnings
C:\\itksoftware\\InsightToolkit-2.4.0\\Code\\Common\\itkOffset.h(183) : warning C4200: nonstandard extension used : zero-sized array in struct/union
C:\\itksoftware\\InsightToolkit-2.4.0\\Code\\Common\\itkIndex.h(83) : see reference to class template instantiation \‘itk::Offset<0>\’ being compiled
C:\\itksoftware\\InsightToolkit-2.4.0\\Code\\Common\\itkImageBase.h(102) : see reference to class template instantiation \‘itk::Index<0>\’ being compiled
C:\\itksoftware\\InsightToolkit-2.4.0\\Code\\Common\\itkImage.h(84) : see reference to class template instantiation \‘itk::ImageBase<0>\’ being compiled
C:\\Bipul\\DigitalTopology\\ITKSkeleton\\itkSkeletonizeImageFilter.h(109) : see reference to class template instantiation \‘itk::Image
