[Insight-developers] SimpleITK ARB Examples
Dan Mueller
dan.muel at gmail.com
Mon Sep 13 11:43:56 EDT 2010
Hi Alex,
Sorry for the silence, just back after some time out of office. Before
I left I quickly added this example to the wiki page (so I did not
forget), but did not carefully explain my point.
My point is that ITK can seem complex and overwhelming to newbies. One
potential way to combat this to use the strategy pattern, see:
http://en.wikipedia.org/wiki/Strategy_pattern
Now rather than needing to find the following classes:
Code/Algorithms/itkKappaStatisticImageToImageMetric.h
Code/Algorithms/itkMattesMutualInformationImageToImageMetric.h
Code/Algorithms/itkMeanSquaresImageToImageMetric.h
Code/Review/itkOptMeanSquaresImageToImageMetric.h
Code/Review/itkOptMattesMutualInformationImageToImageMetric.h
etc...
the newbie need only find a single class:
Code/Simple/itkSimpleImageToImageMetric.h
and use the desired strategy, for example:
metric.SetType( KappaStatistic)
or
metric.SetType( MattesMutualInformation )
The strategy pattern could be applied to numerous algorithms within
ITK, for example:
InterpolateImageFunction: Linear, BSpline, CosineWindowedSinc,
HammingWindowedSinc, LanczosWindowedSinc, WelchWindowedSinc
ImageToImageMetric: KappaStatistic, MatchCardinality,
MattesMutualInformation, MeanReciprocalSquareDifference, MeanSquares,
NormalizedCorrelation, NormalizedMutualInformationHistogram
UnaryPixelMath: Abs, Exp, Log, Not, Negate, Sqrt, Square, Power
BinaryPixelMath: Add, Subtract, Multiple, Divide, And, Or, Xor,
Maximum, Minimum, Mask, SquaredDifferance, CheckerBoard
UnaryPixelMath: Abs, Exp, Log, Not, Negate, Sqrt, Square, Power
DistanceMap: Danielsson, SignedDanielsson, Chamfer,
ApproximateSigned, SignedMaurer
Morphology: BinaryDilate, BinaryErode, BinaryOpen, BinaryClose,
BinaryShapeOpen, GreyscaleOpen, GreyscaleClose, GreyscaleDilate,
GreyscaleErode, AreaOpen, AnchorOpen, AnchorClose,
VanHerkGilWermanOpen, VanHerkGilWermanClose, ...
Now, rather than the user needing to know about 50+ classes, they only
need to know about 7. IMHO such "simple" wrappers may help hide some
of the perceived complexity of ITK. SimpleITK would then wrap this new
layer of abstraction, rather than the raw power that WrapITK deals
with.
Hope this clears up my intention.
Regards, Dan
On 7 September 2010 16:20, Alexandre GOUAILLARD <agouaillard at gmail.com> wrote:
> hi guys,
>
> I also think that pointed out examples help grasp the concept more
> precisly and is a very good idea.
>
> Now, it looks to me that 3 possible implementations are illustrated,
> and I fail to see the difference between the latest one (with the
> finest granularity) and the current implementation using wrapITK. If
> you don't provide a simple (fonctionnal, matlab-like) layer, and
> provide a class granularity, with manual instanciation for a given set
> a types, then, a solution exists, right?
>
> What am I missing?
>
> alex.
>
>
> On Tue, Sep 7, 2010 at 9:22 PM, Gabe Hart <gabe.hart at kitware.com> wrote:
>> This looks great. I think it makes a lot of sense at this phase to focus on
>> end user examples rather than putting too much time into complex sample
>> implementations since there are numerous different design possibilities that
>> could take a lot of time to code up and ultimately end up being discarded.
>>
>> One further thought I have for the collection of examples on the wiki is to
>> include a few notes about each one that highlight the pros and cons of the
>> given approach. For example, maintaining the pipeline structure will allow
>> for a much easier implementation of streaming which may not be immediately
>> obvious to a potential user scanning the example.
>>
>> Also, it looks like there has been a stand alone page made for the examples
>> at:
>> http://www.itk.org/Wiki/ITK_Release_4/SimpleITK/Advisory_Review_Board/Prototype_Code_Discussions
>>
>> -Gabe
>>
>> On 09/03/2010 04:07 AM, Dan Mueller wrote:
>>>
>>> Hi all,
>>>
>>> I have some other ideas regarding registration. Unfortunately it is
>>> difficult for me to attend t-cons to share these ideas. I have not yet
>>> finished the example implementation, so I have added the expected
>>> end-user example to the wiki page.
>>>
>>> http://www.itk.org/Wiki/ITK_Release_4/SimpleITK/Advisory_Review_Board#Enum_approach
>>>
>>> Regards, Dan (Mueller)
>>>
>>> On 2 September 2010 22:55, Gabe Hart<gabe.hart at kitware.com> wrote:
>>>
>>>>
>>>> Hi all,
>>>>
>>>> First off, sorry to have missed the tcon on Tuesday. It sounds like some
>>>> important decisions were made, particularly the formation of an advisory
>>>> review board for SimpleITK. I talked to Luis today who suggested that in
>>>> order to move forward with the ARB, we needed some concrete examples to
>>>> show
>>>> the reviewers for the different possible designs of SimpleITK. In that
>>>> vein, I set up a section of the Wiki to collect these examples.
>>>>
>>>> http://www.itk.org/Wiki/ITK_Release_4/SimpleITK/Advisory_Review_Board
>>>>
>>>> I've added a few examples for the gaussian filter and registration use
>>>> cases. I think the registration case needs some more examples that
>>>> demonstrate the possible range of flexibility for SimpleITK's
>>>> registration
>>>> framework (adjust the transform type, adjust the optimizer, etc...).
>>>>
>>>> Feel free to add new examples or edit the existing ones. Hopefully we
>>>> can
>>>> get this to cover the full range of possible user interface paradigms.
>>>>
>>>> -Gabe
>>>>
>>>>
>>
>> _______________________________________________
>> 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://kitware.com/products/protraining.html
>>
>> 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://www.itk.org/mailman/listinfo/insight-developers
>>
>
More information about the Insight-developers
mailing list