ITK/Examples/Utilities/JetColormapFunctor: Difference between revisions

From KitwarePublic
< ITK‎ | Examples
Jump to navigationJump to search
(Did not compile)
(Deprecated content that is moved to sphinx)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
==JetColormapFunctor.cxx==
{{warning|1=The media wiki content on this page is no longer maintained. The examples presented on the https://itk.org/Wiki/*  pages likely require ITK version 4.13 or earlier releasesIn many cases, the examples on this page no longer conform to the best practices for modern ITK versions.}}
<source lang="cpp">
#include "itkJetColormapFunction.h"
#include "itkRGBPixel.h"
 
int main( int argc, char *argv[])
{
  typedef itk::RGBPixel<unsigned char> PixelType;
  typedef itk::Function::JetColormapFunction<float, PixelType> ColorMapType;
  ColorMapType::Pointer colormap = ColorMapType::New();
 
  colormap->SetMinimumInputValue(0.0);
  colormap->SetMaximumInputValue(1.0);
  std::cout << "0: " << colormap->operator()(0.0f) << std::endl;
   std::cout << "0.5: " << colormap->operator()(0.5f) << std::endl;
  std::cout << "1: " << colormap->operator()(1.0f) << std::endl;
  return EXIT_SUCCESS;
}
</source>
 
{{ITKCMakeLists|JetColormapFunctor|}}

Latest revision as of 20:55, 6 June 2019

Warning: The media wiki content on this page is no longer maintained. The examples presented on the https://itk.org/Wiki/* pages likely require ITK version 4.13 or earlier releases. In many cases, the examples on this page no longer conform to the best practices for modern ITK versions.