Page MenuHomePhabricator

Total Variation Filter from BasicImageProcessing View causes crash
Closed, ResolvedPublic

Description

  • Start MITK (with basic Image processing enabled)
  • Load Pic3D (or other)
  • Perform Total Variation filter on image using the basicImageProcessing View.

Crash

Event Timeline

Error occurred during conversion from short to float image.

FloatImageType::Pointer fImage = FloatImageType::New();
CastToItkImage( newImage, fImage ); //ERROR!

Problem is solved by using the itkCastImageFilter instead:

typedef itk::CastImageFilter< ImageType, FloatImageType > ImageCasterType;
ImageCasterType::Pointer floatCaster = ImageCasterType::New();
floatCaster->SetInput( itkImage );
floatCaster->Update();
FloatImageType::Pointer fImage = caster->GetOutput();

After merging bug-13478-TotalVariationFilterCrash in master, I will close this bug.

[5fd14e]: Merge branch 'bug-13478-TotalVariationFilterCrash'

Merged commits:

2013-08-14 16:21:03 Diana Wald [eae6e3]
Convert short to float image by use of the itkCastImageFilter

[39b12c]: Merge branch 'bug-13478-TotalVariationFilterCrash'

Merged commits:

2013-08-19 18:23:41 Diana Wald [ac0e2a]
Correct error in filtername