# Orthogonal and Oblique MPR Slicing and Fusion

**URL:** <https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530>\
**Category:** Development\
**Tags:** registration, segmentation, dicom\
**Created:** [November 10, 2020, 9:01pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530 "2020-11-10T21:01:08Z")\
**Posts on this page:** 18\
**Page:** 4

<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:** [January 26, 2021, 10:13pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/62 "2021-01-26T22:13:06Z")

</div>

Where does this vtkResliceImageViewer come from? Do you place custom VTK actors in renderers in Slicer?

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [January 26, 2021, 10:23pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/63 "2021-01-26T22:23:59Z")

</div>

OK, I think I should be posting this is a general VTK forum. I’m not doing this in Slicer. Sorry. 😐

---

<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:** [January 27, 2021, 2:49am UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/64 "2021-01-27T02:49:48Z")

</div>

I just asked this because we have a mechanism to manage rendering requests in Slicer, but there is no such thing in VTK. So, the answer is different in a plain VTK render window than a render window in Slicer.

For quick prototyping it might make sense try a vtkResliceImageViewer, but the current image reslice widgets are not too far from what vtkResliceImageViewer can do, so that may be a good option, too (slightly more work, but has long-term benefits). @Sunderlandkyl is currently working on adding ROI markup widget and in scope of this activity he may move draggable handles out from markups so that other components (such as slice intersection widgets) could utilize it. With some coordination of this effort, it might be not too much development work to make slice intersections and slice view boundaries draggable.

@Sunderlandkyl what do you think? How difficult would be to add markups plane widget-like features to slice and 3D views (translate, rotate, change slice thickness of slices) without redeveloping handles from scratch?

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [January 27, 2021, 3:24pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/65 "2021-01-27T15:24:50Z")

</div>

To be clear, you’re saying that currently, Slicer does not have draggable handles for translating, rotating, and changing slice thickness of slice intersection widgets, correct? I could live without having handles for changing thickness; it’s probably easier and more intuitive to set thickness with a slider and/or entering a value in a text box. But for oblique slicing, using translation and rotation handles are most intuitive.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [January 27, 2021, 3:30pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/66 "2021-01-27T15:30:00Z")

</div>

> for oblique slicing, using translation and rotation handles are most intuitive.

The existing support is available through the “Reformat” widget, it can enabled using this icon:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/2/82de918a5c782eccfe58304ecbd7a4e136cdd938.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/6/961238bce03bcd0625e7f374835ba5a15714d425.png)

Once enabled, this widget is available in the 3d viewer:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/2/22a75180de13ba0e403be7f108edb48b84d7ae8d.png)

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [January 27, 2021, 4:11pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/67 "2021-01-27T16:11:48Z")

</div>

@lassoan I don’t think it should be too much work to move the interaction handle pipeline to a more general location. I’ll start looking into it

---

<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:** [January 27, 2021, 4:15pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/68 "2021-01-27T16:15:58Z")

</div>

> [@spycolyf](#):
>
> Slicer does not have draggable handles for translating, rotating, and changing slice thickness of slice intersection widgets, correct?

The widgets are draggable in 3D view as @jcfr showed above. In slice views, you can move slice intersection by holding down Shift key and rotate slice intersections by Ctrl-Alt + left-click-and-drag. These mouse&keyboard gestures are very effective and keep the image viewers clean, but not easily discoverable for newcomers, so it may be useful to allow dragging the intersections using visible handles.

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [January 27, 2021, 6:03pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/69 "2021-01-27T18:03:55Z")

</div>

This all sounds great. I look forward to seeing it all come together. Thanks.

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [January 27, 2021, 7:10pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/70 "2021-01-27T19:10:24Z")

</div>

By the way, the answer to my window/level issue earlier was to use vtkResliceImageViewer’s base class, vtkImageViewer2 methods, SetColorWindow and SetColorLevel.

```
        vtkSmartPointer< vtkResliceImageViewer > riw;
        riw->SetColorWindow(400);
        riw->SetColorLevel(40);

```

Using these set the W/Ls immediately 🙂

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [January 28, 2021, 7:06pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/71 "2021-01-28T19:06:55Z")

</div>

Hello @lassoan,

Does a VTK reference manual exist that contains examples of how to use functions like vtkImageSlabReslice-\>SetSlabThickness(thickness); How do I set the thickness and show the change in the thickness reference lines on the image. Here my code and nothing happens …

void QtVTKRenderWindows::SetSlabThickness(double thickness)  
{  
if (debug\_mode) std::cout \<\< "SetSlabThickness = " \<\< thickness \<\< std::endl;  
for (int i = 0; i \< 3; i++)  
{  
vtkImageSlabReslice\* thickSlabReslice = vtkImageSlabReslice::SafeDownCast(  
vtkResliceCursorThickLineRepresentation::SafeDownCast(  
riw[i]-\>GetResliceCursorWidget()-\>GetRepresentation())-\>GetReslice());  
thickSlabReslice-\>SetSlabThickness(thickness);  
riw[i]-\>GetRenderer()-\>ResetCamera();  
riw[i]-\>Render();  
}  
}

---

<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:** [January 28, 2021, 7:31pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/72 "2021-01-28T19:31:44Z")

</div>

Setting the slab thickness is tricky. I remember that I had trouble figuring out how exactly it has to be specified (I think it is not set in mm but in image space or something like that). Have look at the documentation, if that does not clarify it then fall back to the source code, and if all these fail then ask David Gobbi on the VTK forum.

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [January 28, 2021, 8:05pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/73 "2021-01-28T20:05:51Z")

</div>

Hmm… GetSlabThickness returns the thickness in mm, it just seems SetSlabThickness would allow you to change the thickness in the same units. OK. I’ll ask in the VTK forum because this is still a vtkResliceImageViewer quetion.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [January 28, 2021, 10:06pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/74 "2021-01-28T22:06:41Z")

</div>

A post was split to a new topic: [Web application based on vtk.js](https://discourse.slicer.org/t/web-application-based-on-vtk-js/15725)

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [February 11, 2021, 3:37pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/75 "2021-02-11T15:37:14Z")

</div>

Hello @jcfr @pieper @lassoan @superlib

I’m very grateful for the amazing help you’ve given us here ay Mayo. No other way would I have gotten through my issues. Your service to the 3D imaging development community is extremely valuable and in the end, helps the patient, and the patient’s wellbeing is always our top priority. We all contribute to saving lives. Thanks you!

---

<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:** [February 11, 2021, 9:30pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/76 "2021-02-11T21:30:12Z")

</div>

Thank you! Could you write this (maybe copy, maybe add one sentence for some context) as a topic in this category?

> **[Success stories](https://discourse.slicer.org/c/community/success-stories/29)**
>
> This is the place where you can share how Slicer helped your work. Describe your project and how Slicer was useful in achieving your goal. Include reference to any publication(s) and if possible also add a few nice images or links to videos.

Maybe it is too early to say it is “Success story” yet, so it is up to you, you can post it later, when you managed to actually deploy it. Anyway, happy to see that you are happy.

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [February 12, 2021, 5:01pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/77 "2021-02-12T17:01:57Z")

</div>

@jcfr @pieper @lassoan @superlib

Question: Do any of you know Dan Blezek, Brad Erickson or Bill Ryan here at mayo? 🙂

They definitely know @pieper from way back.

---

<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:** [February 12, 2021, 5:22pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/78 "2021-02-12T17:22:26Z")

</div>

Oh yes indeed. Say hello to them all!

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [February 19, 2021, 9:38pm UTC](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530/79 "2021-02-19T21:38:58Z")

</div>

> [@lassoan](#):
>
> Maybe it is too early to say it is “Success story” yet, so it is up to you, you can post it later, when you managed to actually deploy it. Anyway, happy to see that you are happy.

Oh OK, yes you’re correct. I’ll remove it for now.

[Previous page](https://discourse.slicer.org/t/orthogonal-and-oblique-mpr-slicing-and-fusion/14530.md?page=3)
