Click here to Skip to main content
13,050,617 members (74,965 online)
Click here to Skip to main content


116 bookmarked
Posted 27 Sep 2012

Medical image visualization using WPF

, 27 Sep 2012
The article demonstrates the visualization of medical images (DICOM) using WPF.
<Window x:Class="DICOMViewer.MainWindow"
    Title="DICOM Viewer">

            <RowDefinition Height="20" />
            <RowDefinition Height="*"  />

            <ColumnDefinition Width="40*" />
            <ColumnDefinition Width="60*" />
        <Menu Grid.Row="0" Grid.ColumnSpan="2">
            <MenuItem Header="_File">
                <MenuItem Header="_Load..." Click="MenuItem_LoadClick" />
                <Separator />
                <MenuItem Header="_Exit" Click="MenuItem_ExitClick" />
            <MenuItem Header="_About" Click="MenuItem_AboutClick" />
        <TreeView Grid.Row="1" Grid.Column="0" Margin="5,5,5,5" Name="mIODTree" BorderThickness="0" FontSize="12" FontFamily="Courier New" SelectedItemChanged="mIODTree_SelectedItemChanged" />
        <Grid Grid.Row="1" Grid.Column="1" Name="mGrid" >
                <!-- Height of first row (Buttons) and last row (Bitmap) is set to zero in order to hide them -->
                <!-- Only in case of a CT Slice with processable pixel data, the Height is set to a reasonable value in code -->
                <RowDefinition Height="0" />
                <RowDefinition Height="*"  />
                <RowDefinition Height="0" />

            <Button Grid.Row="0" Height="25" Width="150" Margin="5,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Top" Click="ButtonImageFlow_Click">Show ImageFlow...</Button>
            <Button Grid.Row="0" Height="25" Width="150" Margin="160,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Top" Click="ButtonVolumeBones_Click">Show Volume (Bones)...</Button>
            <Button Grid.Row="0" Height="25" Width="150" Margin="315,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Top" Click="ButtonVolumeSkin_Click">Show Volume (Skin)...</Button>
            <TreeView Grid.Row="1" Name="mDICOMTagTree" Margin="5,5,5,5" BorderThickness="0" FontSize="12" FontFamily="Courier New" HorizontalAlignment="Stretch"/>
            <Image Grid.Row="2" Name="mImage" Margin="5,5,5,10" HorizontalAlignment="Center"/>
        <GridSplitter Grid.Row="1" Grid.Column="0" Width="2" />

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Bernhard Kügle
Software Developer (Senior) Siemens Healthcare
Germany Germany
Currently working as a Requirement Engineer for Siemens Healthcare in Germany.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 27 Sep 2012
Article Copyright 2012 by Bernhard Kügle
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid