Commit b60a4ede authored by Samuel Debionne's avatar Samuel Debionne
Browse files

Add preliminary tests for exotic image type (aka 4bit)

parent 63fb49c6
......@@ -8,11 +8,11 @@
"configurations": [
{
"name": "WSL-Debug",
"generator": "Unix Makefiles",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeExecutable": "//home/debionne/miniconda3/envs/lima2/bin/cmake",
"remotePreGenerateCommand": "conda activate lima2",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
......@@ -75,11 +75,11 @@
},
{
"name": "WSL-Release",
"generator": "Unix Makefiles",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeExecutable": "//home/debionne/miniconda3/envs/lima2/bin/cmake",
"remotePreGenerateCommand": "conda activate lima2",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
......
......@@ -5,6 +5,7 @@
# http://www.boost.org/LICENSE_1_0.txt)
add_subdirectory(channels)
add_subdirectory(images)
add_subdirectory(serial)
if(LIMA_ENABLE_MPI)
add_subdirectory(mpi)
......
# Copyright (C) 2018 Samuel Debionne, ESRF.
# Use, modification and distribution is subject to the Boost Software
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
add_executable(test_process_images
main.cpp
test_4bit.cpp
)
target_precompile_headers(test_process_images
REUSE_FROM lima-pch)
target_link_libraries(test_process_images
lima-core
Boost::unit_test_framework
TIFF::TIFF
)
add_test(NAME test_process_images
COMMAND test_process_images
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data
)
// Copyright (C) 2018 Samuel Debionne, ESRF.
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_TEST_MODULE process_tasks
#include <boost/test/unit_test.hpp>
// Copyright (C) 2018 Samuel Debionne, ESRF.
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/test/unit_test.hpp>
#include <boost/gil/algorithm.hpp>
#include <lima/typedefs.hpp>
namespace gil = boost::gil;
BOOST_AUTO_TEST_CASE(test_4bit)
{
gil::gray4_image_t img(16, 16);
gil::generate_pixels(gil::view(img), [n = 0]() mutable { return (n++) % 16; });
gil::point_t roi_topleft(10, 10);
gil::point_t roi_dim(2, 4);
auto roi = gil::subimage_view(gil::const_view(img), roi_topleft, roi_dim);
auto rotated = gil::rotated90cw_view(gil::const_view(img));
auto transposed = gil::transposed_view(gil::const_view(img));
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment