# Vertical stripe for some Sample Distance values

**URL:** https://discourse.vtk.org/t/vertical-stripe-for-some-sample-distance-values/2574
**Category:** Support
**Created:** [February 10, 2020, 3:26pm UTC](https://discourse.vtk.org/t/vertical-stripe-for-some-sample-distance-values/2574 "2020-02-10T15:26:22Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Ana\_Margarida\_Mota](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ana_margarida_mota/32/1287_2.png) [@Ana\_Margarida\_Mota](https://discourse.vtk.org/u/Ana_Margarida_Mota)
#### Post date: [February 10, 2020, 3:26pm UTC](https://discourse.vtk.org/t/vertical-stripe-for-some-sample-distance-values/2574/1 "2020-02-10T15:26:22Z")

</div>

Dear colleagues,

I am facing a problem when changing the sample distance value.

For certain values of sample distance, defined with SetSampleDistance (), a vertical stripe that crosses the entire object appears when I rotate 90º (as the image I show down here).

The voxel size is 0.085x0.085x1mm3 ( I don’t know if it has any effect on that).

Example:

SetSampleDistance (0.5) does not appear  
SetSampleDistance (0.16) does not appear  
SetSampleDistance (0.15) appears  
SetSampleDistance (0.14) appears  
SetSampleDistance (0.11) does not appear  
SetSampleDistance (0.05) appears

Perhaps it is a very basic question, but I do not understand why it happens.  
Can anyone help me?

Thank you in advance!  
 ![image](https://discourse.vtk.org/uploads/default/original/2X/4/4df3bcdab89cbdc2da2949f92bbdfa8f7de52f49.png)

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [February 11, 2020, 12:08am UTC](https://discourse.vtk.org/t/vertical-stripe-for-some-sample-distance-values/2574/2 "2020-02-11T00:08:29Z")

</div>

Do you have this problem with [classvtkFixedPointVolumeRayCastMapper](https://vtk.org/doc/nightly/html/classvtkFixedPointVolumeRayCastMapper.html)?

---

<div class="post-metadata">

### Author: ![Ana\_Margarida\_Mota](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ana_margarida_mota/32/1287_2.png) [@Ana\_Margarida\_Mota](https://discourse.vtk.org/u/Ana_Margarida_Mota)
#### Post date: [February 11, 2020, 10:15am UTC](https://discourse.vtk.org/t/vertical-stripe-for-some-sample-distance-values/2574/3 "2020-02-11T10:15:57Z")

</div>

Yes, with SetBlendModeToComposite().  
Why?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [February 11, 2020, 1:16pm UTC](https://discourse.vtk.org/t/vertical-stripe-for-some-sample-distance-values/2574/4 "2020-02-11T13:16:50Z")

</div>

We have found this bug 10+ years ago at my previous company. Shortly after I left I heard from my colleagues that they fixed it, but apparently they did not have the time to contribute it back to VTK. Later the problem was also reported by Randall Hand and he also attached [a patch to fix it](https://gitlab.kitware.com/vtk/vtk/issues/5519).

Since the GPU volume mapper is several magnitudes faster and has several important features that the CPU mapper does not have (jittering, semi-functional multi-volume rendering, masking, etc.), the class does not get too much developer or user attention. However, if the proposed patch fixes the issue then it is definitely worth merging it.

---

<div class="post-metadata">

### Author: ![Ana\_Margarida\_Mota](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ana_margarida_mota/32/1287_2.png) [@Ana\_Margarida\_Mota](https://discourse.vtk.org/u/Ana_Margarida_Mota)
#### Post date: [February 11, 2020, 2:46pm UTC](https://discourse.vtk.org/t/vertical-stripe-for-some-sample-distance-values/2574/5 "2020-02-11T14:46:58Z")

</div>

Oh…really?

OK, so, I am a bit inexperienced in software/instalation issues, how can I “embed” this patch in my code?

Thank you very much!!

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [February 11, 2020, 11:10pm UTC](https://discourse.vtk.org/t/vertical-stripe-for-some-sample-distance-values/2574/6 "2020-02-11T23:10:25Z")

</div>

You need to download VTK source code, make the changes described in the patch, and build VTK.

---

<div class="post-metadata">

### Author: ![Ana\_Margarida\_Mota](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ana_margarida_mota/32/1287_2.png) [@Ana\_Margarida\_Mota](https://discourse.vtk.org/u/Ana_Margarida_Mota)
#### Post date: [February 12, 2020, 11:44am UTC](https://discourse.vtk.org/t/vertical-stripe-for-some-sample-distance-values/2574/7 "2020-02-12T11:44:27Z")

</div>

OK, thank you so so much!! Hope it works!!
