A vtk Filter based on vtkImageReslice with the aditional feature to write a slice into the given input volume. All optimizations for e.g. the plane directions or interpolation are stripped away, the algorithm only interpolates nearest neighbor and uses the non optimized execute function of vtkImageReslice. Note that any interpolation doesn't make sense for round trip use extract->edit->overwrite, because it is nearly impossible to invert the interolation. There are two use cases for the Filter which are specified by the overwritemode property:
More...
A vtk Filter based on vtkImageReslice with the aditional feature to write a slice into the given input volume. All optimizations for e.g. the plane directions or interpolation are stripped away, the algorithm only interpolates nearest neighbor and uses the non optimized execute function of vtkImageReslice. Note that any interpolation doesn't make sense for round trip use extract->edit->overwrite, because it is nearly impossible to invert the interolation. There are two use cases for the Filter which are specified by the overwritemode property:
1)Extract slices from a 3D volume. Overwritemode = false
In this mode the class can be used like vtkImageReslice. The usual way to do this is:
- Set an image volume as input
- Set the ResliceAxes via SetResliceAxesDirectionCosines and SetResliceAxesOrigin
- Set the the OutputSpacing, OutputOrigin and OutputExtent
- Call Update
2)Overwrite a 3D volume at a given slice. Overwritemode = true
The handling in this mode is quite similar to the description above with the addition that the InputSlice needs to be specified via SetInputSlice(vtkImageData*).
- Set the properties mentioned above (Note that SetInput specifies the volume to write to)
- Set the slice to that has to be overwritten in the volume ( SetInputSlice(vtkImageData*)
After calling Update() there is no need to retrieve the output as the input volume is modified.
- See also
- vtkImageReslice (Note that the execute and interpolation functions are no members and thus can not be overriden)
Definition at line 51 of file mitkVtkImageOverwrite.h.