openslide_read_region filling buffer with 0's for Mirax

jcupitt at gmail.com jcupitt at gmail.com
Sun Apr 12 23:10:06 EDT 2020


I tried and I think it's just because there's no data there. Try:

        openslide_read_region( openslide, data, 20000, 110000, 0, 512, 512 );

openslide gives you cairo premultiplied ARGB, so 0 means fully
transparent, ie. the background colour, ie. white. You need to read
from somewhere with actual data.


On Mon, 13 Apr 2020 at 03:40, Terry Wilson <twilson7755 at gmail.com> wrote:
>
> Thanks for the zip file ... even using these lib's and dll's, the buffer is still being written with all 0's.  If I could ask you one last favor and try this very simple program on your windows system and let me know what you see.
>
> #include "d:\openslide-win64-20171122\include\openslide\openslide.h"
>
> int main()
> {
>     const char* fn = "C:\\Data\\CMU-3.mrxs";
>     openslide_t* openslide = openslide_open(fn);
>
>     uint32_t *data = new uint32_t[512 * 512];
>     openslide_read_region(openslide, data, 0, 0, 0, 512, 512);
>     for (int j = 0; j < 10; ++j)
>     {
>         printf("%x,", data[j]);
>     }
>
>     return 0;
> }
>
>
> Regards,
>
> Terry
>
> On Sun, Apr 12, 2020 at 6:14 PM <jcupitt at gmail.com> wrote:
>>
>> The libvips dev zip has the openslide DLLs and LIBs:
>>
>> https://github.com/libvips/libvips/releases/download/v8.9.1/vips-dev-w64-all-8.9.1.zip
>>
>> On Sun, 12 Apr 2020 at 19:26, Terry Wilson <twilson7755 at gmail.com> wrote:
>> >
>> > Yes I am able to successfully use your application to open various .mrxs files.  Could you send me your libopenslide.lib file to see if I can build against your openslide libraries and run successfully?
>> >
>> > Thanks,
>> >
>> > Terry
>> >
>> > On Sun, Apr 12, 2020 at 1:31 PM <jcupitt at gmail.com> wrote:
>> >>
>> >> I help maintain an image processing package which includes openslide
>> >> support. I just tried CMU-3.mrxs in the windows binary and it works
>> >> for me.
>> >>
>> >> Try this:
>> >>
>> >> https://github.com/libvips/nip2/releases/download/v8.7.0/nip2-8.7.0-setup.zip
>> >>
>> >> Unzip and run the .exe to install. To load an MRXS file, click File /
>> >> Open, navigate to the right directory, select "all files", and
>> >> double-click on CMU-3.mrxs. It should load as a thumbnail in the
>> >> workspace. Double-click the thumbnail to open an image view window.
>> >> You should be able to scroll about and view the file.
>> >>
>> >> That's using the standard openslide sources, though I built them myself.
>> >>
>> >> You can sometimes get problems with special characters or spaces in
>> >> the folder names, could that be it?
>> >>
>> >> John
>> >> _______________________________________________
>> >> openslide-users mailing list
>> >> openslide-users at lists.andrew.cmu.edu
>> >> https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users
>> _______________________________________________
>> 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