# vtkResliceImageViewer Mode Oblique bug

**URL:** https://discourse.vtk.org/t/vtkresliceimageviewer-mode-oblique-bug/8944
**Category:** Development
**Created:** [July 13, 2022, 9:29am UTC](https://discourse.vtk.org/t/vtkresliceimageviewer-mode-oblique-bug/8944 "2022-07-13T09:29:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![NicolasPerdu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/n/b77776/32.png) [@NicolasPerdu](https://discourse.vtk.org/u/NicolasPerdu)
#### Post date: [July 13, 2022, 9:29am UTC](https://discourse.vtk.org/t/vtkresliceimageviewer-mode-oblique-bug/8944/1 "2022-07-13T09:29:36Z")

</div>

Hello,

I am using VTK 9.2 on windows 10 with MSVC 2019 with the code :

```auto
    vtkObject::GlobalWarningDisplayOff();
    vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);
    std::string inputFilename = "C:\\Lib\\I0";

    vtkNew<vtkDICOMImageReader> reader;
    reader->SetFileName(inputFilename.c_str());
    reader->Update();

    vtkNew<vtkResliceImageViewer> imageViewer;
    imageViewer->SetInputData(reader->GetOutput());
    vtkNew<vtkRenderWindowInteractor> renderWindowInteractor;
    imageViewer->SetupInteractor(renderWindowInteractor);
    imageViewer->SetResliceModeToOblique();

    imageViewer->Render();
    imageViewer->GetRenderer()->ResetCamera();
    imageViewer->Render();

    renderWindowInteractor->Start();

```

But I have the following error when I try to do a render :

> Run-Time Check Failure #2 - Stack around the variable ‘worldFocalPoint’ was corrupted.

Here is the stack trace :  
 ![image](https://discourse.vtk.org/uploads/default/original/2X/9/9e4216f584291691dfefa9cd4c7066fe4c6faa4b.png)

Any ideas how to solve this problem ? This code works on macOS and the problem only occurs if I enable the oblique mode.

Thank you for your help.

---

<div class="post-metadata">

### Author: ![vegeta\_saiya](https://discourse.vtk.org/user_avatar/discourse.vtk.org/vegeta_saiya/32/5638_2.png) [@vegeta\_saiya](https://discourse.vtk.org/u/vegeta_saiya)
#### Post date: [October 4, 2022, 4:30am UTC](https://discourse.vtk.org/t/vtkresliceimageviewer-mode-oblique-bug/8944/2 "2022-10-04T04:30:21Z")

</div>

do you solve this prolem now?

---

<div class="post-metadata">

### Author: ![NicolasPerdu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/n/b77776/32.png) [@NicolasPerdu](https://discourse.vtk.org/u/NicolasPerdu)
#### Post date: [October 4, 2022, 11:16pm UTC](https://discourse.vtk.org/t/vtkresliceimageviewer-mode-oblique-bug/8944/3 "2022-10-04T23:16:25Z")

</div>

Yes

---

<div class="post-metadata">

### Author: ![Neil\_Seller](https://discourse.vtk.org/user_avatar/discourse.vtk.org/neil_seller/32/4876_2.png) [@Neil\_Seller](https://discourse.vtk.org/u/Neil_Seller)
#### Post date: [January 5, 2023, 2:13pm UTC](https://discourse.vtk.org/t/vtkresliceimageviewer-mode-oblique-bug/8944/4 "2023-01-05T14:13:27Z")

</div>

Nicolas,

I’'m having the same problem - could you care to elaborate as to how you resolved it?

thank you in advance

---

<div class="post-metadata">

### Author: ![YagoM](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/e56c9b/32.png) [@YagoM](https://discourse.vtk.org/u/YagoM)
#### Post date: [February 28, 2023, 1:09pm UTC](https://discourse.vtk.org/t/vtkresliceimageviewer-mode-oblique-bug/8944/5 "2023-02-28T13:09:49Z")

</div>

I don’t know if this will work for someone…but my problem was related with anything which implies “SetResliceModeToOblique()” or ResliceCursorWidget.  
Downgrade from VTK9 to VTK8 works for me (not perfect, but its functional).

---

<div class="post-metadata">

### Author: ![joinvar](https://discourse.vtk.org/user_avatar/discourse.vtk.org/joinvar/32/7297_2.png) [@joinvar](https://discourse.vtk.org/u/joinvar)
#### Post date: [September 1, 2023, 12:58am UTC](https://discourse.vtk.org/t/vtkresliceimageviewer-mode-oblique-bug/8944/6 "2023-09-01T00:58:11Z")

</div>

I observed this bug, which has been fixed now, but it hasn’t been released in the latest official version (v9.2.6) yet.  
Here is the closed issus  
[https://gitlab.kitware.com/vtk/vtk/-/issues/18716](https://gitlab.kitware.com/vtk/vtk/-/issues/18716)
