AW: openslide_read_region returns no picture data

Stefan König blogdde at googlemail.com
Wed Dec 8 11:34:25 EST 2010


The error state is empty and a read_associated_image call works fine aber
calling read_region.

I debugged inside the read_region code, I think there is something wrong
with some of the cairo calls painting to the buffer, but there is no proof
yet.

Friday I'll take a further look, and I'll write here if I find something.


-----Ursprüngliche Nachricht-----
Von: openslide-users-bounces+blogdde=googlemail.com at lists.andrew.cmu.edu
[mailto:openslide-users-bounces+blogdde=googlemail.com at lists.andrew.cmu.edu]
Im Auftrag von Jan Harkes
Gesendet: Mittwoch, 8. Dezember 2010 17:13
An: openslide-users at lists.andrew.cmu.edu
Betreff: Re: openslide_read_region returns no picture data

On 12/08/2010 10:21 AM, Stefan König wrote:
> Hi,
> 
> i try to read a single region out of mirax file (just tried my own and
> the sample files from openslide.org), if i use
> openslide_get_associated_image_dimensions() i can extract my image and
> save work with them but if i try to extract a image by using
> openslide_read_region my dst pointer contains nothing and there is no
> exception either :(
> 
> 	*width = 256;
> 	*height = 256;
> 
> 	uint32_t* dst = new uint32_t[(*width)*(*height)*4];
> 	openslide_read_region(slideObject, dst, 0, 0, 1, *width, *height);
> 
> if i understand the documentation right, it should take my slide
> object and write a 256x256 area begining at topleft from layer to dst?

I believe that that should work. But it may be that the slideObject
handle got into an error state, you probably should check for errors by
calling 'openslide_get_error' after the call to openslide_read_region
and probably most other calls.

According to the C api documentation, when the object is in error state
openslide_read_region will clear the dst buffer instead of painting to it.

Jan

_______________________________________________
openslide-users mailing list
openslide-users at lists.andrew.cmu.edu
https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users



More information about the openslide-users mailing list