Questions tagged [gdcm]

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.

100 questions
6
votes
0 answers

Get single frames byte array from multiframe dicom image using vtk gdcm

I am reading multiframe dicom as follows and get total pixel data of image in byte array. gdcm.ImageReader _reader = new gdcm.ImageReader(); _reader.SetFileName("FileName"); _reader.Read(); byte[] byteArray= new…
Namrata
  • 173
  • 8
5
votes
3 answers

PyDICOM can't read pixel data and needs GDCM or Pillow

I'm using pydicom and my code is pretty straightforward: image = np.stack([s.pixel_array for s in scans]) But this gives a runtime error: RuntimeError: The following handlers are available to decode the pixel data however they are missing required…
Shamoon
  • 41,293
  • 91
  • 306
  • 570
5
votes
2 answers

Display DICOM monochrome2 having bits stored less than bits allocated

I want to display DICOM file having photometric interpretation MONOCHROME2. some of the specifications of image are- Rows: 1024 Columns: 1024 No of Frames: 622 Bits Allocated: 16 Bits Stored: 10 High Bit: 9 Pixel…
Namrata
  • 173
  • 8
5
votes
1 answer

DICOM C_MOVE with gdcm's "CompositeNetworkFunctions"

I am trying to get DICOMS from a server using gdcm's CompositeNetworkFunctions. My test server is set up using "Orthanc". When I run the Move request, I get: terminate called after throwing an instance of 'gdcm::Exception' what(): …
Germanunkol
  • 231
  • 1
  • 3
  • 13
4
votes
1 answer

Emscripten library make from CMake cannot link

I am using Grassroot Dicom viewer version 2.8.9 to compile into Emscripten library bc on Windows 10 64-bit platform. I followed the instruction from this website emconfigure cmake . emmake make VERBOSE=1 After that I got library file ending with…
MooMoo
  • 1,086
  • 12
  • 22
4
votes
1 answer

Reading pixel values of an image

I am trying to read the pixel values of an image contained in a DICOM file in my simple c++ application using the Grassroots DICOM (GDCM) library. When reading the file metadata I get the following information about the picture: Bits allocated:…
MrCravon
  • 53
  • 4
4
votes
1 answer

warning: disabled expansion of recursive macro

I am currently building the GDCM project using MacOSX default compiler: clang. This compiler trigger a warning in its own header (see ref): In file included from…
malat
  • 12,152
  • 13
  • 89
  • 158
4
votes
2 answers

How do I read a DICOM tag within another tag with ITK?

I'm using ITK to read a DICOM file, calling dicomIO->GetValueFromTag(...) to read a tag value. This works fine for tags like "300a|011e" (gantry angle). The problem comes trying to read tag "0018|0060" which is embedded inside "3002|0030". If I use…
imekon
  • 1,501
  • 4
  • 22
  • 39
4
votes
4 answers

Access Violation Exception only appearing when running C# app without debugger attached

I have an application that works fine in Visual Studios 2008, and I am trying to get it into VS 2010 in order to use .NET 4, and I have a really weird problem. When I run the code from either Release mode or Debug mode with the debugger attached…
Jon
  • 3,985
  • 7
  • 48
  • 80
4
votes
0 answers

gdcm libs link order

I am trying to link my Qt app to gdcm library. When I build it, I get several errors like this: undefined reference to 'gdcm::System::FileExists(char const*)'. I think the problem comes from the link order specified in my .pro file: LIBS +=…
Andrea Caloni
  • 91
  • 1
  • 5
3
votes
1 answer

"TypeError: a bytes-like object is required, not 'str'" reading compressed DICOM volume into numpy array

I am using Python 3.7.3 on Anaconda Spyder on CentOS 7. I have a 3D DICOM volume that is in a single file:/usr/share/aliza/datasets/DICOM/00_MR/Tra_FLAIR.dcm print(image.file_meta.TransferSyntaxUID) returns 1.2.840.10008.1.2.4.70 import pydicom…
OtagoHarbour
  • 3,969
  • 6
  • 43
  • 81
3
votes
1 answer

How to read multi frame DICOM files using GDCM?

I'm trying to read multi frame DICOM files using gdcm library. But i can only read single frame dicom files data with this code : gdcm::ImageReader reader; reader.SetFileName(path); if(!reader.Read()) return false; const gdcm::Pixmap &image =…
masoud khanlo
  • 189
  • 1
  • 14
3
votes
1 answer

Convert a dicom tag to its string name in gdcm in C++

Given a gdcm tag, e.g. gdcm::Tag(0x0010,0x0010) how can it be convert to the corresponding tag name string, in this case "PatientsName" in C++?
Dov Grobgeld
  • 4,783
  • 1
  • 25
  • 36
3
votes
2 answers

Writing 16-bit image to DICOM file format using GDCM

I have successfully written an 8-bit image as a DICOM file using GDCM library. Now I am trying to write 16-bit image as a DICOM file. Here is my code. Could anyone point out what I am missing or what should be done. static public void…
Haris Iltifat
  • 534
  • 5
  • 16
3
votes
2 answers

Using GDCM via CMake

I downloaded source of GDCM 2.4.1 and used CMake 2.8.12.1 and Visual Studio 2010 to build the libraries. I want to use GDCM in my C++ project. Unfortunately, it seems that after building the GDCM solution with VS, there are only the lib-files in the…
MichaelXanadu
  • 505
  • 1
  • 10
  • 25
1
2 3 4 5 6 7