Opening and reading supported file formats

Evert Trollip evert.trollip at stonethree.com
Tue Feb 23 04:31:01 EST 2016


Hi OpenSlide users,

I am trying to open a tif file (CMU-1.tiff) that I downloaded from the test
data into my working folder (/home/OpenSlide/FirstProgram/).

Using openslide functions: *openslide_detect_vendor *and *openslide_open *I
get the following terminal output:

Welcome to OpenSlide Version: 3.4.1
File format not supported!
File not opened!
Press <RETURN> to close this window...

Any idea why it doesn't want to open the CMU-1 file? Here is the code:

#include <iostream>

#include <stdint.h>


extern "C" {

#include "openslide/openslide.h"

#include "openslide/openslide-features.h"

}


int main()

{


    std::cout << "Welcome to OpenSlide Version: " <<
openslide_get_version() << std::endl;


    char const* filename = "CMU-1.tiff";

    char const* slide_format_vendor = openslide_detect_vendor(filename);


    if(slide_format_vendor == NULL)

    {

        std::cout << "File format not supported!" << std::endl;

    }

    else

    {

        std::cout << "File format: " << slide_format_vendor << std::endl;

    }



    openslide_t* image;

    image = openslide_open(filename);


    if(image == NULL)

    {

        std::cout << "File not opened!" << std::endl;

    }

    else

    {

        std::cout << "File successfully opened." << std::endl << "A
new OpenSlide object has been created." << std::endl;

    }





    return 0;

}


Regards,
Evert

-- 

Evert Trollip
Software Engineer
M.Eng (Electrical and Electronic)

T +27 21 851 3123
M +27 72 997 5230 <%2B27%2083%20322%206686>
www.stonethree.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20160223/f702eb9f/attachment.html>


More information about the openslide-users mailing list