[vtkusers] Re: vtkImageActor and vtkImageReslice
Pankaj Daga
deluded.soul at gmail.com
Thu Oct 12 12:45:02 EDT 2006
Hi again,
I did a bit more digging around in the vtkImageActor structure in my app and
found out that when I set up the reslicer myself, the display bounds that is
reported by the vtkImageActor is wrong. The display extent is ok, but the
bounds are wrong.
I think this might be the problem. Can someone tell me how I can fix this?
Is there something else in the reslicer that I have to set. I have set the
origin, spacing and extents... the actor should be able to calculate the
bounds from this, right?
Looking forward to a little help here.
Best regards,
Pankaj
On 10/12/06, Pankaj Daga <deluded.soul at gmail.com> wrote:
>
> Hello again,
>
> Sorry to clutter the list but I keep discovering new things:
>
> It seems that it is because of the way I have set up my reslicer. Let me
> first list what is happening.
>
> I can get it to show me the slice in axial plane if I just call
> SetOutputDimensionality() and not do the output origin, output extent and
> output spacing myself. Then all I have to do is set the camera parameters
> correctly and the slice shows. I have had no luck with viewing the sagittal
> and coronal planes. It seems that I might have to permute the reslice axes
> matrix of my reslicer before I set it as the transform matrix of the
> vtkImageActor. Can someone please confirm if this is correct?
>
> Now, I have the reslicer set up really the way I want it. Is there some
> way that I can position the vtkImageActor to the position that the reslicer
> is set at. I thought just setting the SetUserMatrix() should have done the
> trick, but it seems that if you set up the output params yourself on the
> reslicer, you are in a bit of soup.
>
> I do hope someone can help me here.
>
> Best regards,
>
> Pankaj
>
>
>
>
>
> On 10/12/06, Pankaj Daga < deluded.soul at gmail.com> wrote:
> >
> > Hi again,
> >
> > By the way, I already have called the SetUserMatrix on the image actor
> > to match that of my reslicer but it really does not show the whole image...
> >
> > So, when I set the slice then I do the following:
> >
> > case AXIAL:
> > sliceMan->SetResliceAxesOrigin(0, 0, origin[2] + num *
> > spacing[2]);
> > imageAct->SetUserMatrix(sliceMan->GetResliceAxes());
> > break;
> >
> > Bizarre though...only see a small part of the image. I guess there is something else missing here... Any pointers, experts?
> >
> > Best regards,
> > Pankaj
> >
> >
> > On 10/12/06, Pankaj Daga <deluded.soul at gmail.com> wrote:
> > >
> > > Hiya,
> > >
> > > I have a vtkImageReslice that is giving me 2D slices. The slices are
> > > shown correctly using a simple 2D actor but when I try to visualize it using
> > > vtkImageActor I only see like a small part of the image (a bit of the lower
> > > left corner).
> > >
> > > Just for test I viewed it using a vtkActor2D and everything seems ok
> > > and it shows correctly at the correct position on the screen and with the
> > > correct spacing etc. I would rather not change much there.... What is the
> > > best way to get it to work with a vtkImageActor.
> > >
> > > Thanks and best regards,
> > >
> > > Pankaj
> > >
> > >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061012/176e699d/attachment.htm>
More information about the vtkusers
mailing list