Image processing: smart solution for converting superixel (128x128 pixel) coordinates needed

Posted by zhengtonic on Stack Overflow See other posts from Stack Overflow or by zhengtonic
Published on 2008-11-24T13:55:07Z Indexed on 2010/05/08 9:28 UTC
Read the original article Hit count: 194

Filed under:
|
|
|

Hi, i am searching for a smart solution for this problem:

A cancer ct picture is stored inside a unsigned short array (1-dimensional).

I have the location information of the cancer region inside the picture, but the coordinates (x,y) are in superpixel (128x128 unsigned short). My task is to highlight this region.

I already solved this one by converting superpixel coordinates into a offset a can use for the unsigned short array. It works fine but i wonder if there is a smarter way to solve this problem, since my solution needs 3 nested for-loops.

Is it possible to access the ushort array "superpixelwise", so i can navigate the ushort array in superpixels.

...

// i know this does no work ... just to give you an idea what i was thinking of ... 

typedef struct 
{
   unsigned short[128x128]
} 
spix;

spix *spixptr;

unsigned short * bufptr = img->getBuf();

spixptr = bufptr;

...

best regards,

zhengtonic

© Stack Overflow or respective owner

Related posts about image-processing

Related posts about c++