That's the way to go.

Treat all images as 3D.

Am 05.09.2013 um 10:53 schrieb mdeklerk <notifications@github.com>:

> In skimage/segmentation/_graphcut.pyx:
> 
> > +                    if y2 < 0 or\
> > +                       x2 < 0 or\
> > +                       y2 > self.shape[0] - 1 or\
> > +                       x2 > self.shape[1] - 1:
> > +                        node.neighbours[i] = None
> > +
> > +                    else:
> > +                        neighbour = self.nodes[y2*self.shape[1] + x2]
> > +
> > +                        node.neighbours[i] = neighbour
> > +
> > +        self.active = []
> > +
> > +        for node in self.nodes:
> > +            y, x = node.coord
> > +            node.value = img[y][x]
> 
> I think there'll be the same issue as above in that the array with have to be either typedef'd as 2D or as 3D. Both can't be accommodated? I See the quick shift implementation overcomes using:
> image = img_as_float(np.atleast_3d(image))
> cdef cnp.ndarray[dtype=cnp.float_t, ndim=3, mode="c"] image_c = np.ascontiguousarray(image)
> and pointers to the image data:
> cdef cnp.float_t* image_p = image_c.data
> Perhaps this is the way to go?
> 
> —
> Reply to this email directly or view it on GitHub.
> 
>