1
votes

I have two questions.

First: I haven't got any definite documentation on how to use the GDCM library in Windows. Is it at all possible to use GDCM library in Visual Studio in windows? If so, could you please provide me any instruction how to install the library in Visual studio? I want to change or add something to the way the GDCM command "gdcmimg" functions.

Second: I have some multiframe dicom images where I need to modify the pixels and keep all the tags(private or non-private) intact. I have tried with Matlab, GDCM and Dcmtk. But in each case there is some problem. Matlab can't change multiframe images as it runs out of memory. GDCM can't keep the tags intact(I use the "gdcmimg" command) and I don't know yet how to change this functionality, dcmtk(I use the "dcmodify" command for that purpose) can only change the single frame dicom images and mysteriously it fails to do so in case of multi-frame dicom images when the images are provided by some vendors. What I mean is that, I tried with the multi-frame dicom images made by myself using matlab and I could change their pixel data in using "dcmodify", but when I try to do so with vendor provided multi-frame dicom image it fails to change the pixel data. So, now I want to try with VTK. Could you please say me whether or not VTK can change the pixel data of a Multi-frame dicom image while keeping all the tags, private or non-private, intact?

Thanks

2
We seem to have similar problems sourceforge.net/apps/mediawiki/bifijiplugins/… so perhaps we could exchange ideas. I have used vtk in my plugin but I don't use it to change pixel data. There are other tools inside ImageJ for changing pixel data.Ilan Tal
I have actually found the solution to this problem even though the solution takes a little bit time when executing. Now I am able to change the multiple frame dicom images using dcmodify too. But before that I change the Photometric Interpretation of the dicom files by using the dcmtk command dcmdjpeg, then when I try to change the pixel data using Matlab it works. It seems, for dcmtka tool dcmodify to work properly the Photometric Interpretation must be always RGB. Yes, of course we could exchange ideas if that helps you even though I don't think I know a great deal :).the_naive
VTK isn't a DICOM library. It is a visualization library. It uses gdcm to work with DICOM images, it can't do anything with them gdcm can't.denver

2 Answers

2
votes

You can work with GDCM on windows in Visual Studio.

  1. Download the GDCM source.
  2. Download CMake
  3. User CMake to generate a visual studio solution for GDCM
  4. Build the Visual Studio Solution
  5. Use the built library in your own projects.

GDCM has very little documentation.

In regards to the private tags. The general practice is that when you modify/derive an image you do not keep the private tags. The only private tags should be the ones you add.

1
votes

When all else fails, read the documentation:Configuring and Building With VS .NET 2003. Of course this works with any newer Visual Studio, thanks to the use of CMake.