Problem accessing Leica fluorescence images
Freed, Melanie
Melanie.Freed at nyumc.org
Tue Feb 3 11:44:49 EST 2015
Hi. I have a bunch of Leica fluorescence images. Some with 3 channels (red, green, blue) and others with two channels (green, blue). I'm trying to read them in, but get the following error when I run openslide_get_level_count: "Found multiple macro images". And when I try to read the dimensions of level 0 using openslide_get_level_dimensions I get a segmentation fault.
I see from the documentation that there may be some problem reading these types of Leica files. Am I running into this or am I just doing something wrong? Is there any workaround? I'm only interested in accessing the highest resolution layer. My code and output is below (for one of the 3 channel images).
Thanks again,
Melanie
-----Start Code-----
// g++ -Wall -I/usr/local/include/openslide -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -L/usr/lib -lm -lglib-2.0 -lopenslide -o AccessSlides AccessSlides.cc
extern "C" {
#include <openslide.h>
}
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <glib.h>
using namespace std;
int main (int argc, char * argv[])
{
// Pick Slide
string fn="data/Slide_901822B_DAPI_CD31_COLIV.scn";
cout << "File: " << fn << endl;
// Open Slide
openslide_t *oslide;
oslide=openslide_open(fn.c_str());
if (oslide == NULL) {cout << "Open Slide: Failed" << endl;}
else {cout << "Open Slide: Successful" << endl;}
// Get Level Count
int32_t lc=0;
lc=openslide_get_level_count(oslide);
cout << "Level Count: " << lc << endl;
if (lc == -1)
{
cout << "Error: " << endl << openslide_get_error(oslide) << endl;
}
//Get Level0 Dimensions
int64_t * ww=NULL, * hh=NULL;
openslide_get_level_dimensions(oslide,0,ww,hh);
if (ww != NULL && hh != NULL)
{
cout << "Level 0 Dimensions: " << ww << " x " << hh << endl;
}
// Close Slide
openslide_close(oslide);
return 0;
}
-----End Code-----
-----Start Output-----
File: data/Slide_901822B_DAPI_CD31_COLIV.scn
Open Slide: Successful
Level Count: -1
Error:
Found multiple macro images
Segmentation fault
-----End Output-----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20150203/9d95e6b4/attachment-0001.html
More information about the openslide-users
mailing list