Convention for rows/columns in images??
PeterR
I am facing a confusing issue when handling pictures and treating them as 2D-waves.
Take the picture I attached as an example.
When I read out its information via "Browse Waves", I get that my picture has 82 rows and 115 columns. But this contradicts with the image plot?! (There it is the other way around)
When I am handling the image in procedures and functions, it also behaves like it has 82 rows and 115 columns.
But WHY is this and what can I do that the image plot truly resembles the 2D-wave??
Thanks a lot in advance!
Best regards,
Peter
June 16, 2014 at 05:43 am - Permalink
If you wanted your image matrix (e.g. M_Image) displayed to match the orientation that it would have in a table, you could use:
Appendimage M_Image
ModifyGraph swapXY=1
SetAxis/A/R left
Not sure if there is a one-liner for this….
June 16, 2014 at 05:53 am - Permalink
Well, it's really confusing, but now I know we have to live with that. :)
I will just rotate my image plots with the snippet provided by ChrLie and that should do it.
Thanks again!
June 16, 2014 at 06:12 am - Permalink
In the end tho, I found it was easier to just get used to it.
June 16, 2014 at 07:18 am - Permalink
It can be confusing, but it is a rational choice: Igor associates the rows dimension with x and the columns dimension with y. For example, think about the wave scaling dialog or the 'magical' "x" and "y" variables in wave assignments. To keep everything consistent Igor uses the x axis for rows, and the y axis for columns when displaying images.
I never swap x and y axes for image plots because it tends to lead to confusion. For the same reason I would suggest that you simply become used to Igor's convention instead.
June 17, 2014 at 02:39 am - Permalink