File: series_test.hpp

package info (click to toggle)
sight 25.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,252 kB
  • sloc: cpp: 310,629; xml: 17,622; ansic: 9,960; python: 1,379; sh: 144; makefile: 33
file content (245 lines) | stat: -rw-r--r-- 8,801 bytes parent folder | download | duplicates (2)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
/************************************************************************
 *
 * Copyright (C) 2022-2024 IRCAD France
 *
 * This file is part of Sight.
 *
 * Sight is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Sight 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with Sight. If not, see <https://www.gnu.org/licenses/>.
 *
 ***********************************************************************/

#pragma once

#include <data/image_series.hpp>
#include <data/model_series.hpp>

#include <cppunit/extensions/HelperMacros.h>

namespace sight::data::ut
{

class series_test : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE(series_test);

CPPUNIT_TEST(private_tag_test);
CPPUNIT_TEST(multi_frame_private_tag_test);
CPPUNIT_TEST(attr_patient_test);
CPPUNIT_TEST(attr_study_test);
CPPUNIT_TEST(attr_equipment_test);
CPPUNIT_TEST(attr_instance_uid_test);
CPPUNIT_TEST(attr_modality_test);
CPPUNIT_TEST(attr_date_test);
CPPUNIT_TEST(attr_time_test);
CPPUNIT_TEST(attr_performing_physician_name_test);
CPPUNIT_TEST(attr_description_test);
CPPUNIT_TEST(attr_enhanced_us_image_test);
CPPUNIT_TEST(attr_general_acquisition_test);
CPPUNIT_TEST(attr_ultrasound_frame_of_reference_test);

CPPUNIT_TEST(equality_test);

CPPUNIT_TEST(sop_class_uid_test);
CPPUNIT_TEST(sop_instance_uid_test);
CPPUNIT_TEST(specific_character_set_test);
CPPUNIT_TEST(encoding_test);
CPPUNIT_TEST(series_date_test);
CPPUNIT_TEST(series_time_test);
CPPUNIT_TEST(modality_test);
CPPUNIT_TEST(series_description_test);
CPPUNIT_TEST(performing_physician_name_test);
CPPUNIT_TEST(anatomical_orientation_type_test);
CPPUNIT_TEST(body_part_examined_test);
CPPUNIT_TEST(protocol_name_test);
CPPUNIT_TEST(patient_position_test);
CPPUNIT_TEST(series_instance_uid_test);
CPPUNIT_TEST(series_number_test);
CPPUNIT_TEST(laterality_test);
CPPUNIT_TEST(performed_procedure_step_start_date_test);
CPPUNIT_TEST(performed_procedure_step_start_time_test);
CPPUNIT_TEST(performed_procedure_step_end_date_test);
CPPUNIT_TEST(performed_procedure_step_end_time_test);
CPPUNIT_TEST(performed_procedure_step_id_test);
CPPUNIT_TEST(performed_procedure_step_description_test);
CPPUNIT_TEST(comments_on_the_performed_procedure_step_test);
CPPUNIT_TEST(institution_name_test);
CPPUNIT_TEST(patient_name_test);
CPPUNIT_TEST(patient_id_test);
CPPUNIT_TEST(patient_birth_date_test);
CPPUNIT_TEST(patient_sex_test);
CPPUNIT_TEST(study_date_test);
CPPUNIT_TEST(study_time_test);
CPPUNIT_TEST(referring_physician_name_test);
CPPUNIT_TEST(study_description_test);
CPPUNIT_TEST(study_instance_uid_test);
CPPUNIT_TEST(study_id_test);
CPPUNIT_TEST(patient_age_test);
CPPUNIT_TEST(patient_size_test);
CPPUNIT_TEST(patient_weight_test);
CPPUNIT_TEST(acquisition_date_test);
CPPUNIT_TEST(acquisition_time_test);
CPPUNIT_TEST(acquisition_number_test);
CPPUNIT_TEST(instance_number_test);
CPPUNIT_TEST(content_time_test);
CPPUNIT_TEST(contrast_bolus_agent_test);
CPPUNIT_TEST(contrast_bolus_route_test);
CPPUNIT_TEST(contrast_bolus_volume_test);
CPPUNIT_TEST(contrast_bolus_start_time_test);
CPPUNIT_TEST(contrast_bolus_stop_time_test);
CPPUNIT_TEST(contrast_bolus_total_dose_test);
CPPUNIT_TEST(contrast_flow_rate_test);
CPPUNIT_TEST(contrast_flow_duration_test);
CPPUNIT_TEST(contrast_bolus_ingredient_test);
CPPUNIT_TEST(contrast_bolus_ingredient_concentration_test);
CPPUNIT_TEST(rows_test);
CPPUNIT_TEST(columns_test);
CPPUNIT_TEST(window_center_test);
CPPUNIT_TEST(window_width_test);
CPPUNIT_TEST(image_position_patient_test);
CPPUNIT_TEST(image_orientation_patient_test);
CPPUNIT_TEST(image_transform_patient_test);
CPPUNIT_TEST(frame_acquisition_date_time_test);
CPPUNIT_TEST(frame_acquisition_time_point_test);
CPPUNIT_TEST(frame_comments_test);
CPPUNIT_TEST(frame_label_test);
CPPUNIT_TEST(string_conversion_test);

CPPUNIT_TEST(copy_patient_module_test);
CPPUNIT_TEST(copy_general_study_module_test);
CPPUNIT_TEST(copy_patient_study_module_test);
CPPUNIT_TEST(copy_general_series_module_test);
CPPUNIT_TEST(copy_general_equipment_module_test);
CPPUNIT_TEST(copy_sop_common_module_test);
CPPUNIT_TEST(copy_general_image_module_test);

CPPUNIT_TEST(get_patient_position_string_test);

CPPUNIT_TEST(new_instances_test);
CPPUNIT_TEST(iso_date_time_test);
CPPUNIT_TEST(path_test);

CPPUNIT_TEST_SUITE_END();

public:

