Hi Derek,

thanks, yes that comes close. I specified the matrix as a whole
(multiplied rotation and scaling), so I cannot separate them afterwards
(directly).

Testing this now, I came across an inconsistency, apparently: When
applying to some vector, they produce different results.

pdl> p $sp12,$rot12,$p12
[ 4.1666665  4.1666665 3]
[
 [ 0  0 -1]
 [ 1  0  0]
 [ 0 -1  0]
]
 [-54.315361 -138.68857  100.48426]

pdl> $x12=t_linear(matrix=>$sp12*$rot12,post=>$p12)
pdl> $x12b=t_linear(s=>$sp12,rot=>$rot12,post=>$p12)

pdl> p $x12b
Linear (linear): fwd ok; inv ok.
  Pre-add: 0
  Post-add: [-54.315361 -138.68857  100.48426]
  Forward matrix:
  [
   [ 0  0 -1]
   [ 1  0  0]
   [ 0 -1  0]
  ]
  Inverse matrix:
  [
   [ 0  1  0]
   [ 0  0 -1]
   [-1  0  0]
  ]
  

pdl> p $x12
Linear (linear): fwd ok; inv ok.
  Pre-add: 0
  Post-add: [-54.315361 -138.68857  100.48426]
  Forward matrix:
  [
   [         0          0         -3]
   [ 4.1666665          0          0]
   [         0 -4.1666665          0]
  ]
  Inverse matrix:
  [
   [          0  0.24000001           0]
   [         -0          -0 -0.24000001]
   [-0.33333333          -0          -0]
  ]


On 2017-01-12 17:26, Derek Lamb wrote:
> Hi Ingo,
>
> There aren't any specific methods, but transforms are just hash refs,
> so you can get at the internals easily.  In your case it sounds like
> you want something like this:
>
> $t=t_linear(s=>3,rot=>25,pre=>10)
> p keys %$t
> p values %$t
> p keys %{$t->{params}}
> p values %{$t->{params}}
>
>
> You'll get the rotation matrix, then, with $t->{params}->{matrix}.  It
> looks like this also folds in the scaling, as there is no separate
> scaling parameter (and in my example the diagonal entries are >1).
>  See the t_linear docs.
>
> cheers,
> Derek
>
>> On Jan 12, 2017, at 7:13 AM, Ingo Schmid <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hi Craig,
>>
>> is it possible to access parts of a e.g. linear transformation? I have
>> defined a map from world to pixel coordinates (or vice versa). This
>> object I store in the header of the image stack.
>>
>> In some cases now, I would like to access parts of the transformation,
>> like the rotation matrix or the scaling. As far as I can tell there are
>> no methods to access these parts of the transform object? I would like
>> to avoid having to store these parts separately if possible.
>>
>>
>> Ingo
>>
>> ------------------------------------------------------------------------------
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today. http://sdm.link/xeonphi
>> _______________________________________________
>> pdl-general mailing list
>> [email protected]
>> <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/pdl-general
>>
>

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to