I wanted to report on a great Dicom library I came across today. It is called ClearCanvas See www.clearcanvas.ca
It is unbelievable how accessible thay made dicom file access and dicom file viewing.
I wanted to modify some dicom file programmatically in VS 2005. You can do this very easily with the Clearcanvas SDK. The SDK is vary well documented and it took me about 30 minutes to get code going to change a patient Id in a dicom image, somthing I was not able to do very easily with other open source dicom libraries.
The library is also documented very well, with sample code, and the site has a good forum.
Here is the code:
public partial class DicomAttibuteViewer : Form
private void btGo_Click(object sender, EventArgs e)
DicomFile _df = new DicomFile(@"C:\user\DotNet\OpenDicom\DicomSampleFiles\00000014.dcm");
DicomAttributeCollection _ds = _df.DataSet;
foreach (DicomAttribute _da in _ds)
if (_da.Tag.Group == 16 && _da.Tag.Element == 32)
// Patient ID
if (_da.Tag.Group == 10)
this.listBox1.Items.Add(_da.Tag +"->" + _da.ToString());