Proposals:Refactoring Statistics Framework 2007 Migration Users Guide: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 10: Line 10:
!  Class Name !! Fate  !! Deprecated API !! New API
!  Class Name !! Fate  !! Deprecated API !! New API
|-
|-
| Sample || Refactored  ||  
| Sample || Refactored   
||  
* Does not derives from Object anymore, now it derives from DataObject.
* typedef for InstanceIdentifier was replaced from unsigned long to std::vector<MeasurementVectorType>::size_type
* Size() method now returns InstanceIdentifier type, before it returned unsigned int, which was inconsistent with the declaration of InstanceIdentifier as unsigned long. The return type of Size() must be the same use for Id of the elements, since it may reach the same maximum number.
||
||
* const-correctness is now enforced.  
* const-correctness is now enforced.  

Revision as of 18:17, 23 April 2007

How To Migrate your code to the New Statistics Framework

Measurement Containers



Class Name Fate Deprecated API New API
Sample Refactored
  • Does not derives from Object anymore, now it derives from DataObject.
  • typedef for InstanceIdentifier was replaced from unsigned long to std::vector<MeasurementVectorType>::size_type
  • Size() method now returns InstanceIdentifier type, before it returned unsigned int, which was inconsistent with the declaration of InstanceIdentifier as unsigned long. The return type of Size() must be the same use for Id of the elements, since it may reach the same maximum number.
  • const-correctness is now enforced.
  • It now derives from DataObject
Subsample Refactored
  • The concept of Indices and InstanceIdentifiers was fixed. InstanceIdentifiers were previously referring to the original Sample, they are now referring to the current Subsample set of measurement vectors.
  • The basic principle followed now in the design of the Subsample class is that the subsample should behave as a sample. That is, a user should be able to use a Subsample class in any algorithm that is expecting a Sample.
ListSampleBase Deprecated. The class was unecessary, it was providing only a Search() method that should in fact be provided by a process class, not a data container.
  • If you were deriving a class from the itk::Statistics::ListSampleBase, you should now derive directly from the itk::Statistics::Sample class.
  • If you were using the Search() method you can get that functionality now from the itkStatisticsAlgorithm Search() algorithm.
ListSample Refactored The iterators API was updated, const-correctness is now enforced
MembershipSample Refactored
  • It does not derive from itk::Sample anymore, instead it derives from DataObject.
Histogram Refactored
VariableDimensionHistogram
KdTree Refactored

Frequency Containers

Class Name Fate Deprecated API New API
DenseFrequencyContainer
SparseFrequencyContainer

Process Objects

Class Name Fate Deprecated API New API
SampleClassifier
SampleClassifierWithMask

Traits

Class Name Fate Deprecated API New API
MeasurementVectorTraits Refactored (same name)
  • Added Assert() instantiations for comparing length of
    • FixedArray raw pointer, std::vector raw pointer
    • FixedArray reference, std::vector reference
  • Added Assign() method for generalizing the assignment of scalars and vector types
    • Assign() vectorType to vectorType
    • Assign() scalarType to FixedArray< scalarType, 1 >
  • Added trait MeasurementVectorType
    • to be used as MeasurementVectorPixelTraits< PixelType >::MeasurementVectorType
    • This trait generalizes the mechanism for creating a measurement vector using as component type the pixel type of an image
  • Added explicit testing up to 100% code coverage

MeanShift

Class Name Fate Deprecated API New API

Adaptors

Class Name Fate Deprecated API New API

Univariate Distributions

Class Name Fate Deprecated API New API

Algorithms

Class Name Fate Deprecated API New API

Calculators

Class Name Fate Deprecated API New API
CovarianceCalculator Refactored into CovarianceFilter SetMean() because it was inconsistent GetOutput(), SetInput(), GetMean()
GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator Refactored into HistogramToTextureFeaturesFilter now derives from ProcessObject, SetInput(), GetOutput()
MeanCalculator Refactored into MeanFilter SetSample() method replaced with SetInput() now derives from ProcessObject
ScalarImageTextureCalculator Refactored into (???Filter)
WeightedCovarianceCalculator Refactored into WeightedCovarianceFilter
  • SetSample() method replaced with SetInput()
  • SetWeightFunction() now you could use the WeightFilter???
  • now derives from ProcessObject
  • SetWeightsInputs() (the data decorated version of SetWeights() ....
WeightedMeanCalculator Refactored into WeightedMeanFilter
  • SetSample() method replaced with SetInput()
  • SetWeightFunction() now you could use the WeightFilter???
  • now derives from ProcessObject
  • SetWeightsInputs() (the data decorated version of SetWeights() ....


Generators

Class Name Fate Deprecated API New API


Filters

Class Name Fate Deprecated API New API

Multivariate Density Functions

Class Name Fate Deprecated API New API

Distance Metrics

Class Name Fate Deprecated API New API

Components

Class Name Fate Deprecated API New API

Estimators

Class Name Fate Deprecated API New API