[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Efficiently iterating over Nd array in oct file
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Efficiently iterating over Nd array in oct file |
Date: |
Mon, 25 Apr 2011 09:24:48 -0500 |
I'm agonising over an implementation detail of bwlabeln. I need to
iterate over each voxel of boolNDArray *and* consider each voxel's
neighbours. If I use a linear index and just iterate up to
boolNDArray::nelem(), I would have to call ind2sub for each pixel in
order to consider its neighbours, and I'm trying to avoid that call. I
was hoping for something like Array<idx_vector>::next() if such a
function existed or to impement it myself. Any other suggestions?
Thanks,
- Jordi G. H.
- Efficiently iterating over Nd array in oct file,
Jordi Gutiérrez Hermoso <=