Skip to content

Commit

Permalink
added support for reading chunky multi-sample data
Browse files Browse the repository at this point in the history
  • Loading branch information
jkriege2 committed Oct 12, 2020
1 parent c95aa91 commit c9d5fd6
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 69 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ This library currently support TIFF files, which meet the following criteria:
* uncompressed frames
* one, or more samples per frame
* data types: UINT, INT, FLOAT, 8-64bit
* planar data organization only, for multi-sample data
* planar and chunky data organization, for multi-sample data
* no suppoer for palleted images
* stripped TIFFs only, tiling is not supported

## Usage
Expand Down
3 changes: 2 additions & 1 deletion doc/dox/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ This is a lightweight C++ library that allows to read and write TIFF files. It o
- uncompressed frames
- one, or more samples per frame
- data types: UINT, INT, FLOAT, 8-64bit
- planar data organization only, for multi-sample data
- planar and chunky data organization, for multi-sample data
- no suppoer for palleted images
- stripped TIFFs only, tiling is not supported
.

Expand Down
164 changes: 101 additions & 63 deletions src/tinytiffreader.c

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions tests/tinytiffreader_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ install(FILES ${CMAKE_CURRENT_LIST_DIR}/circuit.tif DESTINATION ${CMAKE_INSTALL_
install(FILES ${CMAKE_CURRENT_LIST_DIR}/galaxy.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/mri.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/corel_photopaint_grey.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/corel_photopaint_grey16.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/corel_photopaint_greyalpha.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/corel_photopaint_rgb.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/corel_photopaint_rgb48.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/corel_photopaint_rgba.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/imagej_32bit_ramp_tiled.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/circuit_nocompression.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/galaxy_nocompression.tif DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 15 additions & 4 deletions tests/tinytiffreader_test/tinytiffreader_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,16 @@ int main(int argc, char *argv[]) {
TEST_AGAINST_LIBTIFF<uint8_t>("multi-channel-time-series.ome.tif", test_results);
TEST_AGAINST_LIBTIFF<uint16_t>("test16m_imagej.tif", test_results);
TEST_AGAINST_LIBTIFF<float>("imagej_32bit_ramp.tif", test_results);
TEST_AGAINST_LIBTIFF<uint8_t>("imagej_32bit_ramp_tiled.tif", test_results);
TEST_AGAINST_LIBTIFF<uint8_t>("circuit_nocompression.tif", test_results);
TEST_AGAINST_LIBTIFF<uint8_t>("mri_nocompression.tif", test_results);
TEST_AGAINST_LIBTIFF<uint8_t>("galaxy_nocompression.tif", test_results);
//TEST_AGAINST_LIBTIFF<uint8_t>("corel_photopaint_grey.tif", test_results);
TEST_AGAINST_LIBTIFF<uint8_t>("imagej_32bit_ramp_tiled.tif", test_results);
TEST_AGAINST_LIBTIFF<uint8_t>("corel_photopaint_grey.tif", test_results);
TEST_AGAINST_LIBTIFF<uint16_t>("corel_photopaint_grey16.tif", test_results);
TEST_AGAINST_LIBTIFF<uint8_t>("corel_photopaint_greyalpha.tif", test_results);
TEST_AGAINST_LIBTIFF<uint8_t>("corel_photopaint_rgb.tif", test_results);
TEST_AGAINST_LIBTIFF<uint16_t>("corel_photopaint_rgb48.tif", test_results);
TEST_AGAINST_LIBTIFF<uint8_t>("corel_photopaint_rgba.tif", test_results);
#else
//TEST_SIMPLE<uint16_t>("2K_source_Stack.tif", test_results);
//TEST_SIMPLE<uint16_t>("2K_tiff_image.tif", test_results);
Expand All @@ -700,11 +705,17 @@ int main(int argc, char *argv[]) {
TEST_SIMPLE<uint8_t>("multi-channel-time-series.ome.tif", test_results);
TEST_SIMPLE<uint16_t>("test16m_imagej.tif", test_results);
TEST_SIMPLE<float>("imagej_32bit_ramp.tif", test_results);
TEST_SIMPLE<uint8_t>("imagej_32bit_ramp_tiled.tif", test_results);
TEST_SIMPLE<uint8_t>("circuit_nocompression.tif", test_results);
TEST_SIMPLE<uint8_t>("mri_nocompression.tif", test_results);
TEST_SIMPLE<uint8_t>("galaxy_nocompression.tif", test_results);
//TEST_SIMPLE<uint8_t>("corel_photopaint_grey.tif", test_results);
TEST_SIMPLE<uint8_t>("imagej_32bit_ramp_tiled.tif", test_results);
TEST_SIMPLE<uint8_t>("corel_photopaint_grey.tif", test_results);
TEST_SIMPLE<uint16_t>("corel_photopaint_grey16.tif", test_results);
TEST_SIMPLE<uint8_t>("corel_photopaint_greyalpha.tif", test_results);
TEST_SIMPLE<uint8_t>("corel_photopaint_rgb.tif", test_results);
TEST_SIMPLE<uint16_t>("corel_photopaint_rgb48.tif", test_results);
TEST_SIMPLE<uint8_t>("corel_photopaint_rgba.tif", test_results);


#endif

Expand Down

0 comments on commit c9d5fd6

Please sign in to comment.