I'm using the scipy ndimage modules and I'm using the find_objects function, which returns a slice object. Now i want to read this slice object and get the start and end indices from them. However, i can't find the way to do that.
fragments = ndimage.find_objects(labels)
print fragments[0][0]
> slice(0L, 832L, None)
How do i store the start and end indices as variables in my python code.
Any help will be appreciated. Thanks in advance.