Page MenuHomePhabricator

implement an overwriteImageFilter based on the algorithm of vtkImageReslice
Closed, ResolvedPublic

Description

For extracting an abitrary oriented oblique slice the
vtkImageReslice class is used. But there is no corresponding
class which does the writing to the volume.

Event Timeline

I've written a filter that inherits from vtkImageReslice and modified the execute algorithm in a way that slices can be written back to an image volume.
All optimizations of vtkImageReslice are left and only nearest neighbour interpolation available.
The slice can be set via SetInputSlice method.

Could you please talk to Marco about this? A change request should always be accompanied by a description on the linked wiki page. One question on this specific issue: does this need to be in core, or would it fit better into a module, e.g. ImageExtraction?

There will be a meeting with Marco next week. I will then add an explanation to wiki page.

Just found a bug in mitkExtractDirectedPlaneImageFilter.
When you extract a transversal slice, recieved the stdMultiwidget-Renderwindow, the extracted slice is moved by 0.5 pixels..

It is not worth to fix it, since the class will be obsolete, after the new stuff here is integrated to master

Progress update:
The overwrite functionality is working with all segmentation tools. Several issues had to be fixed:

  • the image's extent was not adapted during rotation within crosshair rotaion
  • the origin of the plane too
  • race condition in PaintbrushTool, the working slice stored in node was somehow deleted and the overwrite filter accessed random memory

A requirement for the filter is also to enable undo functionality for segmentation in rotated planes. This is done by introducing an operation class and its appropriate applier class.
<a href="http://bugs.mitk.org/show_bug.cgi?id=7994">T7994</a> realizes this feature. As all the code from T10333 is required for 7994, 10333 is closed with pushing 7994.