# Show specific tissue on vtkVolume

**URL:** https://discourse.vtk.org/t/show-specific-tissue-on-vtkvolume/3916
**Category:** Support
**Created:** [August 5, 2020, 1:51pm UTC](https://discourse.vtk.org/t/show-specific-tissue-on-vtkvolume/3916 "2020-08-05T13:51:12Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [August 5, 2020, 1:51pm UTC](https://discourse.vtk.org/t/show-specific-tissue-on-vtkvolume/3916/1 "2020-08-05T13:51:12Z")

</div>

I have a vtkVolume on a vtkRenderer, with AddRGBPoint call and AddPoint call for vtkColorTransferFunction and vtkPiecewiseFunction used for vtkVolumeProperty.  
Is there any possibility to color in a solid color (red or something) just specific tissue, let say, a nerve canal, which, theoretically, I know hounsfield unit ?

---

<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: [August 5, 2020, 5:20pm UTC](https://discourse.vtk.org/t/show-specific-tissue-on-vtkvolume/3916/2 "2020-08-05T17:20:57Z")

</div>

Except very dense and sparse materials (such as bone, metal, air, and some contrast agents), you cannot simply visualize a structure in a CT image by specifying an intensity range. The result is typically extremely noisy and you pick up all kinds of other structures with similar intensity. You can play with transfer functions in 3D Slicer Volume Rendering module or Paraview image visualization settings to see it for yourself how well it works on your images.

Usually you segment the structures that you are interested in, with segmentation methods that are based on a combination of image intensity, gradient, etc. constrained with spatial smoothness, continuity, shape models, etc.

---

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [August 7, 2020, 9:24am UTC](https://discourse.vtk.org/t/show-specific-tissue-on-vtkvolume/3916/3 "2020-08-07T09:24:45Z")

</div>

In order to solve this task quickly, is there any method to draw a irregular line inside of the vtkVolume ? In this way, user can virtually draw itself this nerve canal, with a red or blue thick line … can you help me a little bit ?

---

<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: [August 7, 2020, 3:13pm UTC](https://discourse.vtk.org/t/show-specific-tissue-on-vtkvolume/3916/4 "2020-08-07T15:13:39Z")

</div>

Yes, you can “draw” the nerve canal in an image. This is not a VTK-level but an application-level feature, because you need multiple views, effective ways to position and orient slice views, review and adjust point placement, etc. See for example how it can be done using [3D Slicer](https://www.slicer.org):

[![](https://discourse.vtk.org/uploads/default/original/2X/b/b969fecc1b028946923e7f628a2ae39117bc8564.jpeg "Nerve canal annotation on dental CBCT") ](https://www.youtube.com/watch?v=ijP3Etp7Jfc)

---

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [August 11, 2020, 12:15pm UTC](https://discourse.vtk.org/t/show-specific-tissue-on-vtkvolume/3916/5 "2020-08-11T12:15:31Z")

</div>

I am pushing my luck if I ask you where is the specific code for application-level code for drawing line ? I am thinking to study a little bit, maybe I can d a similar thing in my VTK app.

---

<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: [August 11, 2020, 5:58pm UTC](https://discourse.vtk.org/t/show-specific-tissue-on-vtkvolume/3916/6 "2020-08-11T17:58:41Z")

</div>

3D Slicer is open-source, without any restrictions, so you can copy paste any code from it: [https://github.com/Slicer/Slicer](https://github.com/Slicer/Slicer)

Of course your time is much better spent on customizing/extending Slicer instead of copy-pasting it piece by piece, as by building on Slicer you get tons of features, free maintenance and support, testing by thousands of users on multiple operating systems, etc.
