23 CPPUNIT_TEST_SUITE(mitkDICOMDCMTKTagScannerTestSuite);
28 CPPUNIT_TEST_SUITE_END();
32 mitk::DICOMDCMTKTagScanner::Pointer scanner;
50 void tearDown()
override 63 scanner->SetInputFiles(doseFiles);
64 scanner->AddTagPath(planUIDPath);
65 scanner->AddTagPath(patientName);
70 CPPUNIT_ASSERT_MESSAGE(
"Testing DICOMDCMTKTagScanner::GetFrameInfoList()", frames.size() == 1);
73 CPPUNIT_ASSERT_MESSAGE(
"Testing DICOMDCMTKTagScanner::GetFrameInfoList()", findings.size() == 1);
74 CPPUNIT_ASSERT_MESSAGE(
"Testing validity of first plan finding", findings.front().isValid);
75 CPPUNIT_ASSERT_MESSAGE(
"Testing path of first plan finding", findings.front().path == planUIDPathRef);
76 CPPUNIT_ASSERT_MESSAGE(
"Testing value of first plan finding", findings.front().value ==
"1.2.826.0.1.3680043.8.176.2013826104526987.672.1228523524");
78 findings = frames.front()->GetTagValueAsString(patientName);
79 CPPUNIT_ASSERT_MESSAGE(
"Testing DICOMDCMTKTagScanner::GetFrameInfoList()", findings.size() == 1);
80 CPPUNIT_ASSERT_MESSAGE(
"Testing validity of first plan finding", findings.front().isValid);
81 CPPUNIT_ASSERT_MESSAGE(
"Testing path of first plan finding", findings.front().path == patientName);
82 CPPUNIT_ASSERT_MESSAGE(
"Testing value of first plan finding", findings.front().value ==
"L_H");
85 void MultiFileScanning()
89 scanner->SetInputFiles(ctFiles);
90 scanner->AddTagPath(instanceUID);
95 CPPUNIT_ASSERT_MESSAGE(
"Testing DICOMDCMTKTagScanner::GetFrameInfoList()", frames.size() == 4);
98 CPPUNIT_ASSERT_MESSAGE(
"Testing DICOMDCMTKTagScanner::GetFrameInfoList()", findings.size() == 1);
99 CPPUNIT_ASSERT_MESSAGE(
"Testing validity of instance uid finding of frame 0", findings.front().isValid);
100 CPPUNIT_ASSERT_MESSAGE(
"Testing path of instance uid finding of frame 0", findings.front().path == instanceUID);
101 CPPUNIT_ASSERT_MESSAGE(
"Testing value of instance uid finding of frame 0", findings.front().value ==
"1.2.276.0.99.1.4.8323329.3795.1303917947.940051");
103 findings = frames[1]->GetTagValueAsString(instanceUID);
104 CPPUNIT_ASSERT_MESSAGE(
"Testing DICOMDCMTKTagScanner::GetFrameInfoList()", findings.size() == 1);
105 CPPUNIT_ASSERT_MESSAGE(
"Testing validity of instance uid finding of frame 1", findings.front().isValid);
106 CPPUNIT_ASSERT_MESSAGE(
"Testing path of instance uid finding of frame 1", findings.front().path == instanceUID);
107 CPPUNIT_ASSERT_MESSAGE(
"Testing value of instance uid finding of frame 1", findings.front().value ==
"1.2.276.0.99.1.4.8323329.3795.1303917947.940052");
109 findings = frames[2]->GetTagValueAsString(instanceUID);
110 CPPUNIT_ASSERT_MESSAGE(
"Testing DICOMDCMTKTagScanner::GetFrameInfoList()", findings.size() == 1);
111 CPPUNIT_ASSERT_MESSAGE(
"Testing validity of instance uid finding of frame 2", findings.front().isValid);
112 CPPUNIT_ASSERT_MESSAGE(
"Testing path of instance uid finding of frame 2", findings.front().path == instanceUID);
113 CPPUNIT_ASSERT_MESSAGE(
"Testing value of instance uid finding of frame 2", findings.front().value ==
"1.2.276.0.99.1.4.8323329.3795.1303917947.940053");
115 findings = frames[3]->GetTagValueAsString(instanceUID);
116 CPPUNIT_ASSERT_MESSAGE(
"Testing DICOMDCMTKTagScanner::GetFrameInfoList()", findings.size() == 1);
117 CPPUNIT_ASSERT_MESSAGE(
"Testing validity of instance uid finding of frame 3", findings.front().isValid);
118 CPPUNIT_ASSERT_MESSAGE(
"Testing path of instance uid finding of frame 3", findings.front().path == instanceUID);
119 CPPUNIT_ASSERT_MESSAGE(
"Testing value of instance uid finding of frame 3", findings.front().value ==
"1.2.276.0.99.1.4.8323329.3795.1303917947.940055");
DICOMTagPath & AddElement(unsigned int group, unsigned int element)
DICOMTagPath & AddAnySelection(unsigned int group, unsigned int element)
Class is used to identify (nested) attributes in a DICOM dataset. In contrast to the class DICOMTag...
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
static std::string GetTestDataFilePath(const std::string &testData)
Get the absolute path for test data.
std::list< DICOMDatasetFinding > FindingsListType
Test fixture for parameterized tests.
std::vector< std::string > StringList
std::vector< DICOMDatasetAccessingImageFrameInfo::Pointer > DICOMDatasetAccessingImageFrameList
DICOMTagPath & AddSelection(unsigned int group, unsigned int element, ItemSelectionIndex index)