Probe Software Users Forum

Software => Probe for EPMA Utilities => Topic started by: John Donovan on September 17, 2014, 04:53:13 pm

Title: Automated Mosaic Imaging (using Stage.exe)
Post by: John Donovan on September 17, 2014, 04:53:13 pm
I have just uploaded the latest automated mosaic feature for PFE. Right now you can easily digitize and acquire an array of sub images to cover a specified area on your sample. We are working on a final step to automatically mosaic all the acquired images but there are two solutions now (using the stage coordinates), and a number of shareware products that match if the sub image overlap is sufficient.

In the meantime here is the mosaic feature which is entirely usable.

To begin, start the Stage.exe application by clicking the Stage menu in the Windows "Start" button Probe Software menu. JEOL 8230/8530 users please remember that only one application that connects to the instrument can be open at a time! Then once Stage.exe is up, click on the Mosaic button in the Digitize! window as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi57.tinypic.com%2F293dpj8.jpg&hash=fe184eeca0d89b387d84ce57ed3d5bc1)

Then follow the steps to select the appropriate stage map, the mosaic magnification for the sub images and the extent of the total mosaic area as seen above. Next utilize the "toggle" tool to turn on or off specific sub images where you do not want to acquire a sub image as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi57.tinypic.com%2Fdce8bb.jpg&hash=e55b5086b2a2467b065d82792ab8d766)

Finally specify the percent overlap and then click the Digitize Mosaic button to record the sub image positions to the position database as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi60.tinypic.com%2Fhwnac8.jpg&hash=af3566534d5f25bb7c0c31b08c01fa60)

Optionally one may plot the sub image positions to confirm as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi62.tinypic.com%2F6oj3eo.jpg&hash=9d6bba832a5b1396fd8bb0b376e744fe)

Lastly, check the Confirm All Positions In Sample and Acquire Images With Confirm checkboxes and click the Confirm Positions buttons to start the sub image acquisition. Note that auto-focus may be specified if necessary as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi59.tinypic.com%2F2isuxhk.jpg&hash=86260f1e2369964be40ad73188299674)
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: John Donovan on September 17, 2014, 04:57:33 pm
As I mentioned in the previous post, we are working on a method to fully automate the mosaic operation of concatenating all the sub images together as a single large GRD file for further processing, but in the meantime there are two methods that will work with a small amount of effort.

1. Utilize the manual Mosaic feature in Probe Image as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi62.tinypic.com%2F10fdgnc.jpg&hash=bab632181b42cb2c1a93172b6e4edd4b)

2. Utilize the Grid Mosaic feature in Surfer as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi59.tinypic.com%2F281ratx.jpg&hash=1ef0c150337217066c4c1920af1ae67a)

There are also some freeware imaging packages that will mosaic based on overlapped images, but the above method will work even for images with zero overlap.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on September 17, 2014, 05:05:39 pm
Here are some instructions from Sabrina Pearson from Golden Software on utilizing the Grid Mosaic feature in Surfer. There is also apparently a script for doing this though I haven't had time to check it out!

You can use the Grid | Mosaic command with all of the grids in a single directory. This is actually a pretty quick process to select all of the grids using the dialog. Here are the steps I would use:

1. In Surfer 12, click the Grid | Mosaic command.
2. In the Open Grid(s) dialog, navigate to the desired directory.
3. Click on the first grid file. Hold down the SHIFT key and click on the last grid file.
4. Click Open.
5. Set any options in the Grid Mosaic dialog and click OK. A new grid is created with all of the mosaicked grids.

You will most likely want to set the # of Nodes in both the X and Y direction. I would recommend setting this to a value less than 10,000, but you can set it up to 2,147,483,647 rows and columns. You will likely run out of memory before hitting that maximum number of rows and columns.

There is a GridMosaic scripter command available. This allows you to read the grids in from an array. You could populate the array using all of the grid file names in a directory. I recommend taking a look at the example in the Surfer help. Click Help | Contents in Surfer 12. Then, click the + next to Surfer Automation and + next to List of Methods and Properties. Click on the GridMosaic page. You can use this in combination with a loop.

There is a recent example of something similar to this on our blog at

http://www.goldensoftware.com/blog/scripter-example-read-all-data-files-in-directory.

Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: John Donovan on September 19, 2014, 12:32:14 pm
OK, I tweaked the interface some more as you will see, but the cool thing is that in addition to loading a stage map for mosaic imaging, one can now also load any calibrated image (currently just the two point calibration, soon both the 2 point and three point calibrations) from any source (e.g., a BSE image or thin section slide scanner),  for use as a "basemap" for selecting the mosaic area and the sub images using the new Browse button as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi58.tinypic.com%2F4lmtyu.jpg&hash=610b33c4eb5f2d00d7704f3c43eede7d)

As you can see, it loads the image in the correct position and size, but now you might say, John: I can't easily see all the sub images for deselection...  ok, so now one can also load the the specified image full size using the Load Full Size checkbox as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi57.tinypic.com%2F161klqo.jpg&hash=a0b255c721e992226530d7e833d9948b)

Now it is easy to select or deselect specific sub images based on the actual sample as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi61.tinypic.com%2F9k9zcg.jpg&hash=0252a2b368ca14829369e217a2f5584b)
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on September 19, 2014, 01:10:18 pm
Here are the two steps (as attached images) for automatically mosaicing the GRD files acquired in Stage using the Grid | Grid Mosaic menu in Surfer...

It is nice that one can select all the files in the folder to mosaic...
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on September 22, 2014, 09:57:11 pm
Here's a new feature...

When you load an image by default it is displayed on the stage map as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi58.tinypic.com%2F13zzrc8.jpg&hash=54987fd43714481281938bbb882c434c)

Then by loading the image with the Full Size checkbox checked, the mosaic area is automatically moved to the image center and the mosaic sub images are automatically resized for the areal extent of the loaded image as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi59.tinypic.com%2F2d9nqr8.jpg&hash=55b9dee66373fd7845e74758b4f72481)
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on September 29, 2014, 03:44:31 pm
Ok, I ran a short test of the mosaic imaging today- we decided it would be a good thing to have mosaics of all the standard blocks in their default positions for the Stage Map window!

So here is a partial mosaic image of one of our standard blocks at 15 keV, BSE signal and 144 x sub image mag, because in the full size image one can't make out the pixel mismatch from the image calibration.

Which by the way, was not performed prior to the image acquisitions. In fact it is a large extrapolation from the 400x image calibration I usually use. Note that I am also currently working on an automatic image calibration using a stage and beam scanned images.  The nice thing is that since PFE now supports multiple calibrations for both keV and mag, one can really dial in the image alignment accuracy.

Anyway, you can see in the image attached below that the alignment is excellent even extrapolating from 400x to 144x.

Also these sub images (512 x 384) were acquired with zero percent overlap. So by adjusting that slightly one could eliminate the 1 pixel gaps without having to improve the image beam scan calibration.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on September 29, 2014, 04:20:19 pm
OK, here is the Surfer Grid | Mosaic menu for importing the GRD files to mosaic. I simply clicked <ctrl> a to select all GRD files (97 of them) and clicked OK. The screen shows the position of each sub image in your mosiac:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi58.tinypic.com%2F2aj8hnl.jpg&hash=5fa36da156bf966271db5da8d2add725)

The complete mosaic performed in Surfer is attached below.

Remember: you need to be logged in as a member to see attachments!



Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on October 01, 2014, 04:31:26 pm
Another example I did to test the calibration with zero percent overlap at 2500x for each sub image (again extrapolated from a 400x calibration set), but this time in "school colors"!

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi59.tinypic.com%2F24wecuq.jpg&hash=17af52766a061f5e521a192b537afe8f)

Attached below is an example in more contrasting colors.

Remember to login to see attachments!
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on October 02, 2014, 06:59:04 pm
If one zooms in on the mosaic, it can be seen that with zero percent overlap, depending on the sub image, the pixel gaps are variously 0, 1 or 2 pixels wide:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi59.tinypic.com%2F2ykkxzp.jpg&hash=d467df843979a3cc4dacfb32f45e1e11)

