Changeset 464:8dbb9ca34f62


Ignore:
Timestamp:
09/03/2015 03:56:37 PM (6 years ago)
Author:
Dmitry Fedorov <fedorov@…>
Branch:
default
Phase:
public
Tags:
tip
Message:

fixed intermittent breaks

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libsrc/libbioimg/formats/bim_format_manager.cpp

    r462 r464  
    950950    selectedFmt->releaseFormatProc ( &sessionHandle );
    951951  }
     952  sessionFormatIndex = -1;
    952953  session_active = false;
    953954  sessionCurrentPage = 0;
  • libsrc/libbioimg/formats/meta_format_manager.cpp

    r393 r464  
    142142  channel_names.clear();
    143143  display_lut.clear();
    144   metadata.clear();
     144  //metadata.clear();
    145145
    146146  display_lut.resize((int) bim::NumberDisplayChannels);
  • src/main.cpp

    r462 r464  
    13951395
    13961396    Image tile(c->i_names[0]);
     1397    if (tile.isEmpty()) return IMGCNV_ERROR_READING_FILE;
    13971398    Image img(num_x*tile_size, num_y*tile_size, tile.depth(), tile.samples(), tile.pixelType());
    13981399    img.fill(0);
     
    14141415
    14151416    c->print("Writing output image", 2);
    1416     img.toFile(c->o_name, c->o_fmt, c->options);
     1417    if (!img.toFile(c->o_name, c->o_fmt, c->options))
     1418        return IMGCNV_ERROR_WRITING_FILE;
    14171419
    14181420    return IMGCNV_ERROR_NONE;
     
    14261428int extractHistogram(DConf *c) {
    14271429    Image img(c->i_names[0], 0);
     1430    if (img.isEmpty()) return IMGCNV_ERROR_READING_FILE;
    14281431    img.process(c->getOperations(), 0, c);
    14291432    ImageHistogram hist(img);
     
    14471450int countPixels(DConf *c) {
    14481451    Image img(c->i_names[0], 0);
     1452    if (img.isEmpty()) return IMGCNV_ERROR_READING_FILE;
    14491453    std::vector<uint64> counts = img.pixel_counter( c->threshold );
    14501454    uint64 sz = img.width()*img.height();
     
    14741478
    14751479    ImageStack stack(c->i_names, c->c, &before);
     1480    if (stack.isEmpty()) return IMGCNV_ERROR_READING_FILE;
    14761481    stack.ensureTypedDepth();
    14771482    stack.resize( c->w, c->h, c->z, c->resize_method, c->resize_preserve_aspect_ratio ); 
     
    14921497
    14931498    ImageStack stack(c->i_names, c->c, &before);
     1499    if (stack.isEmpty()) return IMGCNV_ERROR_READING_FILE;
    14941500    stack.ensureTypedDepth();
    14951501    stack.process(after, 0, c);
     
    15151521
    15161522    ImageStack stack(c->i_names, c->c, &before);
     1523    if (stack.isEmpty()) return IMGCNV_ERROR_READING_FILE;
    15171524    stack.ensureTypedDepth();
    15181525    Image atlas = stack.textureAtlas(arguments);
     
    18821889    if (page==0) {
    18831890      fm.sessionParseMetaData(0);
    1884       img.set_metadata(fm.get_metadata());
    1885     }
     1891    }
     1892    img.set_metadata(fm.get_metadata());
    18861893    // ------------------------------------------------------------------
    18871894
     
    20262033
    20272034    // if the image was remapped then kill the data repos, it'll have to be reinited
    2028     if (!conf.project && (conf.display || conf.remap_channels) ) {
     2035    if (!conf.project) {
    20292036      conf.print( "About to clear image", 2 );
    20302037      img.clear();
Note: See TracChangeset for help on using the changeset viewer.