Hi guys,
<br/><br/>
I've been trying to modify the <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries" target="_top" rel="nofollow" link="external">ReadDICOMSeries example</a> to work with Qt. The example works fine, but when I use a QVTKWidget, scrolling through the slices also reorients the image. The slice is reoriented such that higher slices appear closer or magnified compared to lower ones. The rotation, contrast, or anything else don't seem to change unexpectedly---just the magnification.
<br/><br/>
I've attached all my code, but the important part is this (<a href="http://pastebin.com/0PbST596" target="_top" rel="nofollow" link="external">Pastebin link here if you like syntax highlighting</a>):

<pre>
MainWindow::MainWindow()
{
    this->setupUi(this);

    std::string folder = "DICOM/DANE";

    // Read all the DICOM files in the specified directory.
    vtkSmartPointer<vtkDICOMImageReader> reader =
        vtkSmartPointer<vtkDICOMImageReader>::New();
    reader->SetDirectoryName(folder.c_str());
    reader->Update();

    // Set up image viewer
    vtkSmartPointer<vtkImageViewer2> imageViewerRight =
        vtkSmartPointer<vtkImageViewer2>::New();
    imageViewerRight->SetInputData(reader->GetOutput());
    imageViewerRight->GetRenderer()->ResetCamera();

    // Interactor style
    vtkSmartPointer<myVtkInteractorStyleImage> interactorStyle =
        vtkSmartPointer<myVtkInteractorStyleImage>::New();
    interactorStyle->SetImageViewer(imageViewerRight);

    // VTK/Qt wedded
    //this->wgt_xsection->GetRenderWindow()->AddRenderer(rendererLeft);
    this->wgt_3d      ->SetRenderWindow(imageViewerRight->GetRenderWindow());
    this->wgt_3d      ->GetRenderWindow()->GetInteractor()
            ->SetInteractorStyle(interactorStyle);
    this->wgt_3d->update();
    
    connect(this->actionExit, SIGNAL(triggered()), this, SLOT(slotExit()));
}
</pre>

myVtkInteractorStyleImage is the same class used in the example.
<br/><br/>
This is somewhat of a small problem in terms of aesthetics, but it shows a lack of understanding on my part that I'd really like to clear up here.
<br/><br/>
Thanks!
<br/><br/>
<a href="http://vtk.1045678.n5.nabble.com/file/n5728481/Project.zip" target="_top" rel="nofollow" link="external">Project.zip</a>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Qt-VTK-Custom-vtkInteractorStyle-Subclass-tp5728481.html">Qt + VTK + Custom vtkInteractorStyle Subclass</a><br/>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br/>