I also can detect some "negative" pixel gaps (a kind of overlap) that might be a few pixels wide also.

However this is from a two year old beam scan calibration extrapolated from 400x to 2500x.  I will post more examples after I perform a recalibration of the magnification.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Karsten Goemann on October 05, 2014, 06:42:55 pm
Hi John,

I just tried this on our SX100. Set up and acquisition work fine. But, maybe a stupid question, where are the images stored? I haven't used the Stage application much.

It would also be good to be able to read stage positions for the corners from the instrument rather than just having to click into the stage map window.

I also have a problem with importing scanned images into the window. The scanned image overlay on top of the holder image is too narrow. Is it possible it is using the reference positions I used to calibrate the image as the image "corners"? They were in fact not in the corners. I've attached a screenshot with an example.



Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on October 05, 2014, 07:05:56 pm
I just tried this on our SX100. Set up and acquisition work fine. But, maybe a stupid question, where are the images stored? I haven't used the Stage application much.

Good questions.  The images are automatically stored in the UserImages\Mosaics folder.

In fact this is shown in the Stage log window as seen here:

MosaicSaveImage: Created new folder C:\UserImages\Mosaics\Mosaic Image
MosaicSaveImage: Created new folder C:\UserImages\Mosaics\Mosaic Image\Mosaic Image_10_5_2014 7;06;58 PM
MosaicImageAutomate: image saved: C:\UserImages\Mosaics\Mosaic Image\Mosaic Image_10_5_2014 7;06;58 PM\Mosaic Image_00001
MosaicImageAutomate: image saved: C:\UserImages\Mosaics\Mosaic Image\Mosaic Image_10_5_2014 7;06;58 PM\Mosaic Image_00002
MosaicImageAutomate: image saved: C:\UserImages\Mosaics\Mosaic Image\Mosaic Image_10_5_2014 7;06;58 PM\Mosaic Image_00003


It would also be good to be able to read stage positions for the corners from the instrument rather than just having to click into the stage map window.

You are correct, but I was having trouble with the code so I left it as it is for now.  But I will implement this soon.

I also have a problem with importing scanned images into the window. The scanned image overlay on top of the holder image is too narrow. Is it possible it is using the reference positions I used to calibrate the image as the image "corners"? They were in fact not in the corners. I've attached a screenshot with an example.

Ok, good catch. This I will fix. Until then please just use images that are "corner referenced".

Also, eventually, I will implement 3 fiducial references to handle changes in Z.   8)
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Karsten Goemann on October 05, 2014, 09:27:36 pm
OK, I've found them and loaded them into Surfer to generate a mosaic .GRD which I've opened in Surfer again. How can I export it from there as an Image file? The export function is currently greyed out.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Karsten Goemann on October 05, 2014, 11:19:44 pm
I've also tried concatenate in ProbeImage. It seems I have to load the .GRD files so that it recognises the position registration. Is there a way to import them all at once? So far I've only found how to import them one by one, so I just imported the first two frames. When I then try to use the concatenate function, Probe Image crashes ("has encountered a problem and needs to close"). This is using Probe Image 1.1.0.1867.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on October 06, 2014, 08:35:07 am
I've also tried concatenate in ProbeImage. It seems I have to load the .GRD files so that it recognises the position registration. Is there a way to import them all at once? So far I've only found how to import them one by one, so I just imported the first two frames. When I then try to use the concatenate function, Probe Image crashes ("has encountered a problem and needs to close"). This is using Probe Image 1.1.0.1867.

Yes, Brian is aware there is a bug when trying to concatenate GRD files in Probe Image and is working on that. He is also adding GRD files to the "drag and drop" function and also adding a menu item to "Open All Files In Folder" menu.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on October 06, 2014, 08:35:51 am
OK, I've found them and loaded them into Surfer to generate a mosaic .GRD which I've opened in Surfer again. How can I export it from there as an Image file? The export function is currently greyed out.

Simply click the Map | New | Image Map menus and select the output GRD file you just created.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Karsten Goemann on October 06, 2014, 02:54:52 pm
Thanks, that worked great!
Is there a simple way to export the mosaic from Surfer in "original" resolution, i.e. maintaining the original pixel size without recalculation?
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on October 06, 2014, 04:20:13 pm
Thanks, that worked great!
Is there a simple way to export the mosaic from Surfer in "original" resolution, i.e. maintaining the original pixel size without recalculation?

Did you try the File | Export menu? 

The default for the mosaic I exported was originally some 4000 pixels square but I reduced it to make a smaller file size, though you can just use the suggested resolution. Remember in Surfer, the graphs are all vector objects so the pixel size of the export is arbitrary.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Karsten Goemann on October 06, 2014, 04:43:01 pm
Yes, I tried File | Export but the suggested export resolution in there was much lower than the actual image resolution. It will be very difficult to calculate the actual resolution manually.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on October 06, 2014, 05:08:31 pm
Yes, I tried File | Export but the suggested export resolution in there was much lower than the actual image resolution. It will be very difficult to calculate the actual resolution manually.

Ok, I see.  So you would like to determine the acquisition pixel size in Surfer "page units"?   This does sound difficult.  I could ask Golden Software if there is a function to determine this (I think there must be).

But in the meantime I would just keep increasing the pixel export size until you see the actual acquisition pixels in the exported jpg file.

For example this zoom from my mosaic at 8192 x 8499 pixels:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi57.tinypic.com%2F34pbac9.jpg&hash=cb1aef4104854c2721f65d1490f5b921)

Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Karsten Goemann on October 06, 2014, 06:00:53 pm
Thanks John, I basically just want a 1:1 acquired to exported pixel resolution, i.e. no mathematical operations performed on the pixels. Basically raw data but stitched to a mosaic. "Binning", e.g. combining 4 (2x2) acquired pixels into 1 would be OK, but only integer numbers for resolution reduction.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on October 06, 2014, 06:42:44 pm
Thanks John, I basically just want a 1:1 acquired to exported pixel resolution, i.e. no mathematical operations performed on the pixels. Basically raw data but stitched to a mosaic. "Binning", e.g. combining 4 (2x2) acquired pixels into 1 would be OK, but only integer numbers for resolution reduction.

The GRD file from the mosaic operation in Surfer contains exactly that information. No more, no less.

Try playing with the output grid in Surfer and see what you can find. There is also an ASCII output.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Karsten Goemann on October 06, 2014, 06:57:57 pm
OK, thanks, I will. If Surfer can't do it maybe I can import the output.GRD into ImageJ or something. A direct 1:1 .GRD to .TIFF conversion would be nice.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: John Donovan on October 09, 2014, 10:16:38 pm
Hi Karsten.
OK, I fixed the "non-corner" image calibration issue. Actually I did more than that- now the mosaic feature will work with any type of calibration file: 2 points, 3 points, corner or non-corner...

Here's the file you sent loaded as an image (note the sub image horizontal field width field):

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi62.tinypic.com%2Feqp7p3.jpg&hash=bf623db6c743bda92d6a9eacaa4f3268)

And here it is loaded as a sub image with the default mosaic loaded (not that anyone would actually mosaic their entire sample holder!):

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi61.tinypic.com%2F2i0t1qq.jpg&hash=f353d6e36cea914876eef563eb23353b)

Next I'll implement a z-tilt correction for the mosaic acquisition, though for SE and BSE imaging it isn't really necessary.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: John Donovan on October 10, 2014, 09:19:35 am
Of course the same is true of JEOL instruments (even though everything is "anti-Cartesian"!).   ;)

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi57.tinypic.com%2F20068gm.jpg&hash=228bcabcf9773e4e44a22118675d258a)

In fact now the software moves the stage to your image and automatically rescales the magnification automatically starting with the lowest magnification:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi61.tinypic.com%2F2luorb7.jpg&hash=65bdbd0b907da5684e63b289bdcbb1b0)

Of course then you can manually adjust the mag if desired:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi59.tinypic.com%2F2ceiu1c.jpg&hash=eb89fe1a1c7b6e9f17d17f0f334f8e2b)
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Probeman on October 10, 2014, 09:24:16 am
In fact, if anyone would like these full size scanned sample holder jpgs shown in the above posts, the JEOL one is from Ma Chi at Cal Tech and the Cameca one is from Karsten Goemann at Hobart.

They are attached below (remember: you have to be logged in as a member to see attachments!).

Finally, in addition the program now automatically moves to the proper Z stage position if using a three point calibrated image and it is loaded "full size".   8)
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: John Donovan on November 16, 2014, 10:28:07 am
Has anyone tried to mosaic the sub images together by using the Overlap parameter and an "image stitching" software package (as opposed to relying on the PFE image beam scan calibration)?  There are many free packages out there but I have not tried any of them:

http://en.wikipedia.org/wiki/Comparison_of_photo_stitching_software

Anyway, if you do want to try this, here is the overlap set to 5%:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi57.tinypic.com%2F10cw3s9.jpg&hash=2cbdb3dd5ee0f1ec236c2bcf13a2e619)


Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: John Donovan on September 14, 2015, 02:49:32 pm
Note that the Stage application was designed for confirming positions only, not acquisition. The Conditions, Sample Setups, File Setups buttons are for assignments only.

Now one might reasonably ask: why then is it there?  And the answer is: some people like to digitize off-line on an optical microscope and also do the condition/sample assignments off-line.

However, for image/mosaic acquisition in Stage, just set the instrument conditions in PFE or on the instrument console.  You can also use the Use Auto Brightness/Contrast checkbox to help compensate for variation in samples.
Title: Re: Automated Mosaic Imaging (using PFE Stage.exe)
Post by: Gseward on November 29, 2015, 01:36:17 pm
I've also tried concatenate in ProbeImage. It seems I have to load the .GRD files so that it recognises the position registration. Is there a way to import them all at once? So far I've only found how to import them one by one, so I just imported the first two frames. When I then try to use the concatenate function, Probe Image crashes ("has encountered a problem and needs to close"). This is using Probe Image 1.1.0.1867.

Yes, Brian is aware there is a bug when trying to concatenate GRD files in Probe Image and is working on that. He is also adding GRD files to the "drag and drop" function and also adding a menu item to "Open All Files In Folder" menu.

this bug is still present. I  observe that images in x will mosaic, but as soon as I add the next row and try to mosaic (i.e. increment in Y) the program crashes.
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: John Donovan on December 01, 2015, 09:23:20 am
Following suggestions from Anette and Gareth I added a new button in the Stage mosaic imaging window as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%2Fsmf%2Foldpics%2Fi65.tinypic.com%2Fa729k.jpg&hash=cba7ec8f07e0805182c13deae3e83b98)

This will be very useful to specify the imaging parameters for the mosaic acquisition and also acquire a few single test images for getting the brightness and contrast *just right*.
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Probeman on September 27, 2016, 11:22:35 am
I recently ran a BSE stage beam mosaic on one of my standard blocks, first with zero overlap between the sub-images and second, with a 1% overlap between the sub images.  Here is the mosaic dialog in the Stage application:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%3A80%2Fsmf%2Fgallery%2F395_27_09_16_10_50_40.png&hash=0d86654b2ef05ee7ecf111e06ad32b35)

And this is the digitized image centers after clicking the Digitize Mosaic button:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%3A80%2Fsmf%2Fgallery%2F395_27_09_16_10_51_02.png&hash=b8034c1ea9395281b8b42f784d3061e1)

The reduced size mosaics are attached below (remember you need to be logged in to see attachments), but here is a closeup on a couple of standards that have two sub images overlapping:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%3A80%2Fsmf%2Fgallery%2F395_27_09_16_10_51_19.png&hash=c6221de20b1f07e3af7f98e9fc70bf9f)

Even though "ground mode" was selected in the Beam dialog of PeakSight there is still some change in BSE signal that apparently cannot be stabilized.  If anyone has any suggestions on to to force the BSE detector to not change its intensity response when performing multiple beam scan acquisitions, please let me know!

The beam scan calibration utilized in this mosaic is described in this topic, though the sub image magnifications used in the mosaics were around 150x to 180x, while the lowest beam scan calibration magnification defined was 334x:

http://probesoftware.com/smf/index.php?topic=396.0
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: John Donovan on June 27, 2017, 10:22:50 pm
I made some improvements to the mosaic feature in Stage based on suggestions from Paul Carpenter:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%3A80%2Fsmf%2Fgallery%2F1_27_06_17_10_17_00.png&hash=0784a3c04131bcc920e1907aaf9d0410)

1. Add mouse cursor stage coordinates to the window caption.

2. A new checkbox to "lock" the mosaic grid to the current position. Useful when wanting to move to each corner to focus the z stage,

3. A new button to reset all four corner Z positions all to the current Z stage position value.

4. Display of the number of mosaic "sub-images" to be digitized/acquired.

Please update your PFE, try it out, and let me know what else you need for your mosaic acquisition needs.
john
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: John Donovan on June 30, 2017, 09:28:05 am
The latest release of Probe for EPMA has further improvements to the Stage.exe mosaic feature, including display of the number of columns and rows of the grid as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%3A80%2Fsmf%2Fgallery%2F1_30_06_17_9_21_07.png&hash=f3bd5a5d5c09f65366b1e0b6e951cb17)

Note that if you utilize the sub image toggle feature in the Stage Mosaic window to turn off sub images that are not of interest (areas of epoxy, etc.), you cannot use the ImageJ stitch plugin and will need to use the Grid | Mosaic menu in Surfer to mosaic your GRD files.  Well, there appears to be a feature for that plugin to define the row, column order of the sub images, but that would be extra work.
john
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: glennpoirier on July 10, 2017, 05:43:06 am
Hi all,
I'm having a brain fart, how do I get Surfer to output a bitmap image of my mosaic GRD file? I'm sure I've done it before but I can't remember exactly how I did it.Thanks
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Probeman on July 10, 2017, 08:24:31 am
Hi all,
I'm having a brain fart, how do I get Surfer to output a bitmap image of my mosaic GRD file? I'm sure I've done it before but I can't remember exactly how I did it.Thanks

Hi Glenn,
Use the File | Export menu. Then select the image type (.jpg. .png, etc.), then select the pixel resolution.
john
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: glennpoirier on July 12, 2017, 11:56:18 am
Hi John,
When I open the GRD image in Surfer I don't get an Export command in the File window. Am i missing something else?

Thanks

Glenn
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Probeman on July 12, 2017, 12:02:25 pm
Hi John,
When I open the GRD image in Surfer I don't get an Export command in the File window. Am i missing something else?

Thanks

Glenn

Hi Glenn,
Ah, OK.

Yes, you do not need to open the mosaic GRD file in Surfer. Instead once you "mosaic" the GRD files, you need to use the Map | New | Image Map menu, and then select "mosaiced" GRD file you want to display.  Then you should be able to use the Export menu to create a JPG, BMP, etc. file.
john
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: glennpoirier on July 14, 2017, 12:25:19 pm
Aha!
Thanks I know there was missing step.
Cheers
Glenn
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Probeman on September 18, 2017, 04:44:15 pm
I've been working with a geology student, Marisa Acosta, using the Stage app to acquire automated mosaic images in CL and BSE.

Here is a CL scan of a petrographic thin section originally scanned at 400x (512 x 512 pixel sub images) which comes to over 20,000 pixels wide!   The final image was mosaiced in Surfer using the Grid | Mosaic menu.

The attached image below is subsampled at much lower resolution, but you get the idea...

Paul Carpenter and I are still working to improve the mosaic feature in Stage, but it produces very high resolution large area maps with very little effort.
john
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Probeman on October 03, 2017, 12:45:48 pm
We ran some additional thin sections using the mosaic feature in Stage, for both BSE and CL and are now using these as "base maps" for planning our trace element analyses.  The original mosaics are over 1300 sub images and over 20K pixels wide.

