# visualize only a given number of cell inside a BOX domain

**URL:** https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174
**Category:** ParaView Support
**Created:** [January 24, 2019, 3:01pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174 "2019-01-24T15:01:26Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![drudox00](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@drudox00](https://discourse.paraview.org/u/drudox00)
#### Post date: [January 24, 2019, 3:01pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/1 "2019-01-24T15:01:26Z")

</div>

Hi again !!

I have one other target for the polymer chain animations (previous post) consider that I’m modelling a Box (very big compared with the polymer’s chain who is much smaller than one single cell) is to include into the animations the flow field (exported in different file .vtr ) from this big data file (256^3 cell) I have to consider only 12_12_12 cell around the chain ! how can I do this with Paraview ? I never cut in such way a fluid domain ! may somebody give me help or advice ?  
Thanks a lot

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [January 24, 2019, 5:07pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/2 "2019-01-24T17:07:15Z")

</div>

There are several filters in ParaView that can be used to extract some cells from a data set. The one you use depends on your needs. If I understand your use case, you have some known spatial region that you want to pull cells out of. I think one of the following two filters can do that.

- `Extract Subset` - Given a structured-type of data set (which .vtr is), you can specify the extents of a Volume of Interest (VOI) to extract. This filter is very efficient, but you need to know the indices if the i, j, k region to extract.
- `Extract Cells By Region` - You can define a 3D region using a plane, box, or sphere and extract only those cells within the region. (`Clip` is a similar operation that also smoothly cuts away cells at the region boundary.)

---

<div class="post-metadata">

### Author: ![drudox00](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@drudox00](https://discourse.paraview.org/u/drudox00)
#### Post date: [January 24, 2019, 5:31pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/3 "2019-01-24T17:31:12Z")

</div>

thanks for your help ! onestly I don’t understand how Extract Subset works , may you give me an example ? consider that my domain a cube so the index i,j,k are available for each cell but I don’t find where I have to insert the center and the number of cell around ☹

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [January 24, 2019, 5:46pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/4 "2019-01-24T17:46:38Z")

</div>

With `Extract Subset` you specify a volume of interest by specifying the min and max index for the i, j, and k directions of your 3D grid.

So let’s say you have a structured-type data set that is 256^3 and you wanted to extract a region that was 12^3. If you wanted to extract the region in the “lower-left corner” (minimum x, y, and z), you would set the VOI to [0, 11, 0, 11, 0, 11]. If you wanted to extract the region in the “upper-right corner” (maximum x, y, z), you would set the VOI to [244, 255, 244, 255, 244, 255]. If you wanted to extract a region in the min x and y but max z, you would set the VOI to [0, 11, 0, 11, 244, 255]. If you wanted to extract a region in the topological center, you would set the VOI to [122, 133, 122, 133, 122, 133].

Note that the numbers I gave are _probably_ correct. I have assumed that the original 256^3 grid has its first index at [0, 0, 0]. That is probably the case for data just loaded from a file, but could be different.

---

<div class="post-metadata">

### Author: ![drudox00](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@drudox00](https://discourse.paraview.org/u/drudox00)
#### Post date: [January 24, 2019, 5:54pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/5 "2019-01-24T17:54:07Z")

</div>

oh right now I got the point ! sorry ! it was so easy ! it is also possible see the flow field as stream line just in the VOI ?

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [January 24, 2019, 7:27pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/6 "2019-01-24T19:27:41Z")

</div>

Well, you could compute the stream lines from the extracted region of the flow field. That would constrain the streamlines to the region extracted. But that might not give you the streamlines that you want. If you need to create the streamlines from the whole flow field, then you will have to then extract the lines in the region you want with either `Extract Cells By Region` or `Clip`.

---

<div class="post-metadata">

### Author: ![drudox00](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@drudox00](https://discourse.paraview.org/u/drudox00)
#### Post date: [January 24, 2019, 7:47pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/7 "2019-01-24T19:47:57Z")

</div>

and how to create the streamlines from the whole flow field ?  
sorry but is a couple of years that I don’t use paraview 😅

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [January 24, 2019, 7:53pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/8 "2019-01-24T19:53:03Z")

</div>

Regardless of whether you are creating streamlines from the whole flow field or only the extracted portion, you would use the `Stream Tracer` filter.

---

<div class="post-metadata">

### Author: ![drudox00](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@drudox00](https://discourse.paraview.org/u/drudox00)
#### Post date: [January 24, 2019, 7:54pm UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/9 "2019-01-24T19:54:33Z")

</div>

from the whole flow field and than cut in the region of interests ! is this that you said is the better way right ?

---

<div class="post-metadata">

### Author: ![drudox00](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@drudox00](https://discourse.paraview.org/u/drudox00)
#### Post date: [January 25, 2019, 8:50am UTC](https://discourse.paraview.org/t/visualize-only-a-given-number-of-cell-inside-a-box-domain/1174/10 "2019-01-25T08:50:59Z")

</div>

I have an important question for you (thanks a lot for your precious support !) I have a set of data point which is inside a cell , it is possible know the i,j,k index ? if yes how ?  
sorry I know that I’ve asked a lot of things … but you support is really precious for me
