Author Topic: Polygon Extraction and/or Pixel Filtering  (Read 929 times)

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Polygon Extraction and/or Pixel Filtering
« on: November 10, 2018, 05:37:12 pm »
So Gareth Seward and I have been havin' a bit of ye' ole' chin wag, and the upshot of it is... this new feature which is not yet out officially, as it needs another few days of tweaking and testing, but it seems to be going well.

That said it looks to be pretty useful to all, and especially for students processing quantitative element maps off-line *without* access to the Surfer application.



The cool thing, this feature will work for any data type created in CalcImage, so not just elemental quant maps, but also oxide wt.% maps, atomic % maps, formula basis maps, detection limit maps, etc., etc.
« Last Edit: November 10, 2018, 06:44:47 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #1 on: November 11, 2018, 04:39:32 pm »
We're making progress.



Another few days of work and it should get interesting.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #2 on: November 14, 2018, 01:55:31 pm »
Our "first cut" at polygon extraction and pixel filtering is now available for download. Simply run the UPdate Probe for EPMA from the Help menu and you will obtain v. 12.5.2.  Then launch CalcImage and select the Image Processing menu, and select the new EXtract Polygon Areas and/or Filter Pixels menu.

Here is a screen shot of this new feature with the main operations highlighted:



Gareth Seward will provide more operational details over the next few weeks, but it is quite usable already and we're sure you all will have many excellent suggestions to make (Gareth has already given me a list to work on for this weekend!).

Basically one starts with the Browse For Classify DAT File button to select an output file from the CalcImage quantitative mapping output, which is described here in detail (be sure to click the "Refresh" button in your browser if the in-line images are not visible!):

https://probesoftware.com/smf/index.php?topic=146.0

Then one selects the element data to display (remember, any data type output from the CalcImage quantification can be processed using this feature, including elemental, oxide, atomic, formula, etc., etc.). Then select either the Shape Extraction button (On) or the Digitize Polygon button to extract shape areas or polygon areas. 

Finally, simply click on the image with the shape tool to see extracted pixels or click the Perform Extraction/Filtering to see the polygon extraction results.  More details will be forthcoming.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #3 on: November 14, 2018, 06:47:57 pm »
We re-arranged the GUI controls so they are a little more intuitive:



This update is ready to download now using the Help | Update Probe for EPMA menu.
« Last Edit: November 15, 2018, 11:59:10 am by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

glennpoirier

  • Professor
  • ****
  • Posts: 32
Re: Polygon Extraction and/or Pixel Filtering
« Reply #4 on: November 15, 2018, 12:45:58 pm »
Just been playing with the new  CalcImage. I don't have a copy of Surfer installed on my desktop computer so this is really useful!
Excellent work!
Cheers
Glenn

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #5 on: November 15, 2018, 02:49:34 pm »
Just been playing with the new  CalcImage. I don't have a copy of Surfer installed on my desktop computer so this is really useful!
Excellent work!
Cheers
Glenn

Hi Glenn,
Thank-you, thank-you.  Gareth and I worked pretty hard on this and we think it's pretty cool too.  We're adding several additional cool features today, probably release a new version later tonight or tomorrow.

In the meantime I should mention that Golden Software allows you to install and register a copy for use both "in the field and in the office".  I would interpret that to mean one copy in the lab and one in the office.  Here's their license info:

Quote
Strater, Surfer and Grapher offer two licensing options: single-user licenses and concurrent licenses.

A single-user standalone license is associated with one person and only that person can use the license.  Single-user licenses can be activated on up to two computers for use in the field and in the office, for example.

A concurrent-use license, also called a “network” or “floating” license, is tied to a network. A license server be setup on the network for license distribution.  The licenses are activated on the server computer and then the software on the user's computers connects to the server to see if a seat is available each time it is started. The product can be installed on as many client machines as desired.

So I think it's OK to install another copy of Surfer in your office if you want to.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

JonF

  • Professor
  • ****
  • Posts: 32
Re: Polygon Extraction and/or Pixel Filtering
« Reply #6 on: November 16, 2018, 08:40:57 am »
To echo the earlier sentiments: this is really nice, thanks guys!

And thanks for the hat tip about the second licence for Surfer

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #7 on: November 17, 2018, 08:43:29 am »
We added some additional features to the polygon extract filtering feature in CalcImage for extraction of pixels from quantitative x-ray maps as seen here:



In addition to the new GUI controls outlined in red, both the shape and polygon extraction method graphics can now be enumerated (graphically and also saved to text and files), using the Enumerate Shapes and Enumerate Polygons checkbox controls.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #8 on: December 01, 2018, 11:50:35 am »
Gareth Seward requested that we display the filtered image and that is now implemented.  Here is the display with the normal default image data:



Then I set the Si minimum value to 20 and here is the filtered image display:



So now only the quartz grains are showing.

The image can be reverted to the unfiltered image by unchecking the element and re-extracting, or clicking on another element for display or re-loading the Classify .DAT file.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Gseward

  • Global Moderator
  • Professor
  • *****
  • Posts: 128
Re: Polygon Extraction and/or Pixel Filtering
« Reply #9 on: December 03, 2018, 02:00:54 pm »
John

Very handy to have this option directly in the Extraction window. Thanks!

Output of .GRD for each elements is very important too, and really is the more complete output option, but the filtered image display is an instant sanity check!

Cheers,

gareth

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #10 on: December 08, 2018, 03:05:26 pm »
OK, we added a new Line Profile Extraction feature in the Pixel Extraction window in CalcImage.

This new feature allows one to define two end points and perform pixel averaging for "N" points in between:



 8)
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Ben Buse

  • Professor
  • ****
  • Posts: 402
Re: Polygon Extraction and/or Pixel Filtering
« Reply #11 on: December 10, 2018, 09:06:54 am »
Hi John,

I've just tried the line extract - this is really nice - I'm keen to use it. I'm having some teething problems with the export of points though, (a) the append to file does not seem to work, (b) it be nice to have data structured so that its ready to plot all points - each element forming a row or column, (c) copy clipboard as csv only copies last entry.

It would also be great to have the relative distance between points.

Thanks, I'll try to patient  :)

Ben
« Last Edit: December 10, 2018, 09:09:35 am by Ben Buse »

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #12 on: December 10, 2018, 09:19:30 am »
Hi John,

I've just tried the line extract - this is really nice - I'm keen to use it. I'm having some teething problems with the export of points though,

(a) the append to file does not seem to work,

Hi Ben,
So the File Export works, but the Append does not?   I'll check into this ASAP.

(b) it be nice to have data structured so that its ready to plot all points - each element forming a row or column,

How is what you are suggesting different from what it's doing now?   It's complicated because there are two data types: averages and standard deviations only, and alternatively, averages and standard deviations and also all pixels.

(c) copy clipboard as csv only copies last entry.

When you say "last entry", do you mean the last pixel square?  I will check.

It would also be great to have the relative distance between points.

That makes sense.   I should also output the center stage coordinate for each extraction shape.

Thanks, I'll try to patient  :)

Ben

I appreciate your feedback!
john
« Last Edit: December 10, 2018, 05:13:58 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #13 on: December 10, 2018, 07:05:22 pm »
Hi Ben,
We fixed the append file output code.  Sorry about that!



We also fixed the tab delimited clipboard code.   Had to create an array of average structures and a 3 dimensional array for the pixel output too.

Next we will work on the relative distance output you requested. Good idea.
john
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Ben Buse

  • Professor
  • ****
  • Posts: 402
Re: Polygon Extraction and/or Pixel Filtering
« Reply #14 on: December 11, 2018, 02:26:40 am »
Hi John,

Thanks for fixing it, it all works well now.

I don't know if it be difficult but my ideal structure for the export file of averages - is shown below - where you export all the wt. % data together, and all the errors together so that its ready for plotting. You might want to flip rows and columns



Ben
« Last Edit: December 11, 2018, 02:33:01 am by Ben Buse »