[Insight-developers] Contribution of a 3D thinning filter
kent williams
norman-k-williams at uiowa.edu
Thu Sep 27 15:54:34 EDT 2007
It's just a small matter of programming ;-)
It would depend on how it was coded, whether you'd run into a lot of awful
complications. I've had to do similar things; for example the NiftiImageIO
class has to permute dimensions to support vector-typed pixels, in up to 7
dimensions.
Truly supporting ND requires a fair amount of care, and extra time. I was
just saying that optimally we'd have one class for all dimensionalities. If
this is too difficult, or makes the code even uglier, there's no shame in
having itkFilterThatDoesSomething2D and itkFilterThatDoesSomething3D.
On 9/27/07 1:38 PM, "Gaëtan Lehmann" <gaetan.lehmann at jouy.inra.fr> wrote:
>
> Le 27 sept. 07 à 20:28, kent williams a écrit :
>
>> In the comments on the existing class it says 'TODO: Make this ND.'
>>
>> The most ideal way for you to proceed is to look again at your code
>> and see
>> if it's possible to make it work in the 2D (and perhaps higher
>> dimensions)
>> case. Will it work if you give it a 3D image with a third
>> dimension of one?
>> If so,the only complication is finding the places where it assumes
>> 3D --
>> setting up indexes, dimensions, direction cosines.
>>
>> Then, make sure it implements the same public interface as the
>> existing
>> code, and submit it to the Insight Journal. After evaluation,
>> then, it can
>> simply replace the old file.
>>
>> It looks like the itkBinaryThinningImageFilter currently does no
>> Concept
>> Check for the dimension, so I don't know what it would do if you
>> used 3D
>> image types...
>
> It should give some bad things: it contains some code like
>
> OffsetType o2 = {{0,-1}};
> OffsetType o3 = {{1,-1}};
> OffsetType o4 = {{1,0}};
>
> where OffsetType would be an itk::Offset<3> with a 3D image.
>
> I'm not sure it's easy to compute the set of offsets for N dimension,
> so it may be difficult to make it work in ND.
>
> Gaëtan
>
>
>>
>> On 9/27/07 2:18 PM, "Hanno Homann" <hanno.homann at freenet.de> wrote:
>>
>>> Hello,
>>>
>>> Recently I had to implement a 3D thinning (skeletonisation) filter,
>>> as ITK currently only contains the 2D "itkBinaryThinningImageFilter".
>>> The code worked reliably and decently fast on my data and I now would
>>> like to contribute it to ITK.
>>>
>>> I do see two alternatives: 1) to change the current filter such that
>>> it can then do 2D and 3D, or 2) to simply add a new
>>> "itkBinaryThinningImageFilter_3D". In my view the latter makes sense
>>> because the realisation in 3D is rather different from 2D and the
>>> code
>>> of a combined filter would contain two mostly independent parts. But
>>> what would you you recommend?
>>>
>>> Also would someone like to assist me with the submission process,
>>> since
>>> I haven't done this before..?
>>>
>>> Thanks,
>>> Hanno
>>>
>>>
>>>
>>> _______________________________________________
>>> Insight-developers mailing list
>>> Insight-developers at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers at itk.org
>> http://www.itk.org/mailman/listinfo/insight-developers
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr
>
>
>
More information about the Insight-developers
mailing list