Page MenuHomePhabricator

[Segmentation] Check tools (especially 3D tools) to correctly handle updating of LabelSetImage
Open, HighPublic


In its current implementation all 3D tools (maybe also some others) cannot handle label set images correctly because they use a very simple strategy for updating the (preview) segmentation image.

After reworking the LabelSetImage and its manipulation functions, we should check and rework all tool to use the new (centralized) functionality correctly.

I would also opt for abstracting the code away for updating an (preview) segmentation by a helper function offered by mitk::AutoSegmentationToolWithPreview.

Somthing like

template<class TITKImage>

/** Updates the timestep of previewImage by the passed update image. Depending on the state of the tool (WorkingPlaneGeometry) the helper function assumes to update the whole image of the timestep or just a slice (defined by WorkingPlaneGeometry) */
void UpdatePreviewImage(Image* previewImage, const TITKImage* updateImage, TimeStepType timeStep);
void UpdatePreviewImage(Image* previewImage, const Image* updateImage, TimeStepType timeStep);