Grassroots DICOM (GDCM) is a cross-platform library written in C++ for DICOM medical files. It's automatically wrapped to Python/C#/Java & PHP (using swig). It supports RAW, JPEG (lossy/lossless), J2K, JPEG-LS, RLE and deflated. Parts 3, 6 & 7 of the DICOM standard are included as XML files. GDCM can be used to build a JPIP or WADO server. Questions about just using the bundled applications are off-topic for Stack Overflow, unless programming specific.
Questions tagged [gdcm]
100 questions
0
votes
1 answer
I install gdcm in windows ,then i "import gdcm" in python, I got anerror
I install gdcm in windows ,then I "import gdcm" in python, I got this error,
My environment is python2.7.9, gdcm is GDCM-2.8.4-Windows-x86_64,

zhangyaoyao
- 11
- 1
- 4
0
votes
1 answer
Compiling GDCM dlls 2.8.4 for Windows with Visual Studio 2013
I am trying to compile GDCM 2.8.4 for Windows. Can anybody describe how to compile it with Visual Studio 2013 Professional? The GDCM wiki is out of date. Thanks a lot.

mmaier
- 11
- 3
0
votes
1 answer
GDCM ImageRegionReader from Python
I am trying to read only one slice from a dicom file using GDCM. The data is a multi slice dicom.
r = gdcm.ImageRegionReader()
r.SetFileName( 'test.dcm' )
r.ReadInformation()
image = r.GetImage()
dimensions = image.GetDimensions()
pixelformat =…

haehn
- 967
- 1
- 6
- 19
0
votes
1 answer
GDCM vtk msvc2013
I have successfully built VTK 7.1.1 and Qt 5.3.2 with MSVC2013. I have downloaded GCDM and configured with Cmake with no shared_lib. I can build the ALL_BUILD project in GDCM solution configured with CMake, but the INSTALL project can not be built…

polo
- 23
- 5
0
votes
1 answer
Need guidance for DICOM compression using Pixelmed library
I am new to DICOM, I have already done compression of DICOM images using GDCM library. But as it creates dependency on Dll files, I am looking for alternatives ways to do it.
I have came across PixelMed library
Ref. PixelMed Library Documentation…

romil
- 21
- 2
0
votes
1 answer
GDCM can't load my DICOM file
I have a Dicom file which is run perfectly on another DICOM viewer tools. But I can't seem open it with my GDCM viewer.
Here is the link for my DCM file
https://drive.google.com/open?id=0BwsYpl75gMyEbi1BNW52QmVtLWs
Can someone help me on why i…
0
votes
1 answer
Image Position/Orientation not written when saving itkImage as DICOM
I have a 3D volume as itkImage and want to save it as DICOM series. Saving the series works so far, but the metadata tags "Image Position Patient" and "Image Orientation Patient" are not saved in the dicom file. All other tags are…

ipa
- 1,496
- 1
- 17
- 36
0
votes
1 answer
GDCM library cannot read dicom file in C#
I tried to read a DICOM file using GDCM library using this code :
gdcm.ImageReader imagereader = new gdcm.ImageReader();
imagereader.SetFileName(@"E:\sample_success.dcm");
if (!imagereader.Read()) throw new Exception("Cannot read dicom file!");
For…

gege
- 25
- 8
0
votes
1 answer
Failed to read DICOM files in C++ ITK after conversion from .nii format
I converted NifTi (.nii) dataset into DICOM dataset using the plugin Tudor DICOM from ImageJ.
The generated files work fine with ImageJ but are not accepted from ITK.
I become these warnings:
function gdcm::DataSet::GetMediaStorage
Media Storage…

Fliss
- 3
- 2
0
votes
1 answer
Error while compiling ITK 4.10.0 on Windows
I have to improve a software using InsightToolKit, DGTal and Armadillo, therefore I need to install them.
I'm new to projects using such big libraries but until here I managed to understand what I was doing.
So, I'm running under Windows 10 64bits…

Nanakix
- 3
- 5
0
votes
0 answers
Unsharp Mask-DICOM with ITK + VTK
I'm trying to work with filters "unsharp-mask" for DICOM files and or .mhd (goal).
In C ++ recommended the use of ITK, within it there is UnsharpMaskLevelSetImageFilter class, it does exactly what I want, for 2D images.
When I use a imageType volume…
user4876067
0
votes
1 answer
C# GDCM function pointer, cannot convert to SWIGTYPE
I am using GDCM to read in DICOM files. As the project is in C#, I have compiled GDCM's C# wrappings with SWIG, following GDCM's manual.
Now I am trying to sort all DICOMs in a folder into Volumes (much like the VolumeSorter example provided by…

Germanunkol
- 231
- 1
- 3
- 13
0
votes
1 answer
How to use the DICOM LUT decoder with gdcm in Python - passing buffers
I need to use the GDCM for converting DICOM images to PNG-format. While this example works, it does not seem to take the LUT into account and thus I get a mixture of inverted/non-inverted images. While I'm familiar with both C++ and Python I can't…

Max Gordon
- 5,367
- 2
- 44
- 70
0
votes
1 answer
GDCM incorrect image data
I'am using gdcm (nuget gdcm-sharp 2.4.4) library to get image and patient data from *.dcm files. All was fine on files with photometric interpretation MONOCHROME2, but then i got some files with MONOCHROME1 and about 30% of them were with a weird…

EekTheCat
- 127
- 11
0
votes
0 answers
Python3 / SWIG and output streams
I am using the SWIG generated Python wrappers for GDCM (comes with gdcm.py).
I am running the following Python3 script.
import gdcm
import sys
filename="path_to_data/gdcm_test.dcm"
r =…

jacolas
- 1
- 1