Hello, when using the ImageCroppingWidget (example here) is it possible to get the ImageData of the object?
It is hinted here that the underlying volume from widgets are possible to save as ImageData
using vtkXMLImageDataWriter
, and thats exactly what i am trying to do.
Setting vtkVolume as the input yields an error since the vtkVolume
class doesn’t have the getExtent
function (source)
const writer = vtkXMLImageDataWriter.newInstance();
writer.setFormat(vtkXMLWriter.FormatTypes.ASCII);
// writer.setCompression(true);
const data = writer.write(vtkVolume);
I have tried getting the ImageData object from the mapper itself but i couldn’t find a function to get the output data from the mapper in the documentation of the VolumeMapper, AbstractMapper or Mapper. I have also tried to find a function that crop widget itself but as far as i can tell the cropwidget usess the VolumeMapper to do the actual cropping while itself is just providing a interface for the input slice planes.
My questions are
- Is there a straightforward way to get the output data from Volume, VolumeMapper or WidgetStates?
- If so could they be combined with other widgets to get a single ImageData?
- If not is there a way to get the ImageData from the
model
instead of thepublicAPI
using theget
function? - If not is the recommended method to get cropping parameters from the widget and apply it to
ImageCropFilter
in the background, essantialy recomputing the cropping operation?
Thanks