Throw Exception

Synopsis

Throw an exception.

Results

Note

No output is printed, this example simply displays functionality.

Code

C++

#include "itkImage.h"
#include <itkCastImageFilter.h>

// TODO: Incomplete example
int
main(int, char *[])
{
  // Setup types
  using ImageType = itk::Image<unsigned char, 2>;
  ImageType::Pointer image = ImageType::New();

  // Create and the filter
  using FilterType = itk::CastImageFilter<ImageType, ImageType>;
  FilterType::Pointer filter = FilterType::New();
  filter->SetInput(image);
  filter->Update();

  return EXIT_SUCCESS;
}

Classes demonstrated