Release of G'MIC 2.8

Fixed.

1 Like

I wonder if there is a way to force older versions to have the latest command set for testing purposes. Just thinking through the problem as someone who wants to commit regularly but is delayed or discouraged by the tedium described below.

I find it annoying to have to update the CLI binary to use my latest committed commands. It can be time consuming and confusing: I don’t know when I should delete my local *.gmic copies because I don’t know if I will have parity when I do update. I would have to delete it, save, update and then check command using e[] $$ method, and repeat. Sometimes, there is parity but then I purposefully or accidentally change something in my local file. This makes it harder to keep track of bugs or discrepancies because I have multiple copies of the same command.

I don’t use git locally on my end or have a software manager because I use win10 but I don’t think that would matter.

I always want to know what is going on from the perspective of someone who isn’t using the bleeding edge pre but is up to date a couple of releases ago. Moreover, I would like my commands to be available to a wider range of point releases.

I updated to Version 2.9.0 (pre-release #200225). I can confirm @KaRo’s issue. help doesn’t work anymore.


Continuing from my previous post, I would like the gmic output to indicate the current stable and pre. That would help save time. Perhaps installed version, stable version and pre version.

  gmic: GREYC's Magic for Image Computing: command-line interface
        (https://gmic.eu)
        Version 2.9.0 (pre-release #200225)

And I would like the interpreter to indicate the version being used.

[gmic]-0./ Start G'MIC interpreter.

Hi @afre, I think I understand your point. Still I think also that David does not break backward compatibility without good reason.

I don’t have such a quick changing development, still I store my custom commands in $_path_user. And in the moment they appear in updatexxx.gmic I delete them locally. For older releases without update I use “command file” in $_path_user to have them defined. In your case even “command gmic-community/afre.gmic at master · dtschump/gmic-community · GitHub” works well.

Ok, the problem with help is not solved with “command”. Actually to get help everything has to be copied into $_path_rc !

:thinking: Good idea. I will place a commented out command at the end of user.gmic.

I’d suggest $ gmic \$_path_rc/update290.gmic , whatever the version of G’MIC you are using.
This will work for the CLI interface. For the plug-in, having a link in folder $_path_rc, e.g. update285.gmic linked to update290.gmic.

This should not happen. help is working here. The only requirement is that you have the update290.gmic file present in your $_path_rc.

I don’t get it, have you a simple example that is not working as expected?

About the update compatibility break : I’m really sorry when it happens, I try to keep that to a minimum. Most commands of the stdlib will actually continue working with previous versions. I hope 2.9.0 will be ready as soon as possible so that people can easily get the updates.
A few things to fix before release, anyway.

It’s there. This wasn’t an issue in previous versions… FYI,

Generated on : 2020/02/29, 21:04

David,

here is a custom command (from you)

gmic help linear_reg,0

[gmic] Command ‘linear_reg’ has no description (did you mean ‘linear_x3’ ?). Try ‘gmic -h’ for global help.

#@cli linear_reg :
#@cli : The idea is to build the system [X,1].[a;b] = [Y], where X and Y are the column vectors
#@cli : composed of the values of images X and Y you want to match, and [a;b] the vector of the
#@cli : coefficients you are looking for.
#@cli : This small piece of code compute a and b for two input images [0] = X and [1] = Y such
#@cli : that ||Y - (a.X + b)||^2 is minimum:
linear_reg :
–l
-y 1,100%,1,1,1
-a[0,-1] x
-r 100%,{min(h,10000)}
-solve. [-2]
-k. a={[0]} b={[1]} -rm
-endl # Get vector [a,b]
–*[0] $a -+. $b # Compute [2] = aX+b (should match [1]).

I have put it into a file, say exa.gmic

And …

gmic m exa.gmic osteo follic r. … linear_reg
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Import commands from file ‘exa.gmic’ (1 new, total: 4203).
[gmic]-0./ Load osteoblast nucleus example image
[gmic]-1./follic/ Load thyroid follicle nuclei example image from local storage
[gmic]-2./ Resize image [1] to 128x128x1x1, with nearest-neighbor interpolation, dirichlet boundary conditions and alignment (0,0,0,0).
[gmic]-3./ Display images [0,1,2] = ‘follic, follic, follic_c1’.
[0] = ‘follic’:
size = (128,128,1,1) [64 Kio of floats].
data = (213,219,217,214,213,213,213,210,214,211,217,212,(…),208,212,217,211,213,211,216,212,208,213,217,216).
min = 70, max = 249, mean = 197.159, std = 28.0122, coords_min = (64,85,0,0), coords_max = (112,97,0,0).
[1] = ‘follic’:
size = (128,128,1,1) [64 Kio of floats].
data = (193,176,167,176,182,192,201,209,203,193,175,161,(…),159,165,162,128,117,112,107,105,109,109,118,119).
min = 27, max = 224, mean = 106.09, std = 49.8296, coords_min = (81,28,0,0), coords_max = (4,14,0,0).
[2] = ‘follic_c1’:
size = (128,128,1,1) [64 Kio of floats].
data = (1,1,1,1,1,1,1,1,1,1,1,1,(…),1,1,1,1,1,1,1,1,1,1,1,1).
min = 1, max = 1, mean = 1, std = 0, coords_min = (0,0,0,0), coords_max = (0,0,0,0).
[gmic]-3./ End G’MIC interpreter.

gmic m exa.gmic h linear_reg,0
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Import commands from file ‘exa.gmic’ (1 new, total: 4203).
[gmic] Command ‘linear_reg’ has no description (did you mean ‘linear_x3’ ?). Try ‘gmic -h’ for global help.

You see, no help. If I put it into $_path_user help text appears!

gmic h linear_reg

gmic: GREYC’s Magic for Image Computing: command-line interface
(https://gmic.eu)
Version 2.9.0 (pre-release #200225)

    Copyright (c) 2008-2020, David Tschumperle / GREYC / CNRS. 
    (https://www.greyc.fr)

linear_reg:

  The idea is to build the system [X,1].[a;b] = [Y], where X and Y are the column vectors
  composed of the values of images X and Y you want to match, and [a;b] the vector of the
  coefficients you are looking for.
  This small piece of code compute a and b for two input images [0] = X and [1] = Y such
  that ||Y - (a.X + b)||^2 is minimum:

OK, that was a bug, it should work now, after $ gmic update.

1 Like

Works now. :slight_smile:

1 Like

I’m working on this. Should be ready before tonight probably (will require to recompile binary though).

It should be OK now, with latest version in the git repo.
@KaRo, could you confirm that something as:

$ gmic my_command.gmic -h my_command 

is working now ?

Yes, very good, it works!

Thank you

1 Like

David, very good the list of command file paths $_path_commands.

What about the non-local gmic files?

gmic m http://karo03.bplaced.net/gmic/test/linear_reg.gmic h linear_reg

It works for me:

$ gmic http://karo03.bplaced.net/gmic/test/linear_reg.gmic h linear_reg
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ Input custom command file 'http://karo03.bplaced.net/gmic/test/linear_reg.gmic' (1 new, total: 4150).
  gmic: GREYC's Magic for Image Computing: command-line interface 
        (https://gmic.eu) 
        Version 2.9.0 (pre-release #200303) 
 
        Copyright (c) 2008-2020, David Tschumperle / GREYC / CNRS. 
        (https://www.greyc.fr)

    linear_reg:

      The idea is to build the system [X,1].[a;b] = [Y], where X and Y are the column vectors
      composed of the values of images X and Y you want to match, and [a;b] the vector of the
      coefficients you are looking for.
      This small piece of code compute a and b for two input images [0] = X and [1] = Y such
      that ||Y - (a.X + b)||^2 is minimum:

Ha, actually that works only without the explicit call to m.
This is something I have to fix :slight_smile:

This is fixed with
https://github.com/dtschump/gmic/commit/485a845cbcd8ce9abfa0a5a5bd69e9a528a7deae

2 Likes

ok, ok, I am more quick in answering than reading…

Still the latest build against 12pm did not show an improvement for explicit m or command!

That is not expected. Are you sure you were using the ‘develop’ branch ?

Ok, I had forgotten to checkout develop!

Thank you!

1 Like