[vtkusers] Rotation of a volume
Rhys Thomas
rgt at informatics.bangor.ac.uk
Wed Apr 26 11:05:29 EDT 2006
I am currently attempting to rotate and translate a volume stored as
vtkStructuredPoints using vtkVolume::PokeMatrix (I am using VC++ 6). The
matrix is a vtkMatrix4x4 that takes data from elsewhere in the program.
This arrangement worked well until I tried to add another prop to the
pipeline, a vtkActor containing a vtkSphereSource. The trouble that I am
now experiencing is that the volume is now not appearing in the centre
of the window, and seems to be rotating not about the centre of the
volume, but approximately about the bottom right corner. My pipeline is
set up as follows:
vtkRenderWindow<-vtkRenderer<-vtkVolume<-vtkVolumeMapper<-vtkStructuredPoints
|
vtkActor<-vtkPolyMapper<-vtkSphereSource
I have not fully implemented the transformation for the sphere, however
it too appears off centre in the window, and by a different amount to
the volume. The sphere is much smaller than the volume being displayed
(it has a radius of 1, compared to the volume of size 512x512x246,
although this may change). The volume and the sphere will eventually be
transformed by different transformations, and the sphere will probably
be replaced with another shape, the position of which will have to be
known relative to the co-ordinates of the volume.
Is there anything that can be done to rectify this situation? I have
attempted to set origins and set a camera position without success.
Thanks
Rhys Thomas
--
Gall y neges e-bost hon, ac unrhyw atodiadau a anfonwyd gyda hi,
gynnwys deunydd cyfrinachol ac wedi eu bwriadu i'w defnyddio'n unig
gan y sawl y cawsant eu cyfeirio ato (atynt). Os ydych wedi derbyn y
neges e-bost hon trwy gamgymeriad, rhowch wybod i'r anfonwr ar
unwaith a dilëwch y neges. Os na fwriadwyd anfon y neges atoch chi,
rhaid i chi beidio â defnyddio, cadw neu ddatgelu unrhyw wybodaeth a
gynhwysir ynddi. Mae unrhyw farn neu safbwynt yn eiddo i'r sawl a'i
hanfonodd yn unig ac nid yw o anghenraid yn cynrychioli barn
Prifysgol Cymru, Bangor. Nid yw Prifysgol Cymru, Bangor yn gwarantu
bod y neges e-bost hon neu unrhyw atodiadau yn rhydd rhag firysau neu
100% yn ddiogel. Oni bai fod hyn wedi ei ddatgan yn uniongyrchol yn
nhestun yr e-bost, nid bwriad y neges e-bost hon yw ffurfio contract
rhwymol - mae rhestr o lofnodwyr awdurdodedig ar gael o Swyddfa
Cyllid Prifysgol Cymru, Bangor. www.bangor.ac.uk
This email and any attachments may contain confidential material and
is solely for the use of the intended recipient(s). If you have
received this email in error, please notify the sender immediately
and delete this email. If you are not the intended recipient(s), you
must not use, retain or disclose any information contained in this
email. Any views or opinions are solely those of the sender and do
not necessarily represent those of the University of Wales, Bangor.
The University of Wales, Bangor does not guarantee that this email or
any attachments are free from viruses or 100% secure. Unless
expressly stated in the body of the text of the email, this email is
not intended to form a binding contract - a list of authorised
signatories is available from the University of Wales, Bangor Finance
Office. www.bangor.ac.uk
More information about the vtkusers
mailing list