Post

2 followers Follow
0
Avatar

"shrink" function in 2016

Hi, I just downloaded the trial version of 2016. I've been working with 2013 and had been using the "shrink" function. Did the name of the function change in 2016, or is it just not available because I am working with the trial? I can't find it in the algorithm library, through python or easi!

koreen

Official comment

Avatar

Hello Koreen,

The SHRINK function has been retired and is not available in versions after Geomatica 2014. If you are attempting to use SHRINK as part of a workflow there may be another method in Geomatica 2016. In order for us to assist you further, please provide us with more information about your specific workflow.

Hope this helps,
Sarah

PCI Geomatics
Comment actions Permalink

Please sign in to leave a comment.

6 comments

0
Avatar

Hi Sarah,

I have a workflow that needs to remove edge pixels from masks. Is there some other function that could be used for this without going outside of PCI or python?

For more detail, check the supplemental information (script) in this paper: http://www.mdpi.com/2072-4292/8/4/285

I've also asked the authors and will post here if they know of a solution.

koreen 0 votes
Comment actions Permalink
0
Avatar

Hi again,

the authors are still using 2014 and just learned that shrink was discontinued in future packages. Was a new analogous function created in 2015 onwards to replace shrink?

koreen 0 votes
Comment actions Permalink
0
Avatar

Hi Koreen,

I took a quick look at their script and it seems that they are using SHRINK to remove nodata values from their mask image before they convert to bitmap. I'm not quite sure what their input to SHRINK would look like as I do not have their model from the step before. However, when you run THR, you set a threshold value, which specifies which values should be included in the bitmap mask. This algorithm should allow you to exclude the nodata values from your bitmap masks.

PCI Geomatics 0 votes
Comment actions Permalink
0
Avatar

Hi Sarah,

I don't think we want to remove NoData from the mask or thresholding step, but from the HIS step (and maybe histex too). Sandra has two comments in the script:

" #Need to compute & shrink, to have meaningful MEAN (from HISTEX)"
and
"#Need to shrink it, as HisMean includes edge Nodata pixels in the computations"

  • First she creates a mask of the valid image area (binary - 1 for data, 0 for areas of no data - this is just a polygon covering the area where there is data).
  • Then she shrinks this mask in by two pixels.
  • (several steps occur) and then she runs "his" only under the shrunk mask. If you don't do the shrink the "his" function uses the values of neighbouring pixels - of which at the edges these values will be NoData. The inclusion of the NoData values messes up the histogram and makes further steps break. She believes this is a bug in the his function.

So - is there a way to exclude these neighbouring pixels (that have a value of NoData) in the "his" function? I've tried this with 2013 and 2016 and the issue exists in both versions.

Was there a reason shrink was removed? Seems like a useful tool. Perhaps there is a way in python to do this same shrink?

koreen 0 votes
Comment actions Permalink
0
Avatar

Hi Koreen,

Unfortunately, as this is not a script generated by PCI we are unable to fully test it to determine the outputs. If you suspect that there is a bug in the software, please file a bug report with support@pcigeomatics.com.

If you wish to run this exact script including the shrink function, you can download Geomatica 2014: www.pcigeomatics.com/geomaticalegacy. You can run multiple Geomatica versions on the same computer.

Sarah

PCI Geomatics 0 votes
Comment actions Permalink