I am trying to run ConnectedThresholdImageFilter example in ITK mentioned "https://itk.org/Doxygen45/html/Segmentation_2ConnectedThresholdImageFilter_8cxx-example.html" here.

But it is showing the following error.

itk::ImageFileWriterException (0x24cb740)

Location: "void itk::ImageFileWriter::Write() [with TInputImage = itk::Image]" File: /usr/local/include/ITK-4.13/itkImageFileWriter.hxx Line: 151 Description: Could not create IO object for writing file output
Tried to create one of the following: BMPImageIO BioRadImageIO Bruker2dseqImageIO GDCMImageIO GE4ImageIO GE5ImageIO GiplImageIO HDF5ImageIO JPEGImageIO LSMImageIO MINCImageIO MRCImageIO MetaImageIO NiftiImageIO NrrdImageIO PNGImageIO StimulateImageIO TIFFImageIO VTKImageIO You probably failed to set a file suffix, or set the suffix to an unsupported type

I didn't do any changes in code. And I am trying to use dicom image as an input.

1 Answers

0
Dženan On

It is either

  1. You set the output file name with an unsupported extension.
  2. There is something wrong about how you compiled/linked ITK or how you are linking your example to ITK.