# Have problem on render my data

**URL:** https://discourse.vtk.org/t/have-problem-on-render-my-data/10674
**Category:** Support
**Tags:** python
**Created:** [February 14, 2023, 3:18pm UTC](https://discourse.vtk.org/t/have-problem-on-render-my-data/10674 "2023-02-14T15:18:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![MushengWu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mushengwu/32/6540_2.png) [@MushengWu](https://discourse.vtk.org/u/MushengWu)
#### Post date: [February 14, 2023, 3:18pm UTC](https://discourse.vtk.org/t/have-problem-on-render-my-data/10674/1 "2023-02-14T15:18:50Z")

</div>

I am new for VTK, and recently my project need it,and i have many question waiting for resolution  
Here is one:  
when I load my data, i used the following code:

> def load\_Nifti(data):  
> Nifti = vtkNIFTIImageReader()  
> Nifti.SetFileName(data)  
> Nifti.Update()
> 
> ```
> volume = Nifti.GetOutput()
> 
> return volume
> 
> ```

And my data’s original size is (208, 240, 368)  
When i render my data, the code is automatic do the resample to 1_1_1,which i didn’t want to.  
Because i found that when i used:

> volume.GetBounds()

I get :

> (0.0, 157.15559297800064, 0.0, 157.66013169288635, 0.0, 100.6149368584156)  
> obvious that is the resample size,which i had calculated

How can i render my original data?

---

<div class="post-metadata">

### Author: ![MushengWu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mushengwu/32/6540_2.png) [@MushengWu](https://discourse.vtk.org/u/MushengWu)
#### Post date: [February 14, 2023, 3:34pm UTC](https://discourse.vtk.org/t/have-problem-on-render-my-data/10674/2 "2023-02-14T15:34:05Z")

</div>

![image](https://discourse.vtk.org/uploads/default/original/2X/2/2c4c880d8142f25d6c0d355c12e4cfbfe38c84b2.jpeg)  
That is what mesh Axis see, it can show that the size become the resample size

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [February 14, 2023, 10:13pm UTC](https://discourse.vtk.org/t/have-problem-on-render-my-data/10674/3 "2023-02-14T22:13:08Z")

</div>

Hello,

> [@MushengWu](#):
>
> the resample to 1_1_1

A 1x1x1 resample is no resampling (you render all the voxels). Why do you think the renderer is skipping data?

regards,

Paulo

---

<div class="post-metadata">

### Author: ![MushengWu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mushengwu/32/6540_2.png) [@MushengWu](https://discourse.vtk.org/u/MushengWu)
#### Post date: [February 15, 2023, 2:03am UTC](https://discourse.vtk.org/t/have-problem-on-render-my-data/10674/4 "2023-02-15T02:03:43Z")

</div>

> [@Paulo\_Carvalho](#):
>
> A 1x1x1 resample is no resampling (you render all the voxels). Why do you think the renderer is skipping data?
> 
> regards,

Because the data original spacing and size are：

> (0.4282168745994568, 0.6596658229827881, 0.48606249690055847)  
> (208, 240, 368)

And after render, the size is become (158, 158, 101), and that size is when resample to 1x1x1

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [February 15, 2023, 11:40am UTC](https://discourse.vtk.org/t/have-problem-on-render-my-data/10674/5 "2023-02-15T11:40:14Z")

</div>

What class `volume` belongs to?

---

<div class="post-metadata">

### Author: ![MushengWu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mushengwu/32/6540_2.png) [@MushengWu](https://discourse.vtk.org/u/MushengWu)
#### Post date: [February 15, 2023, 1:56pm UTC](https://discourse.vtk.org/t/have-problem-on-render-my-data/10674/6 "2023-02-15T13:56:15Z")

</div>

I figured it out.  
After render，the volume become physical size，it didn’t do any other opera  
And i hadn’t thought that before  
Thank you very much for your help
