DICOMeter is a simple application to read DICOM (Digital Imaging and Communications in Medicine) files. It can be used as a template for working with such files using the Qt and the DCMTK libraries on x64 Windows.
At this point in time DICOMeter limits itself to opening a DICOM file and presenting its associated image and the "patient name" field from the file's metadata.
This is very, very far from being a thoroughly tested way of handling DICOM files; there are many DICOM files not handled well by this application. It can however be used as a starting point for using DCMTK. Some sample files known to work are provided within the "sample-dicom-files" directory (taken from this repository); contributions are welcome.
Follow the following steps to build and run DICOMeter on your machine:
-
Assure Required Software Are Installed
Make sure you have installed the following software components on your machine:- Visual Studio
- Visual Studio Code (not strictly necessary but good to have)
- Python
- CMake
- Make
-
Install vcpkg and the required vcpkg packages
DICOMeter uses vcpkg, a C++ package manager, to manage some of its requirements; make sure to follow the following steps to install vcpkg in your machine and acquire the required packages:
- Navigate to a folder where vcpkg is to be installed; as a suggestion, "C:\devtools"
- Clone the vcpkg repository on GitHub and cd onto it:
git clone https://github.com/microsoft/vcpkg.git && cd vcpkg
- Run vcpkg's bootstrap batch script, which will download and build the vcpkg executable:
bootstrap-vcpkg.bat
- Integrate vcpkg with Visual Studio (optional, but recommended):
vcpkg integrate install
- Add a VCPKG_ROOT environment variable pointing to the vcpkg directory (if the suggestion was followed, it should be "C:\devtools\vcpkg")
- Add an entry to the path environment variable pointing to that same directory to make vcpkg's executable accessible through the command line (restart command line so that this change takes place)
At this point, vcpkg is installed; now, install the dependencies:
- Install the required packages for the build, which are provided by vcpkg (this might take a while):
vcpkg install qt5-base:x64-windows dcmtk:x64-windows
-
Clone and Build DICOMeter At this point, we have everything we need to clone and build DICOMeter
-
Clone DICOMeter's repository somewhere and cd onto it:
git clone https://github.com/DaviFN/DICOMeter && cd DICOMeter
-
Generate the Visual Studio solution by issuing the following command:
make
-
Open the solution with the following command:
make open
Obs: it may be needed to run Visual Studio / Visual Studio Code as admin
-
Open the solution explorer window, if not open already (CTRL + ALT + L hotkey)
-
Right-click the "INSTALL" project and select "build"; wait until the build process completes
-
-
Run the Application
- Set the DICOMeter target to be the startup one by right-clicking it and selecting "set as startup project"
- Launch the app through the Local Windows Debugger (or directly via the generated executable file)
This application is licensed under the GNU GENERAL PUBLIC LICENSE v3.
Third-party libraries use their own licenses:
- [Qt] (GNU General Public License (GPL) v3): https://www.gnu.org/licenses/gpl-3.0.en.html
- [DCMTK] (OFFIS license): https://support.dcmtk.org/docs/file_copyright.html