# Visualizing a subset of a 3D volume rendering

**URL:** https://discourse.paraview.org/t/visualizing-a-subset-of-a-3d-volume-rendering/8496
**Category:** ParaView Support
**Created:** [November 26, 2021, 1:20pm UTC](https://discourse.paraview.org/t/visualizing-a-subset-of-a-3d-volume-rendering/8496 "2021-11-26T13:20:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dashp7](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@dashp7](https://discourse.paraview.org/u/dashp7)
#### Post date: [November 26, 2021, 1:20pm UTC](https://discourse.paraview.org/t/visualizing-a-subset-of-a-3d-volume-rendering/8496/1 "2021-11-26T13:20:08Z")

</div>

Hi,  
I am trying to generate a volume rendering of a 128^3 dataset. Though I am able to generate a volume rendering of the whole dataset, I am unable to do so for a selected region, for ex:  
[1:126]x[1:126]x[1:126](I want to exclude the boundaries while generating the rendering).

Thanks in advance

---

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.paraview.org/u/Kenichiro-Yoshimi)
#### Post date: [November 28, 2021, 6:01am UTC](https://discourse.paraview.org/t/visualizing-a-subset-of-a-3d-volume-rendering/8496/2 "2021-11-28T06:01:04Z")

</div>

In the **Programmable** Filter, there is a way to extract a specific region by calling the vtkExtractVOI function.

In the Programmable Filter, fill in the followings and **Apply**.

- RequestInformation Script：

```python
from paraview import util

voi = [1,126,1,126,1,126]
util.SetOutputWholeExtent(self, voi)

```

- Script:

```python
import vtk

voi = [1,126,1,126,1,126]

input = self.GetInputDataObject(0, 0)
extract = vtk.vtkExtractVOI()
extract.SetInputData(input)
extract.SetVOI(voi)
extract.Update()
output.DeepCopy(extract.GetOutput())

```

---

<div class="post-metadata">

### Author: ![dashp7](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@dashp7](https://discourse.paraview.org/u/dashp7)
#### Post date: [November 28, 2021, 4:46pm UTC](https://discourse.paraview.org/t/visualizing-a-subset-of-a-3d-volume-rendering/8496/3 "2021-11-28T16:46:46Z")

</div>

I am unable to find the prompt for RequestInformation Script. I tried the extract subset filter in pararview, but it showed me the error:

Inconsistent types of vtkUniformGrid

vtkOverlappingAMR (0x14cba70): Inconsistent types of vtkUniformGrid

---

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.paraview.org/u/Kenichiro-Yoshimi)
#### Post date: [November 29, 2021, 12:22am UTC](https://discourse.paraview.org/t/visualizing-a-subset-of-a-3d-volume-rendering/8496/4 "2021-11-29T00:22:05Z")

</div>

Sorry, I forgot that there is an **Extract Subset** filter with the same function as vtkExtractVOI. If you want to apply the **Extract Subset** filter to a vtkOverlappingAMR, you will need to convert the data to **Image Data** with the **Resample To Image** filter.
