c++dllunreal-engine4.libgdcm

Using gdcm libs in UE4


For my UE4 project I want to use the GDCM libraries for C++ to load CT Scans. So I really tried a lot the last few days but I'm still not able to use GDCM... But where is the error? Can someone help me?

Then I used the headers:

#include "VolumeImport.h"

#include <gdcmVersion.h>
#include <gdcmReader.h>
#include <gdcmPixmapReader.h>
#include <gdcmImageReader.h>
#include <gdcmAttributes.h>

bool CTFileLoader::Convert_DICOM()
{
    /** ... other well working code ... */

    gdcm::Trace::SetDebug(false); gdcm::Trace::SetError(true);

    gdcm::ImageReader reader;
    reader.SetFilename(files_to_process[i].c_str()); 
    if(!reader.Read()) { }

}   

And I get an error in the gdcmMediaStorage.h: "error C4515: 'gdcm': Namespace uses itself."

I tried using different includes but this causes diffrent errors in diffrent headers... Is there something wrong with the libraries? But I'm sure they were added, because using only the gdcmTrace.h and the gdcm::Trace::functions works fine.


Solution

  • Now I got the solution: