Code Monkey home page Code Monkey logo

xdchengliang / dicom2volume Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jornskaa/dicom2volume

0.0 1.0 0.0 612 KB

Dicom2Volume (C# application/library) Loads DICOM files and extracts image data, orientation, positions, scale and metadata like WindowLevel. DICOM slices are sorted based on calculated SliceLocation and image and metadata is exported to XML, RAW and DDS (Direct Draw Surface - ideal for Direct3D loading). Optional tar.gz compression can also be applied. Ideal if you want the simplest way of working with volume medical data without the hassle of DICOM. Can be used as standalone application or as a library.

Home Page: http://www.art-of-illusion.net/

License: BSD 3-Clause "New" or "Revised" License

C# 100.00%

dicom2volume's Introduction

****************************************************************************************
Dicom2Volume (C# application/library) 
****************************************************************************************
Loads DICOM files and extracts image data, orientation, positions, scale and metadata 
like WindowLevel. DICOM slices are sorted based on calculated SliceLocation and image 
and metadata is exported to XML, RAW and DDS (Direct Draw Surface - ideal for Direct3D 
loading). Optional tar.gz compression can also be applied. Ideal if you want the 
simplest way of working with volume medical data without the hassle of DICOM. Can be 
used as standalone application or as a library.
****************************************************************************************

Example volume metadata:

  <?xml version="1.0" ?> 
  <VolumeData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<Rows>512</Rows> 
	<Columns>512</Columns> 
	<Slices>361</Slices> 
	<Width>217</Width> 
	<Height>217</Height> 
	<Depth>252</Depth> 
	<WindowWidth>400</WindowWidth> 
	<WindowCenter>60</WindowCenter> 
	<RescaleIntercept>-1000</RescaleIntercept> 
	<RescaleSlope>1</RescaleSlope> 
	<ImageOrientationPatient>
	<double>1</double> 
	<double>0</double> 
	<double>0</double> 
	<double>0</double> 
	<double>1</double> 
	<double>0</double> 
	</ImageOrientationPatient>
	<ImagePositionPatient>
	<double>-112</double> 
	<double>-17.333334</double> 
	<double>-792</double> 
	</ImagePositionPatient>
	<FirstSliceLocation>-792</FirstSliceLocation> 
	<LastSliceLocation>-540</LastSliceLocation> 
	<MinIntensity>0</MinIntensity> 
	<MaxIntensity>4095</MaxIntensity> 
  </VolumeData>


****************************************************************************************
The idea is that this data is everything needed to successfully perform volume rendering
of the DICOM dataset. Currently only MONOCHROME2 Photometric Interpretation is supported.
However decompression is supported through external converters like dcmtk and gdcm. The 
process also anonymizes the data by ignoring all tags not relating to rendering.
****************************************************************************************

Configuration options are found in dcm2vol.exe.config. Here is an example config with
commented out sections showing how external DICOM converters could be integrated.


  <appSettings>
    <add key="RelativeOutputPath" value="dcm2vol"/>
    <add key="SkipEveryNSlices" value="1"/>
    <add key="OpenExplorerOnCompletion" value="true"/>
    <add key="KeepFilesFlag" value="RawVolume, DdsVolume, XmlVolume, TgzRawVolume"/>
    <add key="LogLevel" value="Info"/> <!--Debug, Info, Warn, Error-->
    <add key="WaitForEnterToExit" value="true"/>
    <!--<add key="DicomConverter" value="C:\Program Files (x86)\GDCM 2.0\bin\gdcmconv.exe"/>
    <add key="DicomConverterArguments" value="-w &quot;$(InputFilename)&quot; &quot;$(OutputFilename)&quot;"/>-->
    <!--<add key="DicomConverter" value="$(StartupPath)\dcmdjpeg.exe"/>
    <add key="DicomConverterArguments" value="&quot;$(InputFilename)&quot; &quot;$(OutputFilename)&quot;"/>-->
  </appSettings>

****************************************************************************************

dicom2volume's People

Contributors

jornskaa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.