Carna  Version 3.3.2
BufferedIntensityVolumeTest.h
1 /*
2  * Copyright (C) 2021 Leonid Kostrykin
3  *
4  */
5 
6 #pragma once
7 
8 #include <Carna/Carna.h>
10 
11 namespace Carna
12 {
13 
14 namespace testing
15 {
16 
17 
18 
19 // ----------------------------------------------------------------------------------
20 // BufferedIntensityVolumeTest
21 // ----------------------------------------------------------------------------------
22 
29 class BufferedIntensityVolumeTest : public QObject
30 {
31 
32  Q_OBJECT
33 
34 private slots:
35 
38  void initTestCase();
39 
42  void cleanupTestCase();
43 
46  void init();
47 
50  void cleanup();
51 
52  // ---------------------------------------------------------------------------------
53 
54  void test_bufferValueToIntensity();
55 
56  void test_intensityToBufferValue();
57 
58  void test_instantiation();
59 
60  void test_parenthesisOperator();
61 
62  void test_setVoxel();
63 
64  // ---------------------------------------------------------------------------------
65 
66 private:
67 
68  unsigned int indexByPosition( const base::math::Vector3ui& ) const;
69 
70  float intensityByIndex( unsigned int index ) const;
71 
73 
74  std::unique_ptr< base::IntensityVolumeUInt16 > volume;
75 
76 }; // BufferedIntensityVolumeTest
77 
78 
79 
80 } // namespace testing
81 
82 } // namespace Carna
Unit-tests of the Carna::base::BufferedIntensityVolume class.
Eigen::Matrix< unsigned int, 3, 1 > Vector3ui
Defines vector.
Definition: math.h:199
Defines Carna::base::BufferedIntensityVolume.
BufferType Buffer
Holds the used buffer type.