GDCM: deduplication implementation of Dicom file PCDE test program

GDCM: deduplication implementation of Dicom file PCDE test program

Dicom is a medical image and data exchange standard that can be used to transmit, store and display medical images. Due to the particularity of medical data, it is necessary to properly manage the data during data processing to ensure the integrity and correctness of the data. When processing DICOM files, the problem of multiple files duplication often occurs, which will lead to inaccurate processing results and unsatisfactory data analysis results. In order to solve this problem, we can implement it by writing a deduplication program. The following describes how to implement the deduplication function of Dicom files under the GDCM framework.

1. Project environment configuration

1. Install GDCM

First, you need to install GDCM in the local computer, and then import the relevant header files and link libraries, so that you can use GDCM to operate DICOM files in the program. The installation method is as follows:

git clone git://git.code.sf.net/p/gdcm/gdcm
mkdir build
cd build
cmake ../gdcm
make install

2. Download the test data set

Dataset download address: https://www.med.harvard.edu/jpnm/medphys/download/dicom_test_files.zip

2. Source code implementation

1. Read DICOM files

First of all, we need to read the DICOM file and store the key information in the file in the map to determine whether two DICOM files are duplicates.

#include "gdcmReader.h

Guess you like

Origin blog.csdn.net/Jack_user/article/details/132294004