# How to show the vtk object which links 3x ranges in 3x different slices?

**URL:** <https://discourse.slicer.org/t/how-to-show-the-vtk-object-which-links-3x-ranges-in-3x-different-slices/1324>\
**Category:** Development\
**Tags:** segmentation\
**Created:** [October 31, 2017, 6:20am UTC](https://discourse.slicer.org/t/how-to-show-the-vtk-object-which-links-3x-ranges-in-3x-different-slices/1324 "2017-10-31T06:20:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![spring](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@spring](https://discourse.slicer.org/u/spring)\
**Post date:** [October 31, 2017, 6:20am UTC](https://discourse.slicer.org/t/how-to-show-the-vtk-object-which-links-3x-ranges-in-3x-different-slices/1324/1 "2017-10-31T06:20:17Z")

</div>

Hi Slicer Experts:

```
Background is: we have one CT image in Slicer,and we want to draw 3x ranges(with rectangle format ) in 3x different slices,then we want to link these 3x ranges and show it as cuboid.
Now we can get the start point and end point for each rectangles,but we dont know how to link them.

```

Any suggestions would be appreciated.

Thanks,  
Chunbo

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 31, 2017, 12:08pm UTC](https://discourse.slicer.org/t/how-to-show-the-vtk-object-which-links-3x-ranges-in-3x-different-slices/1324/2 "2017-10-31T12:08:20Z")

</div>

Hi Chunbo -

Can you explain a bit more what you mean by “3x ranges” and what you mean by linking them? Maybe you could draw a picture of what you have in mind?

-Steve

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 31, 2017, 12:54pm UTC](https://discourse.slicer.org/t/how-to-show-the-vtk-object-which-links-3x-ranges-in-3x-different-slices/1324/3 "2017-10-31T12:54:40Z")

</div>

@spring Do you mean you would need something like annotation ROI box?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/d/ddea94956a768c9920b50a08d53f2764b3a4ca3d.jpeg)

---

<div class="post-metadata">

**Author:** ![spring](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@spring](https://discourse.slicer.org/u/spring)\
**Post date:** [November 1, 2017, 6:51am UTC](https://discourse.slicer.org/t/how-to-show-the-vtk-object-which-links-3x-ranges-in-3x-different-slices/1324/4 "2017-11-01T06:51:11Z")

</div>

Hi Steve,

Thanks for your reply.

Below screenshot can show our requirement.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/0/50d15f9efebdbbd657b6f8283ec22395059e5eab.png)

There are 3x slices which located at different positions, we want to link them as one cuboid,and use interpolation to show the middle slices.  
It seems we should create one specific vtk object to contain it. Could you share some suggestions?

Thanks and Regards,  
Chunbo

---

<div class="post-metadata">

**Author:** ![spring](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@spring](https://discourse.slicer.org/u/spring)\
**Post date:** [November 1, 2017, 7:16am UTC](https://discourse.slicer.org/t/how-to-show-the-vtk-object-which-links-3x-ranges-in-3x-different-slices/1324/5 "2017-11-01T07:16:55Z")

</div>

Thanks Lasso,

Yes,the ROI box can create the similar ranges.

The only one difference is:ROI box was based on the specific slice,and the box’s depth is fixed.We want to create one object likes vtk’s cuboid to connect those 3x different slices.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 1, 2017, 11:44am UTC](https://discourse.slicer.org/t/how-to-show-the-vtk-object-which-links-3x-ranges-in-3x-different-slices/1324/6 "2017-11-01T11:44:15Z")

</div>

To achieve that, create vtkMRMLTransformNode to your scene and set a [vtkGridTransform](https://www.vtk.org/doc/nightly/html/classvtkGridTransform.html) with 2x2x3 points. Each point specifies how each slice corner point is displaced relative to original corner point position.
