[Insight-users] Contribution for itk
lucantiga at softhome.net
lucantiga at softhome.net
Mon, 1 Mar 2004 18:47:57 +0100 (CET)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime at docserver.cac.washington.edu for more info.
--8323328-1019419272-1078162676=:7276
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.LNX.4.44.0403011839022.7276 at localhost.localdomain>
Hi Luis,
here's the code along with the tests. The license is fine with me, and
it's not a big deal of code, anyway :-)
As to the credits,
Luca Antiga,
Bioengineering Department, Mario Negri Institute (BG) Italy.
email: antiga at marionegri.it
homepage: http://villacamozzi.marionegri.it/~luca
Don't hesitate to contact me for any clarification.
Luca
On Sat, 28 Feb 2004, Luis Ibanez wrote:
>
> Hi Luca,
>
> Thanks for your willingness to contribute code to ITK.
>
> We will be happy to add these classes to the toolkit.
> Could you please send them as attachments to and email ?
>
> and if you already have a simple test for them, that will
> be greatly speed up the process.
>
> Take a look at the ITK license and make sure that you
> are comfortable with it since your code will be subject
> to this license once it is integrated in the toolkit.
>
> http://www.itk.org/HTML/Copyright.htm
>
>
> Please also include information regarding how do you want
> the credits to be specified in the class documentation.
> We typically add the name of the author and the institution.
> (you may or may not want you add your email and a web page).
>
>
>
> Thanks
>
>
> Luis
>
>
>
> -------------------------------
> lucantiga at softhome.net wrote:
>
> > Hi Luis,
> > if you like them and find them useful, I have these classes around I'd
> > like to contribute to itk
> >
> > 1. itk::Statistics::OtsuThresholdsCalculator: class in the Statistics
> > namespace which computes N thresholds by maximizing the between-class
> > variance of the classes. Input: itkHistogram. Output: vector of
> > thresholds.
> > In fact there's already an OtsuThresholdImageCalculator, but it's a bit
> > odd: it's derived from itk::Object, it takes in input an itk::Image
> > (therefore you can't work with subsamples) and it's limited to 1
> > threshold.
> >
> > 2. itk::Statistics::HistogramAlgorithmBase: base class for the above
> > class, which behaves like SampleAlgorithmBase.
> >
> > 3. itk::ThresholdLabelerImageFilter: derived from UnaryFunctorImageFilter.
> > It takes a vector of sorted thresholds in input (e.g., the output of
> > OtsuThresholdImageCalculator) and produces a labeled image in output. One
> > can specify the label offset.
> >
> > Let me know and I'll mail them to you
> >
> > Ciao
> >
> > Luca
> >
>
>
>
--8323328-1019419272-1078162676=:7276
Content-Type: APPLICATION/X-GZIP; NAME="OtsuAndThresholdLabeler.tar.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0403011837560.7276 at localhost.localdomain>
Content-Description:
Content-Disposition: ATTACHMENT; FILENAME="OtsuAndThresholdLabeler.tar.gz"
H4sIANFzQ0AAA+09/XPbNrL5WX8FmnZSKZZlSf5IR7Y147hJq7kkzthK+vp6
GQ9FQRZtitTjhz/O5/vb3y4+SAAEKSlJ3dydOJNYIoDFYrFY7C6wq5MkTo+C
8XAa0Xga+uM3zoj6NNp68hWfdnun/eLFLvxtt1/s7Wh/xfOk025323svOnvd
F0/anZ3ubvsJ2f2aSJQ9aZw4ESFP/NR1quotKv83fU5K5t9LrrAoex8fO76b
+k4SRq3pin20YXL3jHlX5v9FF3hDzv/uNsx/t9vZ2X1C2n/KiI3nv3z+t54f
fq2nViPkfRReRM6sRwgZBLF3MU3IGb2Y0SBxEi8MyDNySi+8OIn412EY+lde
Ag3fhuPUp9iO/HB6fDbx8MsPUPDGCS5S5wKLjjc24MXPTsLrQU3+Gat9pFEM
EHusPb32+JcfEKfjcH4XMVTqbiNHK5wkN05EoTiIwyjx0lmLHPk+YVVjAnxP
o2s6bgGEM0rJYPi3DFAruU1IGJFpksx7W1s3NzctWC+tMLrY+nX49s1WXnGa
zMgEao5p4nh+3EJ84BlOvZjEEgP4PEaaeKM0oWPy22D468mHITl69zv57ej0
9Ojd8Pd9cuMl0zBNCL2mAeFQkim0nc19DxoBoMgJkjsSTsjbV6fHv0Kro5eD
N4Ph74jp68Hw3auzM/L65JQckfdHp8PB8Yc3R6cC0vsPp+9Pzl61+FARrjMK
rylxM9IFYeK5NGaDmYWIdAAfZ2waYVRf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