<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Change SYSTEM "http://itk.org/migrationv4/ITKMigration.dtd">
<!--**
**
** ColorTableDeprecatedMethods.xml
**
**-->
<Change>
  <!--**
      ** Title for the online migration page
      **-->
  <Title>
    Poorly named methods have been removed.
  </Title>

  <!--**
      ** Plain text description of the change
      **-->
  <Description>
   <![CDATA[
    The methods useDiscrete, useGray and useHeat didn't conform to
    ITK method naming standards, and were deprecated in ITK 3.X. They
    are removed in ITK4.
    The following are also removed:
      TPixel color(unsigned int, char);
      RGBPixel< TPixel > *color(unsigned int c);
      char *colorName(unsigned int);
      RGBPixel< TPixel > *GetColor(unsigned int);
      unsigned int size()
   ]]>
  </Description>

  <!--**
      ** Sample code snippets
      **-->
  <SampleCode>
    <Old>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer colors = ColorTableType::New();
      colors->useHeat();
      colors->useGray();
      colors->useDiscrete();
     ]]>
    </Old>
  </SampleCode>
  <SampleCode>
    <New>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer colors = ColorTableType::New();
      colors->UseHeatColors();
      colors->UseGrayColors();
      colors->UseDiscreteColors();
     ]]>
    </New>
  </SampleCode>
  <SampleCode>
    <Old>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->useGray();
      unsigned char green = ctable->color(0, 1);
     ]]>
    </Old>
  </SampleCode>
  <SampleCode>
    <New>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->UseGrayColors();
      unsigned char green = ctable->GetColorComponent(0, 1);
     ]]>
    </New>
  </SampleCode>
  <SampleCode>
    <Old>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->useHeat();
      unsigned char blue = ctable->color(3)->GetBlue();
     ]]>
    </Old>
  </SampleCode>
  <SampleCode>
    <New>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->UseHeatColors();
      unsigned char blue = ctable->GetColor(3).GetBlue();
     ]]>
    </New>
  </SampleCode>
  <SampleCode>
    <Old>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->useHeat();
      unsigned char blue = ctable->GetColor(3)->GetBlue();
     ]]>
    </Old>
  </SampleCode>
  <SampleCode>
    <New>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->UseHeatColors();
      unsigned char blue = ctable->GetColor(3).GetBlue();
     ]]>
    </New>
  </SampleCode>
  <SampleCode>
    <Old>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->useHeat();
      char *name = ctable->GetColorName(5);
     ]]>
    </Old>
  </SampleCode>
  <SampleCode>
    <New>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->UseHeatColors();
      std::string name = ctable->GetColorName(5);
     ]]>
    </New>
  </SampleCode>
  <SampleCode>
    <Old>
     <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->useHeat();
      char *name = ctable->colorName(5);
     ]]>
    </Old>
  </SampleCode>
  <SampleCode>
    <New>
      <![CDATA[
      #include "itkColorTable.h"
      typedef itk::ColorTable<unsigned char> ColorTableType;
      ColorTableType::Pointer ctable = ColorTableType::New();
      ctable->UseHeatColors();
      std::string name = ctable->GetColorName(5);
      ]]>
    </New>
  </SampleCode>

  <!--**
      ** The change-ids for all commits in the topic branch
      **-->
  <Gerrit-ChangeId>
    9323eeb1da1891fa6f86f935256598fe2444e7ec
  </Gerrit-ChangeId>

  <!--**
      ** List of all changed files from the topic branch
      **-->
  <FileList>
    Code/Common/itkColorTable.h
  </FileList>


<MigrationFix-Automatic>
  <Old>
    useDiscrete
  </Old>
  <New>
    UseDiscreteColors
  </New>
</MigrationFix-Automatic>

<MigrationFix-Automatic>
  <Old>
    useGray
  </Old>
  <New>
    UseGrayColors
  </New>
</MigrationFix-Automatic>

<MigrationFix-Automatic>
  <Old>
    useHeat
  </Old>
  <New>
    UseHeatColors
  </New>
</MigrationFix-Automatic>

<MigrationFix-Automatic>
  <Old>
    size
  </Old>
  <New>
    GetNumberOfColors
  </New>
</MigrationFix-Automatic>

<MigrationFix-Automatic>
  <Old>
    color(unsigned int, char)
  </Old>
  <New>
    GetColorComponent(unsigned int, char)
  </New>
</MigrationFix-Automatic>

</Change>
