[vtkusers] how to change coordinate system from right to left-handed

Goodwin Lawlor goodwin.lawlor at ucd.ie
Tue Mar 23 20:59:31 EST 2004


Hi David,

Yes - you're absolutely right. For some reason though, vtkTransform has
a "Scale" method instead of a "SetScale".

So the pipeline would be (for an x axis flip):

vtkTransform trans
   trans Identity
   trans Scale -1 1 1

vtkTransformFilter transFilter
   transFilter SetInput RectilinearGrid
   transFilter SetTransform trans


Goodwin

Ps I switched back to the subject line I should have had...

-----Original Message-----
From: David.Pont at ForestResearch.co.nz
[mailto:David.Pont at ForestResearch.co.nz] 
Sent: 24 March 2004 00:48
To: goodwin.lawlor at ucd.ie
Cc: vetsch at vaw.baug.ethz.ch; vtkusers at vtk.org
Subject: Re: [vtkusers] RE: vtkusers digest, Vol 1 #2511 - 9 msgs



Hi,
   I think you can even omit the vtkMatrix4x4 and just use vtkTransform
SetScale, for example to flip the x axis:   -1, 1, 1

  Dave P



 

                      Goodwin Lawlor

                      <goodwin.lawlor at u        To:
vtkusers at vtk.org                                      
                      cd.ie>                   cc:
vetsch at vaw.baug.ethz.ch                               
                      Sent by:                 Subject:  [vtkusers] RE:
vtkusers digest, Vol 1 #2511 - 9 msgs  
                      vtkusers-admin at vt

                      k.org

 

 

                      24/03/2004 06:47

                      Please respond to

                      goodwin.lawlor

 

 





Hi David,

Flipping any single axis will convert from one coord system to the
other. The example below flips the x axis... See which "axis flipping"
works best for you.

Here's a tcl example of what you what:

vtkMatrix4x4 matrix
             matrix Identity
             #Flip the x-axis
             matrix SetElement 0 0 -1.0
             #Flip the y-axis
             #matrix SetElement 1 1 -1.0
             #Flip the z-axis
             #matrix SetElement 2 2 -1.0

vtkTransform trans
             trans SetMatrix matrix

vtkTransformFilter transFilter
             transFilter SetInput RectilinearGrid
             transFilter SetTransform trans

--__--__--

Message: 4
Date: Tue, 23 Mar 2004 14:35:57 +0100
From: Vetsch David <vetsch at vaw.baug.ethz.ch>
Reply-To: vetsch at vaw.baug.ethz.ch
Organization: VAW ETHZ
To: vtkusers at vtk.org
Subject: [vtkusers] how to change coordinate system from right to
left-handed

Hi,
I got RectilinearGrid data from a CFD solver with a left-handed
coordinate system. I tried out a lot of things in VTK but didn't manage
to change the data or the basic coordinate system to a right-handed one
(it needs mirroring). Does anybody know how to do that (..in a simple
way)?

--
 David Vetsch
 Applied Numerics Division
 Laboratory of Hydraulics, Hydrology and Glaciology
 ETH-Zentrum
 CH-8092 Zurich
 Switzerland

 phone:    +41 1 632 41 04
 fax:      +41 1 632 11 92
 email:    vetsch at vaw.baug.ethz.ch

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <
http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

_








More information about the vtkusers mailing list