tir, 23 02 2010 kl. 21:43 +0100, skrev David Grundberg:
> I don't know if the underlaying tiff library supports reading single frames.
> 
> One way to work-around any frame loading problem is to make sure that 
> all frames are loaded at once in one imread call. Maybe imread should 
> read all frames available if there is only one argument. Maybe imread 
> should be made to accept ":" as a frame index and load all available 
> frames only then.

If I understand things correctly, you can currently do

  I = imread ("myfile.tif", 7);

after which 'I' will contain the 7th frame of "myfile.tif". Hence, the
class of 'I' is an array.

The obvious extension is to allow for

  J = imread ("myfile.tif", 3:5);

which would then return frames 3, 4 and 5 in a cell array. The problem
is then that the class of the output depends on how many frames the user
asks for. If the user asks for one frame, she would get an array (for
Matlab compatibility), but if she asks for more than one frame the
result is a cell array. This will most likely be the cause of great
confusion and many bugs.

One solution would be to do something like

  [J1, J2, J3] = imread ("myfile.tif", 3:5);

but then you have to know how many frames you are asking for in advance,
which really isn't that great.

Any thoughts on how to deal with this?

Søren


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to