Skip to content

gaukem/DcmSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DcmSharp - DICOM Viewer

.NET License

A modern WPF application for viewing and processing DICOM medical images. Built with C# and powered by the fo-dicom library.

Features

Image Display

  • High-quality DICOM image rendering
  • Window/Level adjustment for optimal contrast
  • Pan and zoom functionality
  • Support for multi-frame images

File Management

  • Open individual DICOM files (.dcm, .dicom)
  • Load entire DICOM series from folders
  • Drag & drop support for files and folders
  • Automatic DICOM file detection

Navigation

  • Series navigation with slider controls
  • Mouse wheel scrolling through image stacks
  • Previous/Next image buttons

Metadata Display

  • Patient information (name, ID, birth date, sex)
  • Study details (date, description, modality, institution)
  • Image properties (size, frames, window settings)
  • Collapsible metadata panel

Tools

  • 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

Technical Features

  • Asynchronous file loading
  • Efficient memory management
  • Extensible interface-based architecture
  • Support for various DICOM modalities

Requirements

  • Operating System: Windows 10 or later
  • Framework: .NET 10.0
  • Dependencies:
    • fo-dicom 5.2.5
    • WPF (Windows Presentation Foundation)

Installation

Prerequisites

  1. Install .NET 10 SDK
  2. Ensure you have Visual Studio 2022 or later with WPF development tools

Build from Source

  1. Clone the repository:

    git clone https://github.com/gaukem/DcmSharp.git
    cd DcmSharp
  2. Restore NuGet packages:

    dotnet restore
  3. Build the project:

    dotnet build
  4. Run the application:

    dotnet run --project DcmSharp

Using Visual Studio

  1. Open DcmSharp.sln in Visual Studio
  2. Build the solution (F6)
  3. Run the application (F5)

Usage

Opening DICOM Files

  • 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

Image Manipulation

  • 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

Series Navigation

  • 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

Keyboard Shortcuts

  • Ctrl+O: Open DICOM file
  • Alt+F4: Exit application

Architecture

Core Interfaces

The application follows a clean architecture with the following key interfaces:

  • IDicomImageLoader: Handles loading and parsing DICOM files
  • IDicomImage: Represents DICOM image data and metadata
  • IDicomImageRenderer: Manages image rendering and transformations
  • IAnnotationService: Handles image annotations (planned feature)
  • IPacsClient: DICOM network communication (planned feature)

Project Structure

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

Planned Features

  • 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

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes and test thoroughly
  4. Commit your changes: git commit -am 'Add some feature'
  5. Push to the branch: git push origin feature/your-feature
  6. Submit a pull request

Coding Standards

  • Follow C# coding conventions
  • Use meaningful variable and method names
  • Add XML documentation comments
  • Write unit tests for new functionality

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • fo-dicom - DICOM library for .NET
  • Microsoft WPF team for the UI framework
  • DICOM Standard Committee for the medical imaging standard

Support

If you encounter any issues or have questions:


Disclaimer: This software is for educational and research purposes. Not intended for clinical use without proper validation and regulatory approval.

About

Build a DICOM software by .NET technical

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages