[Paraview-developers] Affine transformations in Paraview 5.0.0

Hallock, Kevin Kevin.Hallock at pfizer.com
Mon Apr 25 13:10:11 EDT 2016


Do you know the order in which the transformations are applied? Is scaling applied before translation?  If I apply a –1 scaling to x, does that reflect the points across the y-z plane?

Thanks,

Kevin

From: "Moreland, Kenneth" <kmorel at sandia.gov<mailto:kmorel at sandia.gov>>
Date: Monday, April 25, 2016 at 12:30 PM
To: Kevin Hallock <Kevin.Hallock at pfizer.com<mailto:Kevin.Hallock at pfizer.com>>, "paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>" <paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>>
Subject: Re: [Paraview-developers] Affine transformations in Paraview 5.0.0

Kevin,

You could try the Transform filter. The interface is similar to the transform options in properties, but the results are more stable.

You can also run the Image Data to Point Set filter to convert to a curvilinear grid and then run the calculator filter with the Coordinate Results option checked and an equation for the transformation set as the expression.

-Ken


From: Paraview-developers <paraview-developers-bounces at paraview.org<mailto:paraview-developers-bounces at paraview.org>> on behalf of "Hallock, Kevin" <Kevin.Hallock at pfizer.com<mailto:Kevin.Hallock at pfizer.com>>
Date: Monday, April 25, 2016 at 9:41 AM
To: "paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>" <paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>>
Subject: [EXTERNAL] [Paraview-developers] Affine transformations in Paraview 5.0.0

Hi,

I am trying to display PLY objects that were created from NIFTI files and I know in other software (DSI Studio) the NIFTI images are co-registered by using the header information in the NIFTI file. The matrices that contain the co-registration information of the two brain atlases are:

AATG atlas

srow_x  [-1,0,0,78]
srow_y  [0,-1,0,76]
srow_z  [0,0,1,-50]

MNI atlas

srow_x  [-1,0,0,90]
srow_y  [0,1,0,-126]
srow_z  [0,0,1,-72]


These transforms are supposed to be applied in the following way:


The (x,y,z) coordinates are given by a general affine transformation
   of the (i,j,k) indexes:

     x = srow_x<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref0&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=8qiMwHuGuspszWC8U6jndR8f_wqrw01BeIg9ByV_zrQ&e=>[0]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref0&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=8qiMwHuGuspszWC8U6jndR8f_wqrw01BeIg9ByV_zrQ&e=> * i + srow_x<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref1&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=--VM2xNOdZQUbrBULCtT3eMeBMtec-ZbEXjT0R2n38E&e=>[1]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref1&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=--VM2xNOdZQUbrBULCtT3eMeBMtec-ZbEXjT0R2n38E&e=> * j + srow_x<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref2&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=ewkQWpxdLwjTbSdljZDOkh62TRnOMoGB5c6R6OroyGk&e=>[2]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref2&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=ewkQWpxdLwjTbSdljZDOkh62TRnOMoGB5c6R6OroyGk&e=> * k + srow_x<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref3&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=WNBkIFXxHNTTWbQv5TwlxO_6B3KYmpUZIl-D_VbN5ao&e=>[3]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref3&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=WNBkIFXxHNTTWbQv5TwlxO_6B3KYmpUZIl-D_VbN5ao&e=>

     y = srow_y<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref0&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=8qiMwHuGuspszWC8U6jndR8f_wqrw01BeIg9ByV_zrQ&e=>[0]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref0&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=8qiMwHuGuspszWC8U6jndR8f_wqrw01BeIg9ByV_zrQ&e=> * i + srow_y<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref1&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=--VM2xNOdZQUbrBULCtT3eMeBMtec-ZbEXjT0R2n38E&e=>[1]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref1&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=--VM2xNOdZQUbrBULCtT3eMeBMtec-ZbEXjT0R2n38E&e=> * j + srow_y<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref2&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=ewkQWpxdLwjTbSdljZDOkh62TRnOMoGB5c6R6OroyGk&e=>[2]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref2&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=ewkQWpxdLwjTbSdljZDOkh62TRnOMoGB5c6R6OroyGk&e=> * k + srow_y<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref3&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=WNBkIFXxHNTTWbQv5TwlxO_6B3KYmpUZIl-D_VbN5ao&e=>[3]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref3&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=WNBkIFXxHNTTWbQv5TwlxO_6B3KYmpUZIl-D_VbN5ao&e=>

     z = srow_z<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref0&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=8qiMwHuGuspszWC8U6jndR8f_wqrw01BeIg9ByV_zrQ&e=>[0]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref0&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=8qiMwHuGuspszWC8U6jndR8f_wqrw01BeIg9ByV_zrQ&e=> * i + srow_z<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref1&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=--VM2xNOdZQUbrBULCtT3eMeBMtec-ZbEXjT0R2n38E&e=>[1]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref1&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=--VM2xNOdZQUbrBULCtT3eMeBMtec-ZbEXjT0R2n38E&e=> * j + srow_z<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref2&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=ewkQWpxdLwjTbSdljZDOkh62TRnOMoGB5c6R6OroyGk&e=>[2]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref2&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=ewkQWpxdLwjTbSdljZDOkh62TRnOMoGB5c6R6OroyGk&e=> * k + srow_z<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref3&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=WNBkIFXxHNTTWbQv5TwlxO_6B3KYmpUZIl-D_VbN5ao&e=>[3]<https://urldefense.proofpoint.com/v2/url?u=http-3A__nifti.nimh.nih.gov_nifti-2D1_documentation_nifti1fields_nifti1fields-5Fpages_qsform.html-23ref3&d=CwMGaQ&c=UE1eNsedaKncO0Yl_u8bfw&r=qGFCsM9Qjq3aeVt5MRS91N125WRsKH5G5-a71j341EM&m=nCAPtkMpChMosemZqDfuQDaLyfoPS72_wwr4zlM-Cfs&s=WNBkIFXxHNTTWbQv5TwlxO_6B3KYmpUZIl-D_VbN5ao&e=>

I thought I would be able to co-register them by applying the above information via the Transform option under Properties, but the result appears to be missing at least one rotation so I am wondering if there is another way to do the affine transformation.

Thanks,

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160425/cedfd048/attachment-0001.html>


More information about the Paraview-developers mailing list