vtkImageData only shows one slice in vtkResliceImageViewer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

vtkImageData only shows one slice in vtkResliceImageViewer

zandarina
Dear all,

I have a question. I want to show using vtkResliceImageViewer the slices i
have got from the reslicer
filter. So i append in z the output and i call a fuction to show me the
vtkImageData withh all the slices extracted from the reslicer filter. But my
surprise is that only show one slice. But if i use the same
vtkResliceImageViewer  with the whole volume it works propertly. What can i
do to show the slices obtained form the reslicer in the viewer.

Thanks


vtkImageAppend* append1 = vtkImageAppend::New();
        //Define Stack in Z
        append1->SetAppendAxis(2);

...

                // done
                reslice->Update();


                //Append the slices into an image
                append1->AddInputData(reslice->GetOutput());
                append1->Update();

image_paraxial = append1->GetOutput();

vtkNew<vtkResliceImageViewer> image_viewer_;

vtkNew<vtkGenericOpenGLRenderWindow> renderWindow;
                        SetRenderWindow(renderWindow);

                        image_viewer_->SetRenderWindow(renderWindow);
                        image_viewer_->SetupInteractor(renderWindow->GetInteractor());

                        //vtkSmartPointer<vtkImageData> image_data = vtkImageData::SafeDownCast(
                                //scene.get_volume()->GetMapper()->GetInputDataObject(0, 0));

                        image_viewer_->SetInputData(image_data);
                        image_viewer_->SetSliceOrientationToXY();
                        image_viewer_->SetSlice(1);
                        image_viewer_->SetResliceModeToAxisAligned();



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkImageData only shows one slice in vtkResliceImageViewer

zandarina
I cheked the extent and it is correct in z from 0..11. Why can,t i scroll the vtkimagedata in the viewer?

Thanks

El mar., 26 mar. 2019 a las 16:06, zandarina (<[hidden email]>) escribió:
Dear all,

I have a question. I want to show       using vtkResliceImageViewer the slices i
have got from the reslicer
filter. So i append in z the output and i call a fuction to show me the
vtkImageData withh all the slices extracted from the reslicer filter. But my
surprise is that only show one slice. But if i use the same
vtkResliceImageViewer  with the whole volume it works propertly. What can i
do to show the slices obtained form the reslicer in the viewer.

Thanks


vtkImageAppend* append1 = vtkImageAppend::New();
        //Define Stack in Z
        append1->SetAppendAxis(2);

...

                // done
                reslice->Update();


                //Append the slices into an image
                append1->AddInputData(reslice->GetOutput());
                append1->Update();

image_paraxial = append1->GetOutput();

vtkNew<vtkResliceImageViewer> image_viewer_;

vtkNew<vtkGenericOpenGLRenderWindow> renderWindow;
                        SetRenderWindow(renderWindow);

                        image_viewer_->SetRenderWindow(renderWindow);
                        image_viewer_->SetupInteractor(renderWindow->GetInteractor());

                        //vtkSmartPointer<vtkImageData> image_data = vtkImageData::SafeDownCast(
                                //scene.get_volume()->GetMapper()->GetInputDataObject(0, 0));

                        image_viewer_->SetInputData(image_data);
                        image_viewer_->SetSliceOrientationToXY();
                        image_viewer_->SetSlice(1);
                        image_viewer_->SetResliceModeToAxisAligned();



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers