[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #7994] ind2rgb - Enabling handling of ND i
From: |
Adam Aitkenhead |
Subject: |
[Octave-patch-tracker] [patch #7994] ind2rgb - Enabling handling of ND images |
Date: |
Wed, 03 Apr 2013 10:50:18 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Firefox/17.0 |
URL:
<http://savannah.gnu.org/patch/?7994>
Summary: ind2rgb - Enabling handling of ND images
Project: GNU Octave
Submitted by: adama
Submitted on: Wed 03 Apr 2013 10:50:17 AM GMT
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Currently ind2rgb can only handle 2D images. It'd be useful if it could
handle ND images (3D and 4D images are quite common in medical applications),
so I've attached a patch which enables this. The changes I've made are to
ind2rgb.m and ind2x.m.
This will bring ind2rgb more into line with Matlab's behaviour, as it can also
handle ND images. In fact, Matlab's ind2rgb (for R2010a anyway, I don't know
about later versions) only allows ND images to be handled if called with three
outputs:
[R,G,B] = ind2rgb(image,colormap);
...but I don't see any reason why it shouldn't also work with a single
output:
[R] = ind2rgb(image,colormap);
...so the attached patch works for ND arrays for both 1 and 3 outputs.
Adam
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 03 Apr 2013 10:50:17 AM GMT Name: ind2rgb_NDimages.diff Size: 2kB
By: adama
<http://savannah.gnu.org/patch/download.php?file_id=27753>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?7994>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-patch-tracker] [patch #7994] ind2rgb - Enabling handling of ND images,
Adam Aitkenhead <=
- Prev by Date:
[Octave-patch-tracker] [patch #7990] Add builtin Qt equivalents of UI dialogs, i.e., , qterrordlg, qtinputdlg, etc.
- Next by Date:
[Octave-patch-tracker] [patch #7990] Add builtin Qt equivalents of UI dialogs, i.e., , qterrordlg, qtinputdlg, etc.
- Previous by thread:
[Octave-patch-tracker] [patch #7991] Remove _terminal pointer from main_window.
- Next by thread:
[Octave-patch-tracker] [patch #7994] ind2rgb - Enabling handling of ND images
- Index(es):