pyushkevich/itksnap

Export of speed image fails with exception

Opened this issue · 0 comments

When trying to save the speed image during active contour segmentation, the following errors pops up:
Error: exception occured during image IO. Exception: std::exception

The problem happens with recent Linux builds. At least versions 4.2.0-alpha.1 and 4.2.0-alpha.3 are affected.

The export works fine in previous stable version 4.0.2.

I traced the exception to template class CreateCastToTargetTypePipelinePartialSpecializationTraits with implementation which always throws exception (CreateCastToTargetTypePipelinePartialSpecializationTraits<itk::Image<short, 3u>, itk::Image<float, 3u>, SpeedImageInternalToNativeIntensityMapping, false, true>::CreatePipeline). It looks like the caller ImageWrapper<SpeedImageWrapperTraits>::CreateCastToFloatPipeline fails to select the correct template version of this class.

My guess is that IsLinear value is not computed correctly: it should be true for SpeedImage, not false.