# How can I achieve transparent out-of-range component 1 in 2 components image data?

**URL:** https://discourse.vtk.org/t/how-can-i-achieve-transparent-out-of-range-component-1-in-2-components-image-data/15136
**Category:** Support
**Created:** [January 10, 2025, 12:12pm UTC](https://discourse.vtk.org/t/how-can-i-achieve-transparent-out-of-range-component-1-in-2-components-image-data/15136 "2025-01-10T12:12:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sss](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sss/32/8395_2.png) [@sss](https://discourse.vtk.org/u/sss)
#### Post date: [January 10, 2025, 12:12pm UTC](https://discourse.vtk.org/t/how-can-i-achieve-transparent-out-of-range-component-1-in-2-components-image-data/15136/1 "2025-01-10T12:12:46Z")

</div>

I have a vtkImageData with 2 components, and use volume mapper into a vtkVolume with  
volumeProperty-\>IndependentComponentsOff()  
my first component is with color transfer function, and second component is with opacity transfer function,

now I want that only a range of the first component is visible, others (above or below the range) is fully transparent, and the visible part is still affected by the second component’s opacity transfer function. How can I achieve this?
