Hi,
I've asked a few questions before, and you've given good answers, but we're confused about the responsibility of the different ClearCanvas libraries.
We're building a Wpf application that will have a Dicom viewer. We're attempting to use the ClearCanvas library to handle the Dicom files and protocol, and have just started the work on this. Note that we want to handle all the View parts ourselves. All we want is a library that loads a Dicom file and provides the attributes to us, including the images - in a useable form.
We're looking at the libraries Dicom and ImageViewer. Our initial thought and understanding is that the Dicom library handles the Dicom file itself, and the ImageViewer contains WinForms objects to embed in WinForms applications for viewing the Dicom files. If this is correct it sounds like we'd want to stick to the Dicom library. However, there has been recommendations that we use the ImageViewer "as a library" - and just don't worry about the view-parts, but I haven't really understood why.
What we've done this far is actually using the class LocalSopDataSource from the ImageViewer library to handle the file:
var localSopDataSource = new LocalSopDataSource(new DicomFile(dicomFilePath));
var patientName = localSopDataSource.File.DataSet.GetAttribute(DicomTags.PatientsName);
var imgData = localSopDataSource.File.DataSet.GetAttribute(DicomTags.PixelData);
..But I see that you just as easily can use the DicomFile object directly - and get the exact same data out:
var file = new DicomFile(dicomFilePath);
var patient = file.DataSet.GetAttribute(DicomTags.PatientsName);
var image = file.DataSet.GetAttribute(DicomTags.PixelData);
So; why would I want to use the ImageViewer anyway? My current problem is setting the PixelData to an image, and I assume the answer relates to this?
I'm sorry, but we just don't understand the separation of responsibility between your libraries. Is it reasonable to use the ImageViewer library to handle the files even if we want to make the viewer ourselves? I hope you can enlighten us, and that we can use ClearCanvas in our application :-)
Cheers,
Stian