Extract Range from slice representation

Dear all,

how can I extract, in my cpp custom application, the min/max values of the visualized slice?

Thanks

Most of the times is
YourClass.GetImageData().GetScalarRange()
That’ for the hole volume in python

If you want to access individual slices I would suggest you ise the helper functions vtk_to_numpy to get an array of your image

Thanks for the suggestion, I am able to get the range for the whole volume with:

 auto volumeDataInfo = volumeInfo->GetPointDataInformation()->GetArrayInformation("FITSImage");
 double dataRange[2];
 volumeDataInfo->GetComponentRange(0, dataRange);

I would like to avoid the vtk_to_numpy function to get the slice range, is there any other methods?

1 Like