IMAGE_STATISTICS alternative?

Help
2011-11-09
2013-06-03
  • Daniel Molina
    Daniel Molina
    2011-11-09

    It seems that there is no IMAGE_STATISTICS procedure in GDL. I cannot find it also in the pdf draft of documentation.

    I think it was introduced in IDL 5.3

    There is some alternative that I can use?

    Thanks,

     
  • Daniel Molina
    Daniel Molina
    2011-11-09

    The same problem with CONGRID :(

     
  • Alain C.
    Alain C.
    2011-11-09

    OK, IMAGE_STATISTICS is an intrinsic IDL code missing in GDL. Despite indicated on
    http://aramis.obspm.fr/~coulais/IDL_et_GDL/Matrice_IDLvsGDL_intrinsic.html#I
    it is the first time I realize that this procedure exists !

    My feeling is it should be (very) simple to implement it in IDL/GDL syntax, we need a volunteer ! It may help if you list the most useful keywords …

    For me, CONGRID is another story. It is not an intrinsic procedure, but a function in IDL/GDL syntax, provided as a text file in the lib/ directory. You can include this path in the GDL_PATH … Nevertheless, we need also volunteers for a free implementation of non intrinsic pro/func.

     
  • Daniel Molina
    Daniel Molina
    2011-11-09

    If it is possible to read the non-intrinsic procedures (GDL/IDL code), do you have some tips for not having legal problems?

     
  • I would first search if there isn't any open-source library that already provides the needed functionality.
    If not, one can simply write a different (better/faster/simpler) implementation :)
    Writing it in C++ assures no doubts of code robbery, and in most cases results in better performance.
    S.

     
  • Daniel Molina
    Daniel Molina
    2011-11-10

    Hi Alain,

    I've compiled the new version. It's quite possible that my Magick installation is wrong, but until I check it maybe is useful to say that compilation reported me:

    Building CXX object src/CMakeFiles/gdl.dir/gdl.cpp.o
    Linking CXX executable gdl
    CMakeFiles/gdl.dir/magick_cl.cpp.o: In function `lib::magick_ping(EnvT*)':
    /home/lluvia/Compiling/gnudatalanguage/gdl/src/magick_cl.cpp:197: undefined reference to `Magick::Image::type() const'
    /home/lluvia/Compiling/gnudatalanguage/gdl/src/magick_cl.cpp:197: undefined reference to `Magick::Image::type() const'
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: ***  Error 2
    make: ***  Error 2

    Btw, which version of image_magick do you use?

     
  • Daniel Molina
    Daniel Molina
    2011-11-14

    I'm having problems compiling the CVS version, so I cannot check it.

    Building CXX object src/CMakeFiles/gdl.dir/datatypes.cpp.o
    In file included from /home/lluvia/Compiling/gnudatalanguage/gdl/src/datatypes.cpp:59:
    /home/lluvia/Compiling/gnudatalanguage/gdl/src/getas.cpp:109: error: using ‘typename’ outside of template

    /home/lluvia/Compiling/gnudatalanguage/gdl/src/getas.cpp:548: error: using ‘typename’ outside of template
    make: ***  Error 1
    make: ***  Error 2
    make: ***  Error 2

     
  • Daniel Molina
    Daniel Molina
    2011-11-14

    I followed the steps, but I'm having problems linking (?) the code.

    $ make
    Built target antlr
    Linking CXX executable gdl
    /usr/bin/ld: cannot find -lps
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: ***  Error 2
    make: ***  Error 2

    Any idea?

     
  • Alain C.
    Alain C.
    2011-11-14

    1/ CVS has been update

    2/ you used the CMake way and libps/pslib (naming convention not uniform for it) is missing. You can skip (-DPSLIB=no) or add it, if you plan to create EPS outputs

     
  • pslib is used for PostScript output.
    EPS output (i.e. DEVICE, /encapsulated) uses plplot only.
    S.

     
  • Daniel Molina
    Daniel Molina
    2011-11-15

    I tried it. The values are normally different

    Check this

    http://ompldr.org/vYmFicA

    where is shown the gdl version and idl (check it in the name of the windows)

    it is also showed the code

     
  • Alain C.
    Alain C.
    2011-11-15

    For Lluvia

    Good idea !
    I just updated the file in the CVS to have a better respect of the outputs types. On my side, the outputs are exactly the same than the IDL ones, and also same values than the IDL ones you gave. It is strange than the GDL ones are differents (I am not speaking about min/max since this is just related to type conversion (STRTRIM(STRING(0B))) gives a void string)

    For Sylwester

    no problem with pslib and/or CMake, just that the name is "ps" or "pslib" and may give error when we use it

     
  • Alain C.
    Alain C.
    2011-11-15

    re-update, sorry, because tests on x86_64 show it is more tricky ;-)

     
  • Daniel Molina
    Daniel Molina
    2011-11-15

    I just noticed that "Sum of pixel values" is ok altough I marked it as wrong…Then, the wrong results comes only from statistical calculations, but if Alain had good results, it is not a problem of some formula in GDL code, so maybe the origin of this issue is the same that teh one which don't let me charge images with palette

    https://sourceforge.net/projects/gnudatalanguage/forums/forum/338692/topic/4786290

     
  • Daniel Molina
    Daniel Molina
    2011-11-16

    It is working! Thanks a lot!