# Extract Range from slice representation

**URL:** https://discourse.paraview.org/t/extract-range-from-slice-representation/9766
**Category:** Development
**Created:** [June 9, 2022, 8:59am UTC](https://discourse.paraview.org/t/extract-range-from-slice-representation/9766 "2022-06-09T08:59:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fvitello](https://discourse.paraview.org/user_avatar/discourse.paraview.org/fvitello/32/8783_2.png) [@fvitello](https://discourse.paraview.org/u/fvitello)
#### Post date: [June 9, 2022, 8:59am UTC](https://discourse.paraview.org/t/extract-range-from-slice-representation/9766/1 "2022-06-09T08:59:44Z")

</div>

Dear all,

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

Thanks

---

<div class="post-metadata">

### Author: ![mau\_igna\_06](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mau_igna_06/32/17180_2.png) [@mau\_igna\_06](https://discourse.paraview.org/u/mau_igna_06)
#### Post date: [June 9, 2022, 9:03am UTC](https://discourse.paraview.org/t/extract-range-from-slice-representation/9766/2 "2022-06-09T09:03:24Z")

</div>

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

---

<div class="post-metadata">

### Author: ![fvitello](https://discourse.paraview.org/user_avatar/discourse.paraview.org/fvitello/32/8783_2.png) [@fvitello](https://discourse.paraview.org/u/fvitello)
#### Post date: [June 9, 2022, 12:34pm UTC](https://discourse.paraview.org/t/extract-range-from-slice-representation/9766/3 "2022-06-09T12:34:42Z")

</div>

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

```auto
 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?
