|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Utility class for testing DICOM file loading and comparing loaded image properties. More...
#include <mitkTestDICOMLoading.h>
Public Types | |
| typedef std::list< Image::Pointer > | ImageList |
| List of loaded image pointers. More... | |
Public Member Functions | |
| TestDICOMLoading () | |
| ImageList | LoadFiles (const StringList &files) |
| Load DICOM files and return the resulting images. More... | |
| Image::Pointer | DecorateVerifyCachedImage (const StringList &files, mitk::Image::Pointer cachedImage) |
| Verify a cached image by decorating it with DICOM properties. More... | |
| Image::Pointer | DecorateVerifyCachedImage (const StringList &files, DICOMTagCache *tagCache, mitk::Image::Pointer cachedImage) |
| Verify a cached image using a specific tag cache. More... | |
| std::string | DumpImageInformation (const Image *image) |
| Dump relevant image information to a string for later comparison. More... | |
| bool | CompareImageInformationDumps (const std::string &reference, const std::string &test) |
| Compare two image information dumps for equality. More... | |
Utility class for testing DICOM file loading and comparing loaded image properties.
Provides methods to load DICOM files, dump image metadata to a string representation, and compare two metadata dumps for equality. Used in MITK's DICOM-related test suites to verify that DICOM loading produces expected results.
Definition at line 31 of file mitkTestDICOMLoading.h.
| typedef std::list<Image::Pointer> mitk::TestDICOMLoading::ImageList |
List of loaded image pointers.
Definition at line 35 of file mitkTestDICOMLoading.h.
| mitk::TestDICOMLoading::TestDICOMLoading | ( | ) |
| bool mitk::TestDICOMLoading::CompareImageInformationDumps | ( | const std::string & | reference, |
| const std::string & | test | ||
| ) |
Compare two image information dumps for equality.
Performs a field-by-field comparison of two dumps produced by DumpImageInformation(), with tolerance for floating-point values.
| [in] | reference | The reference dump string. |
| [in] | test | The test dump string to compare against the reference. |
true if the dumps are sufficiently equal, false otherwise.| Image::Pointer mitk::TestDICOMLoading::DecorateVerifyCachedImage | ( | const StringList & | files, |
| DICOMTagCache * | tagCache, | ||
| mitk::Image::Pointer | cachedImage | ||
| ) |
Verify a cached image using a specific tag cache.
| [in] | files | The original file list. |
| [in] | tagCache | The DICOM tag cache to use for property lookup. |
| [in] | cachedImage | The cached image to verify and decorate. |
| Image::Pointer mitk::TestDICOMLoading::DecorateVerifyCachedImage | ( | const StringList & | files, |
| mitk::Image::Pointer | cachedImage | ||
| ) |
Verify a cached image by decorating it with DICOM properties.
| [in] | files | The original file list used to produce the cached image. |
| [in] | cachedImage | The cached image to verify and decorate. |
| std::string mitk::TestDICOMLoading::DumpImageInformation | ( | const Image * | image | ) |
Dump relevant image information to a string for later comparison.
Serializes geometry, pixel type, dimensions, and key DICOM properties of the image into a human-readable string format.
| [in] | image | The image to dump information for. |
| ImageList mitk::TestDICOMLoading::LoadFiles | ( | const StringList & | files | ) |
Load DICOM files and return the resulting images.
Uses the internal DICOMFileReader to load the given files and returns a list of loaded Image objects.
| [in] | files | List of file paths to load. |