Extract contours from 3D image

Dears,

I am trying to extract the contour from an object after the procedure of the segmentation.
The complie is error free but the output is an empty(black) image.
Maybe the output image type is wrong ? Any ideas ?

Here is my function:

ImageType::Pointer Segmenter::Contours(ImageType::Pointer image)
{          
  using SimpleContourExtractorImageFilterType = itk::SimpleContourExtractorImageFilter <ImageType, ImageType>;
  SimpleContourExtractorImageFilterType::Pointer contourFilter
          = SimpleContourExtractorImageFilterType::New();
  contourFilter->SetInput(image);
  contourFilter->Update();  
  return contourFilter -> GetOutput();            
}

Thanks in advance

You might need to set InputBackgroundValue to 255, 1 or maybe something else. Other, possibly relevant settings of the filter are OutputBackgroundValue and Radius.

Thanks a lot Dženan, cheking it…