    // interface
    void setUp() override;
    void tearDown() override;

    static void private_tag_test();
    static void multi_frame_private_tag_test();

    void attr_patient_test();
    void attr_study_test();
    void attr_equipment_test();
    void attr_instance_uid_test();
    void attr_modality_test();
    void attr_date_test();
    void attr_time_test();
    void attr_performing_physician_name_test();
    void attr_description_test();
    void attr_enhanced_us_image_test();
    void attr_general_acquisition_test();
    void attr_ultrasound_frame_of_reference_test();

    static void equality_test();

    static void sop_class_uid_test();
    static void sop_instance_uid_test();
    static void specific_character_set_test();
    static void encoding_test();
    static void series_date_test();
    static void series_time_test();
    static void modality_test();
    static void series_description_test();
    static void performing_physician_name_test();
    static void anatomical_orientation_type_test();
    static void body_part_examined_test();
    static void protocol_name_test();
    static void patient_position_test();
    static void series_instance_uid_test();
    static void series_number_test();
    static void laterality_test();
    static void performed_procedure_step_start_date_test();
    static void performed_procedure_step_start_time_test();
    static void performed_procedure_step_end_date_test();
    static void performed_procedure_step_end_time_test();
    static void performed_procedure_step_id_test();
    static void performed_procedure_step_description_test();
    static void comments_on_the_performed_procedure_step_test();
    static void institution_name_test();
    static void patient_name_test();
    static void patient_id_test();
    static void patient_birth_date_test();
    static void patient_sex_test();
    static void study_date_test();
    static void study_time_test();
    static void referring_physician_name_test();
    static void study_description_test();
    static void study_instance_uid_test();
    static void study_id_test();
    static void patient_age_test();
    static void patient_size_test();
    static void patient_weight_test();
    static void acquisition_date_test();
    static void acquisition_time_test();
    static void acquisition_number_test();
    static void instance_number_test();
    static void content_time_test();
    static void contrast_bolus_agent_test();
    static void contrast_bolus_route_test();
    static void contrast_bolus_volume_test();
    static void contrast_bolus_start_time_test();
    static void contrast_bolus_stop_time_test();
    static void contrast_bolus_total_dose_test();
    static void contrast_flow_rate_test();
    static void contrast_flow_duration_test();
    static void contrast_bolus_ingredient_test();
    static void contrast_bolus_ingredient_concentration_test();
    static void rows_test();
    static void columns_test();
    static void window_center_test();
    static void window_width_test();
    static void image_position_patient_test();
    static void image_orientation_patient_test();
    static void image_transform_patient_test();
    static void frame_acquisition_date_time_test();
    static void frame_acquisition_time_point_test();
    static void frame_comments_test();
    static void frame_label_test();

    static void string_conversion_test();

    static void copy_patient_module_test();
    static void copy_general_study_module_test();
    static void copy_patient_study_module_test();
    static void copy_general_series_module_test();
    static void copy_general_equipment_module_test();
    static void copy_sop_common_module_test();
    static void copy_general_image_module_test();

    static void get_patient_position_string_test();

    static void new_instances_test();
    static void iso_date_time_test();
    static void path_test();

protected:

    using series_vector_t = std::vector<std::shared_ptr<series> >;

    series_vector_t m_series;
};

} // namespace sight::data::ut