patchGNU Octave - Patches: patch #9708, axes2pix: new function for the...

 
 

patch #9708: axes2pix: new function for the image package

Submitter:  Martin Janda <tojtoj>
Submitted:  Thu 25 Oct 2018 08:52:34 PM UTC
   
 
Category:  Forge : new function Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 31 Oct 2018 07:58:59 AM UTC, comment #5: 

Thanks for fixing the coding style, I'll stick to it in the future.

Martin Janda <tojtoj>
Wed 31 Oct 2018 03:02:47 AM UTC, comment #4: 

Thank you. I have pushed the new function http://hg.code.sf.net/p/octave/image/rev/dcff670d4a0c

Carnë Draug <carandraug>
Group Member
Sun 28 Oct 2018 10:44:30 AM UTC, comment #3: 

Hi Carnë, thanks for pointing that out! The function now accepts column vectors as well. I also mentioned in the docs that sensible values of n are only positive integers, however when I tested the MATLAB version, it accepts almost anything so I tried to modify argument checking to produce results similar to MATLAB. I also left only sensible BIST tests.

I also realized that my understanding of the meaning of EXTENT was wrong - they aren't the image edge coordinates but centers of the first and last pixel. I fixed the documentation. I'm attaching updated changeset axes2pix_v2.patch

Martin Janda <tojtoj>
Sat 27 Oct 2018 12:51:18 AM UTC, comment #2: 

Also, n needs to be an integer. What happens when it's a float? Does it error, rounds, truncates?

Carnë Draug <carandraug>
Group Member
Sat 27 Oct 2018 12:47:48 AM UTC, comment #1: 

Does `extent` really needs to be a row vector? Most functions would accept any 2 element vector.

Also, Matlab documentation says that axesCoord must be a numeric vector but in your tests you have a case where it's 2x2 matrix.

Carnë Draug <carandraug>
Group Member
Thu 25 Oct 2018 08:52:34 PM UTC, original submission:  

Added a new function axes2pix listed among the missing functions of the image package on Octave wiki page. Basic BIST tests provided and tested for MATLAB R2018b compatibility on an online console available on their documentation site.

Martin Janda <tojtoj>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #45315:  axes2pix_v2.patch added by tojtoj (6KiB - application/octet-stream)
file #45299:  axes2pix.patch added by tojtoj (5KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tojtoj (Submitted the item)
  • -email is unavailable- added by tojtoj
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-31 carandraug StatusNone Done
        Open/ClosedOpen Closed
    2018-10-28 tojtoj Attached File- Added axes2pix_v2.patch, #45315
    2018-10-25 tojtoj Attached File- Added axes2pix.patch, #45299
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code