# X axis reading in the wrong direction!

Hi fellow IJ-ers. Apologies to anyone who may recognise this problem - particularly Leandro, Scholz, Jan Eglinger and Rob lees, who really tried hard to make sense of my mindless rambling about this subject about 18 months ago. Since that time, my PhD has been interrupted by a whole bunch of issues including a house purchase, two new jobs and cancer.
Yes its been a busy old time for me.

Anyhow coming back to my problem I think I can be a bit more concise this time. The Electron Microprobe at Birkbeck, in London is Japanese meaning (awkwardly) that they place the origin fo0r coordinates in the TOP RIGHT of the slide. Added to this, we load the slide in to the probe in Portrait. I have been using IJ to mark my points of interest (for further EMP analysis) on a digital image having spotted them with my trusty Petrological microscope.

Simple process -

1. The image opens in landscape, which works well for me as my slides mount in landscape
2. I scale my image (the usual way)
3. I examine my slide and mark points of interest on the image using multipoint tool
4. I produce a set of results using analyse/measure
5. I fix these points as an image using Image/0verlay/add selection
6. I flip my image 90 degrees right
7. I come to the horrific realization that although my Y axis will read correctly in “Japanese mode” (i.e. as if the origin is in the top right), my X axis is still reading in “Western mode” (i.e. as if the origin is in the top left!!)
8. Rob Lees actually hit the nail on the head - If you’re going to read out the point coordinates that you place in the image using the multi-point tool, then output to excel (e.g. save the results as a .csv), i think using the current imagej coordinate system is fine. Just apply a mathematical operation on the coordinates before saving them, which would be the image width minus the x coordinate. Image of 1000-by-1000 pixels at position (650,100) would be (1000-650)=350 x, 100 y.
9. Aaannnd that’s my second problem… I have hardly picked up IJ in the last 18 months… Is there anyone who could help or instruct me on how to code a macro that will do just that?

Thanks guys. I hope someone can help. I look forward to and appreciate any help I can get.

Best wishes

AndyT