A modern WPF application for viewing and processing DICOM medical images. Built with C# and powered by the fo-dicom library.
- High-quality DICOM image rendering
- Window/Level adjustment for optimal contrast
- Pan and zoom functionality
- Support for multi-frame images
- Open individual DICOM files (.dcm, .dicom)
- Load entire DICOM series from folders
- Drag & drop support for files and folders
- Automatic DICOM file detection
- Series navigation with slider controls
- Mouse wheel scrolling through image stacks
- Previous/Next image buttons
- Patient information (name, ID, birth date, sex)
- Study details (date, description, modality, institution)
- Image properties (size, frames, window settings)
- Collapsible metadata panel
- Window/Level Tool: Adjust brightness and contrast with mouse drag
- Pan Tool: Move images around the viewport
- Zoom Tool: Scale images with mouse interaction
- Reset View: Restore original image settings
- Asynchronous file loading
- Efficient memory management
- Extensible interface-based architecture
- Support for various DICOM modalities
- Operating System: Windows 10 or later
- Framework: .NET 10.0
- Dependencies:
- fo-dicom 5.2.5
- WPF (Windows Presentation Foundation)
- Install .NET 10 SDK
- Ensure you have Visual Studio 2022 or later with WPF development tools
-
Clone the repository:
git clone https://github.com/gaukem/DcmSharp.git cd DcmSharp -
Restore NuGet packages:
dotnet restore
-
Build the project:
dotnet build
-
Run the application:
dotnet run --project DcmSharp
- Open
DcmSharp.slnin Visual Studio - Build the solution (F6)
- Run the application (F5)
- File Menu: Use "Open DICOM File..." or "Open Folder..."
- Toolbar: Click the "?? Open" button
- Drag & Drop: Drag DICOM files or folders directly onto the application window
- Window/Level: Select the W/L tool and drag mouse vertically (center) or horizontally (width)
- Pan: Select pan tool and drag to move the image
- Zoom: Use zoom tool with mouse drag or mouse wheel
- Reset: Click "Reset View" to restore original settings
- For multi-image series, use the slider in the metadata panel
- Mouse wheel scrolls through images when multiple images are loaded
- Previous/Next buttons provide manual navigation
Ctrl+O: Open DICOM fileAlt+F4: Exit application
The application follows a clean architecture with the following key interfaces:
IDicomImageLoader: Handles loading and parsing DICOM filesIDicomImage: Represents DICOM image data and metadataIDicomImageRenderer: Manages image rendering and transformationsIAnnotationService: Handles image annotations (planned feature)IPacsClient: DICOM network communication (planned feature)
DcmSharp/
Interfaces/ # Core interfaces
Models/ # Data models
Services/ # Business logic implementations
MainWindow.xaml # Main UI
MainWindow.xaml.cs # Main window logic
App.xaml # Application entry point
- Annotation tools (lines, rectangles, measurements)
- PACS communication (C-FIND, C-MOVE, C-STORE)
- DICOM export functionality
- Advanced image processing filters
- Multi-monitor support
- Plugin architecture for extensions
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and test thoroughly
- Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/your-feature - Submit a pull request
- Follow C# coding conventions
- Use meaningful variable and method names
- Add XML documentation comments
- Write unit tests for new functionality
This project is licensed under the MIT License - see the LICENSE file for details.
- fo-dicom - DICOM library for .NET
- Microsoft WPF team for the UI framework
- DICOM Standard Committee for the medical imaging standard
If you encounter any issues or have questions:
- Open an issue on GitHub
- Check the DICOM Standard for technical details
Disclaimer: This software is for educational and research purposes. Not intended for clinical use without proper validation and regulatory approval.