[vtkusers] problems with vtkCamera
John Drescher
drescherjm at gmail.com
Sat Mar 10 22:18:25 EST 2012
On Tue, Mar 6, 2012 at 9:49 AM, Brenno Ribeiro <brennobr at gmail.com> wrote:
> I'm trying so see a dicom image using vtkCamera but i'm having the following
> problems:
> - I needed to correct the position of the image that was showed by the
> camera rotating from the axes x and y. To do it i used "cam->SetViewUp(0,
> -1, 0);" and "cam->Azimuth(180);" and i got my goal but the problem is that
> i only can see the right form after an interaction from the window from the
> image or clicking in it or going to other window and go back to the image.
> Why it?
I would use
cam->setViewUp(-1,-1,0);
Or at least that worked with the lung ct slice that I picked. When you
click in this window the image gets rotated. The reason is this is the
default behavior of the default window interactor. I usually override
vtkInteractorStyleImage and disable the features I do not want.
John
> - To correct the colors of the image i used the RescaleFilterType. It works
> very well without the camera but if i use the camera the filter it doesn't
> work and i have only some lines that are forming the image. Why?
>
You do not seem to be displaying the dicom image with the code you
posted. You are displaying the result of your contour filter but not
the input image.
John
More information about the vtkusers
mailing list