Skip to content
Snippets Groups Projects
main.cpp 883 B
Newer Older
  • Learn to ignore specific revisions
  • theazgra's avatar
    theazgra committed
    #include "czi_parser.h"
    
    theazgra's avatar
    theazgra committed
    int main(int argc, char **argv)
    {
    
        std::string cziFile;
    
    
    theazgra's avatar
    theazgra committed
        cziFile = (argc > 1) ? argv[1] : "/home/mor0146/Downloads/cziFiles/TESTIMAGES/CZT-Stack-Anno.czi";
        std::string method = argc > 2 ? argv[2] : "";
        std::string dumpName = argc > 3 ? argv[3] : "";
    
    theazgra's avatar
    theazgra committed
        bool report = method == "--report";
        bool reportAll = method == "--report-verbose";
    
    theazgra's avatar
    theazgra committed
        bool dumpRawImageData = method == "--dump-raw-image-data";
        bool dumpImageData = method == "--dump-image-data";
    
    
        CziParser parser;
        auto parseResult = parser.parse_czi_file(cziFile);
    
    theazgra's avatar
    theazgra committed
            parseResult.report_verbose();
        else if (report)
            parseResult.report();
    
    theazgra's avatar
    theazgra committed
        else if (dumpRawImageData)
    
            parseResult.dump_image_data(dumpName);
    
    theazgra's avatar
    theazgra committed
        else if (dumpImageData)
            parseResult.extract_images(dumpName);
    
    theazgra's avatar
    theazgra committed
        return 0;