/* * hdfsee.c * * Quick yet non-crappy HDF viewer * * Copyright © 2012-2020 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * Copyright © 2012 Richard Kirian * * Authors: * 2009-2014 Thomas White * 2014 Valerio Mariani * 2012 Richard Kirian * * This file is part of CrystFEL. * * CrystFEL is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * CrystFEL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with CrystFEL. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "dw-hdfsee.h" #include "utils.h" #include "render.h" /* Global program state */ DisplayWindow *main_window_list[64]; size_t main_n_windows = 0; static void show_help(const char *s) { printf("Syntax: %s [options] image.h5\n\n", s); printf( "Quick HDF5 image viewer.\n" "\n" " -h, --help Display this help message.\n" " --version Print CrystFEL version number and exit.\n" "\n" " -p, --peak-overlay= Draw circles in positions listed in file.\n" " --ring-size= Set the size for those circles.\n" " -i, --int-boost= Multiply intensity by .\n" " -b, --binning= Set display binning to .\n" " --filter-noise Apply an aggressive noise filter to the\n" " image data.\n" " --median-filter= Apply a median filter to the image data.\n" " --calibration-mode Start in calibration mode\n" " --show-rings Overlay rings that indicate resolution.\n" " --simple-rings=XX,YY,... Overlay rings at specified radii XX, YY, ...\n" " in pixel units.\n" " -c, --colscale= Use the given colour scale. Choose from:\n" " mono : Greyscale, black is zero.\n" " invmono : Greyscale, white is zero.\n" " colour : Colour scale:\n" " black-blue-pink-red-orange-\n" " -yellow-white.\n" " -e, --image= Start up displaying this image from the\n" " HDF5 file. When this option is used,\n" " information about the data layout\n" " from the geometry file is ignored (See\n" " manual page).\n" " Example: /data/data0.\n" " --event= Event to show from multi-event file.\n" " -g, --geometry= Use geometry from file for display.\n" " (When this option is used, the value of\n" " of the -e parameter is ignored)\n" " -o, --rigid-groups= Use rigid group collection .\n" "\n"); } /* Called to notify that an image display window has been closed */ void hdfsee_window_closed(DisplayWindow *dw) { size_t i; for ( i=0; i