/usr/include/mia-2.4/mia/3d/fifotestfixture.hh is in libmia-2.4-dev 2.4.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | /* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA 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.
*
* This program 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 MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_3d_fifotestfixture_hh
#define mia_3d_fifotestfixture_hh
#include <vector>
#include <mia/3d/2dimagefifofilter.hh>
NS_MIA_BEGIN
typedef std::vector<P2DImage> C2DImageStack;
/**
@ingroup test
@brief a fixture to test FIFO filtering
@tparam A the input data type
@tparam B the extected data type
@param input_data the input data as flat array
@param test_data the expected result data as flat array
@param size the size of the input slices
@param slices the number of slices to process.
*/
struct EXPORT_3D fifof_Fixture {
template <typename A, typename B>
void prepare(const A *input_data, const B *test_data, const C2DBounds& size, size_t slices);
void call_test( C2DImageFifoFilter& filter)const ;
C2DImageStack m_in_data;
C2DImageStack m_test_data;
};
template <typename A, typename B>
void fifof_Fixture::prepare(const A *input_data, const B *test_data, const C2DBounds& size, size_t n_slices)
{
m_in_data.clear();
m_test_data.clear();
size_t slice_size = size.x * size.y;
cvdebug() << "the test image size is " << size << "\n";
for (size_t i = 0; i < n_slices; ++i, input_data += slice_size, test_data += slice_size) {
m_in_data.push_back(P2DImage(new T2DImage<A>(size, input_data)));
m_test_data.push_back(P2DImage(new T2DImage<B>(size, test_data)));
}
}
NS_MIA_END
#endif
|