[Insight-developers] Incorporating the new statistics framework in ITK
Bill Lorensen
bill.lorensen at gmail.com
Mon May 11 13:18:52 EDT 2009
I don't think there will be many changes. I'll do experiments in the
sandbox as you suggest. We have time I think beacuse I expect the new
statistics will stay in Review for a while.
Thanks,
Bill
On Mon, May 11, 2009 at 1:04 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
> Hi Bill,
>
>
> Have you experimented with the suggested MeasurementHistogram name ?
>
>
> My fear would be that this is not going to be the only change
> necessary for having a backward compatibility structure, and that
> there will be a domino effect that will pull up other 15 or 20
> classes that would need to be modifed as well.
>
>
> Would you like to experiement with the
> name change in the NAMIC Sandbox ?
>
>
> Since the code has already been moved to ITK, the Sandbox is open
> for experimentation.
>
>
> Just a reminder:
>
>
> We will be Freezing the CVS repository on Friday.
>
>
>
> Luis
>
>
>
> --------------------
> Bill Lorensen wrote:
>>
>> My thought is, if I can implement the old Histrogram API using the new
>> Histogram class, we can maintain BC with almost no maintenance
>> overhead. The new BC classes would warn at runtime with info on how to
>> convert over to the new classes.
>>
>> For example, if you look in the Sandbox, you'll see a directory called
>> SourceBC. I implemented several old classes using the new class code.
>> These classes don't yet have the warnings in them yet and I have not
>> modified the comments yet. And they all don't pass the old tests,
>> although the old tests do compile.
>>
>> itkCovarianceCalculator.h
>> itkDenseFrequencyContainer.h
>> itkEuclideanDistance.h
>> itkImageToListAdaptor.h
>> itkListSampleToHistogramFilter.h
>> itkMeanCalculator.h
>> itkPointSetToListAdaptor.h
>> itkScalarImageTextureCalculator.h
>> itkSparseFrequencyContainer.h
>> itkVariableDimensionHistogram.h
>> itkWeightedCovarianceCalculator.h
>> itkWeightedMeanCalculator.h
>>
>> I can't do this with Histogram, because the same name is used and the
>> template parameters changed.
>>
>> Bill
>>
>> On Mon, May 11, 2009 at 11:21 AM, Karthik Krishnan
>> <karthik.krishnan at kitware.com> wrote:
>>
>>> Dear Bill:
>>>
>>> I think this is a great idea. I want to be sure that there is consensus
>>> on
>>> retaining the old histogram class. Here is some history of the two
>>> histogram
>>> classes.
>>>
>>> In 2005, I changed most of the Statistics classes, for Namic's needs, to
>>> have a run time specification (instead of compile time) of the size of
>>> each
>>> measurement (MeasurementVectorSize). While this was done for most
>>> classes,
>>> this wasn't done for the Histogram and a couple of its heavy dependents,
>>> such as the ImageToHistogramGenerator and one or two others such as
>>> ImageToListSampleAdaptor classes since the impact on the toolkit would
>>> have
>>> been pervasive and it would involve non BackwardCompatible changes.
>>>
>>> Instead, I wrote an alternative class called the
>>> VariableDimensionHistogram
>>> to handle histogram with a run time specification of the number of axes.
>>>
>>> Now, with the refactoring, we are breaking compatibility anyway. We are
>>> also
>>> consistent, in the sense that all classes including the Histogram and
>>> related classes use a run time specification of the size of a each
>>> measurement. I like that.
>>>
>>> I think its a great idea, but its also a duplication retained for the
>>> sole
>>> purpose of backward compatibility. I also fear that we could continue
>>> this
>>> argument for other classes such as rewrite the calculators by using the
>>> filters internally.
>>>
>>> Please let me know how I should proceed. I'd be happy to make any changes
>>> needed.
>>>
>>> Thanks
>>> --
>>> karthik
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: Bill Lorensen <bill.lorensen at gmail.com>
>>> Date: Sun, May 10, 2009 at 1:27 PM
>>> Subject: Re: [Insight-developers] Incorporating the new statistics
>>> framework
>>> in ITK
>>> To: Karthik Krishnan <karthik.krishnan at kitware.com>
>>> Cc: ITK <insight-developers at itk.org>
>>>
>>>
>>> Here is a note I sent a while ago:
>>>
>>> If Histogram were called MeasurmentHistogram, I might be able to make
>>> a backward compatible itkHistogram that uses the new
>>> MeasurmentHistogram. Currently, the new Histogram has
>>> changed the template arguments from the old. Actually it matches
>>> exactly itkVariableDimensionHistogram, but that is not such a great
>>> name for the new Statistics.
>>>
>>>
>>> On Sun, May 10, 2009 at 12:26 PM, Karthik Krishnan
>>> <karthik.krishnan at kitware.com> wrote:
>>>
>>>> Hello:
>>>>
>>>> The refactored framework has been checked into Code/Review/Statistics/ .
>>>>
>>>> The default is to build using the old framework. The new framework is
>>>> used
>>>> instead when ITK_USE_REVIEW and ITK_USE_REVIEW_STATISTICS are turned ON.
>>>>
>>>> Filters using the statistics classes (in Algorithms, BasicFilters etc)
>>>> and
>>>> their associated examples and tests have been fixed to work with both
>>>> the
>>>> old and the new. You will find ifdefs in the code for this purpose.
>>>>
>>>> Examples/Statistics are disabled when using the refactored framework.
>>>> This
>>>> is due to the fact that we will be including the refactored statistics
>>>> library when we update the SoftwareGuide the next time and hence we'd be
>>>> writing a parallel Examples directory. We are not going to have the
>>>> guide
>>>> telling users how to use to older framework.
>>>>
>>>> There are two parallel testing trees.
>>>> Testing/Code/Numerics/Statistics - Old framework
>>>> Testing/Code/Review/Statistics - New framework
>>>>
>>>> InsightApplications/ has been fixed to work with the old and the new
>>>> frameworks. We had to disable an application :
>>>> GaussianMinimumErrorClassifier since we had not implemented a few
>>>> filters
>>>> in
>>>> the new framework.
>>>>
>>>> isengard, zion and redwall submit nightly builds using the new
>>>> framework.
>>>>
>>>> As a reminder, please refrain from making changes to
>>>> NAMICSandbox/ITKStatisticsPipelineRefactoring, since we are going to
>>>> ignore
>>>> this repository. It has found a new life inside ITK now.
>>>>
>>>> Thanks
>>>> --
>>>> karthik
>>>>
>>>> On Tue, Apr 28, 2009 at 6:03 PM, Karthik Krishnan
>>>> <karthik.krishnan at kitware.com> wrote:
>>>>
>>>>> Hello:
>>>>>
>>>>> I'd like to bring the refactored statistics framework into ITK. To do
>>>>> that
>>>>> I'd like to propose the following changes. I'd like to push them into
>>>>> ITK
>>>>> towards the end of the week Friday-Sunday, when dashboard hiccups would
>>>>> have
>>>>> the least impact.
>>>>>
>>>>> - Bring the new framework into Code/Review/StatisticsV2
>>>>>
>>>>> - Add a CMake var ITK_USE_NEW_STATISTICS_FRAMEWORK, (OFF by default)
>>>>>
>>>>> - Update itkConfigure.h.in, itkIncludeDirectories.cmake to pick the
>>>>> right
>>>>> things.
>>>>>
>>>>> - Progressively update code/tests from Algorithms/BasicFilters to
>>>>> compile
>>>>> with the old and new framework.
>>>>>
>>>>> - Setup a couple of dashboards that to compile with the new framework
>>>>> to
>>>>> monitor progress.
>>>>>
>>>>> - Cleanup tests / errors
>>>>>
>>>>>
>>>>> More on the wiki at :
>>>>> http://itk.org/Wiki/Proposals:Refactoring_Statistics_Framework_2007
>>>>>
>>>>>
>>>>> Any thoughts ?
>>>>>
>>>>> Thanks
>>>>>
>>>>> --
>>>>> karthik
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.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
>>>>
>>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.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