ITK Release 4/Users Migration Guide/Migration Guide XML Samples

From KitwarePublic
< ITK Release 4‎ | Users Migration Guide
Revision as of 18:17, 5 November 2010 by Gabe.hart (talk | contribs) (Created page with "=Sample Files= The wiki is not particularly friendly about uploading xml documents (security issue I think), so the following page shows two examples directly. == Example 1 - Mo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Sample Files

The wiki is not particularly friendly about uploading xml documents (security issue I think), so the following page shows two examples directly.

Example 1 - Move GetLength and SetLength from MeasurementVectorTraits to NumericTraits

Example 2 - Improve Attribute Names for Label Objects

<source lang="xml"> <?xml version="1.0" encoding="UTF-8"?>


<Change>

 <Title>
 Improve Attribute Names for Labels
 </Title>
 <Description>
 This change updates the attribute names for the LabelObject system.  The
 changes are:
 BinaryElongation        -> Elongation
 BinaryFlatness          -> Flatness
 BinaryPrincipalMoments  -> PrincipalMoments
 BinaryPrincipalAxes     -> PrincipalAxes
 Elongation              -> WeightedElongation
 EquivalentEllipsoidSize -> EquivalentEllipsoidDiameter
 EquivalentPerimeter     -> EquivalentSphericalPerimeter
 EquivalentRadius        -> EquivalentSphericalRadius
 Flatness                -> WeightedFlatness
 PhysicalSizeOnBorder    -> PerimeterOnBorder
 Region                  -> BoundingBox
 PrincipalAxes           -> WeightedPrincipalAxes
 PrincipalMoments        -> WeightedPrincipalMoments
 Sigma                   -> StandardDeviation
 Size                    -> NumberOfPixels
 SizeOnBorder            -> NumberOfPixelsOnBorder
 </Description>
 <SampleCode>
   <OldCode>
   typedef typename itk::ShapeOpeningLabelMapFilter< LabelMapType > OpeningType;
   typename OpeningType::Pointer opening = OpeningType::New();
   opening->SetAttribute( "SizeOnBorder" );
   </OldCode>
   <NewCode>
   typedef typename itk::ShapeOpeningLabelMapFilter< LabelMapType > OpeningType;
   typename OpeningType::Pointer opening = OpeningType::New();
   opening->SetAttribute( itk::LabelObject::NUMBER_OF_PIXELS_ON_BORDER );
   </NewCode>
 </SampleCode>
 <FileList>
 Code/Review/itkBinaryFillholeImageFilter.txx
 Code/Review/itkBinaryGrindPeakImageFilter.txx
 Code/Review/itkBinaryShapeKeepNObjectsImageFilter.txx
 Code/Review/itkBinaryShapeOpeningImageFilter.txx
 Code/Review/itkLabelMapUtilities.h
 Code/Review/itkLabelShapeKeepNObjectsImageFilter.txx
 Code/Review/itkLabelShapeOpeningImageFilter.txx
 Code/Review/itkShapeKeepNObjectsLabelMapFilter.txx
 Code/Review/itkShapeLabelMapFilter.txx
 Code/Review/itkShapeLabelObject.h
 Code/Review/itkShapeLabelObjectAccessors.h
 Code/Review/itkShapeOpeningLabelMapFilter.txx
 Code/Review/itkShapeRelabelImageFilter.txx
 Code/Review/itkShapeRelabelLabelMapFilter.txx
 Code/Review/itkShapeUniqueLabelMapFilter.txx
 Code/Review/itkStatisticsLabelMapFilter.txx
 Code/Review/itkStatisticsLabelObject.h
 Code/Review/itkStatisticsLabelObjectAccessors.h
 Testing/Code/Review/itkAttributePositionLabelMapFilterTest1.cxx
 Testing/Code/Review/itkAttributeUniqueLabelMapFilterTest1.cxx
 Testing/Code/Review/itkLabelMapToAttributeImageFilterTest1.cxx
 Testing/Code/Review/itkShapeLabelObjectAccessorsTest1.cxx  
 </FileList>
 <Gerrit-ChangeId>
 Ib5bdca1cd1809490f1c5a0f991c7cc2714d33c70
 </Gerrit-ChangeId>


 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::SIZE
   </Old>
   <New>
   LabelObjectType::NUMBER_OF_PIXELS
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::BINARY_ELONGATION
   </Old>
   <New>
   LabelObjectType::ELONGATION
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::BINARY_FLATNESS
   </Old>
   <New>
   LabelObjectType::FLATNESS
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::BINARY_PRINCIPAL_MOMENTS
   </Old>
   <New>
   LabelObjectType::PRINCIPAL_MOMENTS
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::BINARY_PRINCIPAL_AXES
   </Old>
   <New>
   LabelObjectType::PRINCIPAL_AXES
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::ELONGATION
   </Old>
   <New>
   LabelObjectType::WEIGHTED_ELONGATION
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::EQUIVALENT_ELLIPSOID_SIZE
   </Old>
   <New>
   LabelObjectType::EQUIVALENT_ELLIPSOID_DIAMETER
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::EQUIVALENT_PARIMETER
   </Old>
   <New>
   LabelObjectType::EQUIVALENT_SPHERICAL_PERIMETER
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::EQUIVALENT_RADIUS
   </Old>
   <New>
   LabelObjectType::EQUIVALENT_SPHERICAL_RADIUS
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::FLATNESS
   </Old>
   <New>
   LabelObjectType::WEIGHTED_FLATNESS
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::PHYSICAL_SIZE_ON_BORDER
   </Old>
   <New>
   LabelObjectType::PERIMETER_ON_BORDER
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::REGION
   </Old>
   <New>
   LabelObjectType::BOUNDING_BOX
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::PRINCIPAL_AXES
   </Old>
   <New>
   LabelObjectType::WEIGHTED_PRINCIPAL_AXES
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::PRINCIPAL_MOMENTS
   </Old>
   <New>
   LabelObjectType::WEIGHTED_PRINCIPAL_MOMENTS
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::SIGMA
   </Old>
   <New>
   LabelObjectType::STANDARD_DEVIATION
   </New>
 </MigrationFix-Automatic>
 <MigrationFix-Automatic type="AttributeRename">
   <Old>
   LabelObjectType::SIZE_ON_BORDER
   </Old>
   <New>
   LabelObjectType::NUMBER_OF_PIXELS_ON_BORDER
   </New>
 </MigrationFix-Automatic>

</Change> </source>