The images attached below (please login to see attachments) are rescaled to 2048 pixels wide.
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: BenjaminWade on October 03, 2017, 10:34:01 pm
Hey John
That is a really nifty feature. I admit I don't utilise the Stage mapping feature yet but definitely one to add to the list.
I have a quick questions off-topic about your CL detector/settings. What is the sample you are mapping here that is luminescing. I have the Panchromatic CL that comes with the Cameca SXFive, but have found it to be very insensitive. Unless I am trying to CL benitoite...which is never.
Can I ask what kind of beam settings, frame time, Cat PM, offset/gain settings you are using on your CL signal? Do you have the standard Cameca CL or are you using one purchased separately?

Cheers
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Probeman on October 04, 2017, 10:01:03 am
Hey John
That is a really nifty feature. I admit I don't utilise the Stage mapping feature yet but definitely one to add to the list.
I have a quick questions off-topic about your CL detector/settings. What is the sample you are mapping here that is luminescing. I have the Panchromatic CL that comes with the Cameca SXFive, but have found it to be very insensitive. Unless I am trying to CL benitoite...which is never.
Can I ask what kind of beam settings, frame time, Cat PM, offset/gain settings you are using on your CL signal? Do you have the standard Cameca CL or are you using one purchased separately?

Cheers

Hi Ben,
Nothing special, just the Cameca PMT as shown here:

http://probesoftware.com/smf/index.php?topic=883.0

Note the above link shows the fiber coupled spectrometer in the acquisition position, but we can just slide things to the right to get the PMT in place.

I do tend to run the PMT a bit high, around 900 or 1000.
john
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: John Donovan on November 19, 2017, 05:58:48 pm
We added a checkbox control to specify filament standby in the Stage.exe app, perhaps for when one is acquiring a large number of mosaic scans and the run will go into the night.
john
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Mike Matthews on January 24, 2018, 10:54:02 am
Hi John,

I've been trying to mosaic one of my standards blocks and I'm obviously doing something wrong at some point. I've calibrated the beam scan conditions at the kV and mag and input them into the .ini file, stored the image co-ords, and successfully acquired the images. I load them into Probe Image (Is there a way to load all the images at once? I tried shift+click and curl+click in the open dialog and can only select one image at a time). When I select the mosaic command from the Concatenate menu PI tells me the image isn't registered (many many times!) and fails to build the concatenated image. Do you know what I'm missing out?
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: John Donovan on January 24, 2018, 11:50:19 am
Hi Mike,
We've been planning to add a "Load All Images From Folder" and a "Load All Selected Images From Folder" menus but haven't gotten around to it.   But because loading the images one by one is tedious it makes more sense to use the Grid | Mosaic menu in Surfer to load all your images (as .GRD files) and mosaic them in Surfer.  That's how I've been doing Stage mosaics (see above posts for examples) for some time now and it works great though it takes a few minutes if you have many images.

On the beam scan calibrations for imaging in Probe for EPMA remember that you don't need to edit the Probewin.ini by hand any longer.  You can use the 3 point calibration method using beam scan images from Probe for EPMA and a stage scan from Probe Image and calibrate them in CalcImage using the new three point calibration method.  If you use this CalcImage beam scan calibration method, the calibrations can be saved automatically to the Probewin.ini file. See here for more details:

http://probesoftware.com/smf/index.php?topic=396.0

As for the images in Probe Image not being calibrated, that is very strange.  Remember though, Probe Image does *not* utilize the beam scan calibrations from the Probewin.ini file. It has it's own beam scan calibration which is accessed from the Setup | Probe Image Setup menu as seen here:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%3A80%2Fsmf%2Fgallery%2F1_24_01_18_11_48_24.png&hash=1fac2d3c02853b7c13955699d3819ea8)

Note that you can certainly just enter the values from the Probe for EPMA calibration into this dialog.
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Mike Matthews on January 24, 2018, 12:17:29 pm
OK, it's almost certainly the beam scan calibration in PI I've missed - I'd assumed it would pick up the Probewin.ini settings. I would use the beam and stage scan calibration method except that I have an instrument problem with my stage scanning at the moment (strangely it doesn't affect the stage moves between beam scan images). I'll give the Surfer method a go too.

