New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
point format in VTK coordinate system #156
Comments
The points to be transformed should be with the same origin from the image. |
@YuchuanQiao sorry it does not answer my question... the format is clear, it is written in the manual.
But, where are the origin and orientation? |
@kaspermarstal it may be good to add such information also here - SuperElastix/SimpleElastix#305 |
As I say "The points to be transformed should be with the same origin from the image." |
@YuchuanQiao sorry, but still I don't know what is the coordinates points in image, for example, four image corners (top-left, top-right, bottom-right, bottom-left) for an image with height 600px and width 800px...
Yes, there is a position of origin, but where is it in the image plane, where is the (0, 0) in centre, corner, which corner? and direction... is positive up, down is fist vertical o horizontal direction...? In my case the pixel and physical space should be the same, using the same units since I am using PNG images and there is no other information about the conversion... |
any idea? @stefanklein @N-Dekker @FBerendsen @kaspermarstal |
We use the ITK coordinate system, so the origin is in the lower left. Please see the manual, where we copied some information from the ITK guide on this matter. Does this help? |
@mstaring thank you, I think that I found it now and I will check it if it works for me... |
@mstaring it is strange because implementing this change does not help... Then I use the very same coordinate system as I have from the beginning and it gives expected transformed location... any idea why? (I used [row, column] and origin in the top left corner) |
Did you recreate the affine transformation model precisely the same? including center of rotation. The precise mechanism can be found in the source code |
I used the generated transformation produced by the |
Yes but if you do not use transformix for creating and executing the affine transformation, you have to be sure you are doing the exact same thing. (just looking for potential sources of bugs) |
I was running following two commands, for registration /home/jb/Applications/elastix/bin/elastix \
-f /home/jb/Dropbox/Workspace/BIRL/data_images/images/artificial_reference.jpg \
-m /home/jb/Dropbox/Workspace/BIRL/data_images/images/artificial_moving-affine.jpg \
-out /home/jb/Desktop/BmElastix_20190717-135929/1 \
-p /home/jb/Desktop/BmElastix_20190717-135929/elastix_affine.txt and transformation /home/jb/Applications/elastix/bin/transformix \
-tp /home/jb/Desktop/BmElastix_20190717-135929/1/TransformParameters.0.txt \
-out /home/jb/Desktop/BmElastix_20190717-135929/1 \
-in /home/jb/Dropbox/Workspace/BIRL/data_images/images/artificial_moving-affine.jpg \
-def /home/jb/Desktop/BmElastix_20190717-135929/1/artificial_reference.pts |
ok so you do use transformix, but the problem is how to define the pts file? |
reading above, you seem to know how to define the pts. Then I assume the problem is how to view the result. can you confirm? |
the origin etc are the same as that of the fixed image |
Ok, this is hard for me to debug from here. You are sure the registration went well? |
@mstaring you may run this script with default parameters to get the images/results I am showing here https://github.com/Borda/BIRL/blob/master/bm_experiments/bm_elastix.py |
Hello, I am experimenting with image registration and later on transforming/warping some points (see manual, sec 4.2). It says that the points are from VTK, but so far I was not able to warp my points properly probably due to a different coordinate system. Mine has origin [0, 0] in the top left corner of the image and increasing in direction to the bottom right corner... What is the VTK coordinate frame? Thx
@stefanklein @N-Dekker @FBerendsen @kaspermarstal ^^
The text was updated successfully, but these errors were encountered: