Skip to content

Triggering the Arbitrary Slice action crashes with 2D images

About you

CamiTK developer

Overview

When triggering the "Arbitrary Slice" on an image component that contains a 2D image, the application crashes.

Steps to Reproduce

Save this image and open it with camitk-imp

Select the component, and select the ViewArbitrary Slice

camitk-imp crashes

Actual VS Expected Result

No crash !

The arbitrary slice action should abort cleanly and a warning message should be displayed to explain why the action aborted.

Interpretation & Possible fixes

The arbitrary slice's SingleImageComponent is only created if the image component has 3 dimensions (see ImageComponent.cpp:562 and line 571. When the arbitrary slice action is triggered it does not take into account the fact that an ImageComponent can have no arbitrary slice subcomponent.

Check the pointer value before accessing it (see AnglesAndTranslationAction::getWidget(), line 106).

CamiTK Version

CamiTK 5.2.0.develop. 54c95fce


please do not remove anything below this line