Multiple image loading would be very much appreciated- opening 61 images one by one gets tedious very quickly!
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: John Donovan on January 24, 2018, 12:24:56 pm
Multiple image loading would be very much appreciated- opening 61 images one by one gets tedious very quickly!

I agree.   But at least with the Surfer mosaic method you simply select all the images using the <ctrl> a keyboard shortcut, and they all get loaded quickly.
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Mike Matthews on January 25, 2018, 10:50:33 am
Got it working with Surfer (although it did take me a while to work out how to convert the Surfer Grid file into an actual image). I checked the beam calibration settings in Probe Image but even when I'd set the values to exactly the same as the lines in probewin.ini I still got the same error message about the image not being registered.

Is there a way to display the mosaic image in the stage map window so I can use it to navigate? I opened it in the digitise window so I know I can use it to store analysis points.
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: John Donovan on January 25, 2018, 11:07:20 am
Got it working with Surfer (although it did take me a while to work out how to convert the Surfer Grid file into an actual image). I checked the beam calibration settings in Probe Image but even when I'd set the values to exactly the same as the lines in probewin.ini I still got the same error message about the image not being registered.

Hi Mike, This doesn't make sense, so clearly "what we have here is a failure to communicate"!   So let's start with this:

1. Acquire a small (e.g., 128 pixel wide) beam scan image in Probe Image.

2. Once acquired, is the image calibrated?  That is, when you move your cursor over the image, do you see the x, y stage coordinate values displaying appropriate values?

Is there a way to display the mosaic image in the stage map window so I can use it to navigate? I opened it in the digitise window so I know I can use it to store analysis points.

Easiest thing is to simply open the GRD file in PictureSnap.  Just use the File | Import GRD File menu and you should be good to go!

Here is an example of a Stage.exe mosaic of one of my standard blocks loaded into PictureSnap:

(https://probesoftware.com/smf/proxy.php?request=http%3A%2F%2Fprobesoftware.com%3A80%2Fsmf%2Fgallery%2F1_25_01_18_11_31_15.png&hash=f15a032cf0567ef9ebd743702beeba20)
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: macosta on June 21, 2019, 12:48:09 pm
Does anyone know what this error means (see attachment) ?

It comes up when I attempt to use the Mosaic | Grid command [in the Surfer application from Golden Software].

Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Probeman on June 21, 2019, 01:11:53 pm
Does anyone know what this error means (see attachment) ?

It comes up when I attempt to use the Mosaic | Grid command [in the Surfer application from Golden Software].

Are those Chinese characters?   ???

I would send the error message to support@goldensoftware.com
john
Title: Re: Automated Mosaic Imaging (using Stage.exe)
Post by: Probeman on July 09, 2019, 02:10:05 pm
It occurs to me that with all this discussion on getting raw image data in and out of our applications I should make available the code we use to read/write Surfer GRD files. This is a proprietary format from Golden Software, but they freely provide documentation on the format. That said, sometimes it is easier to just read the damn code!

Attached below is the code module for reading and writing Surfer GRD files, though it is also available on the CalcZAF GitHub site:

https://github.com/openmicroanalysis/calczaf

The VB6 code attached below has routines for the old v. 6 GRD format, though since about 2005 we only utilize v. 7 format which is the format used still today by Golden Software. The main read/write routine for the current GRD format is called (appropriately enough!), GridFileReadWrite2(). There are several other routines for reading the header data, and also for reading the GRDInfo.ini file which we create to indicate the stage units and polarity (cartesian for Cameca vs. anti-cartesian for JEOL).

That said, it is a really easy format and all the data is stored as 32 floats so almost any data type can be utilized. In fact the GRD format is the native format for CalcImage which is Probe Software's quantitative mapping software.  This allows CalcImage to calculate, store and output fully quantitative x-ray map data whether it be net intensities, k-ratios, detection limits, weight%, atomic%, etc., etc.:

https://probesoftware.com/smf/index.php?topic=41.msg4167#msg4167