Click here to Skip to main content
14,866,398 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using Ubuntu 16.04.4
I have installed dcmtk361 but I am having a difficult time in finding c code.
Can somebody help me?

What I have tried:

I got a code, but i am getting an error:
#include "dcmimage.h"

#include "osconfig.h"

int main(int argc, char *argv[])

    DicomImage *image = new DicomImage("mf_image.dcm", CIF_UsePartialAccessToPixelData, 0, 10 /* fcount */); 

    if (image->getStatus() == EIS_Normal)
        do {
            DCMIMGLE_INFO("processing frame " << image->getFirstFrame() + 1 << " to "
                                              << image->getFirstFrame() + image->getFrameCount());
        } while (image->processNextFrames());

    delete image;

    return 0;

This is the code that I tried , but I got an error>
dcmimage.h: No such file or directory
compilation terminated.
I included all the directories but still getting the same error.
Can somebody help me
Updated 25-May-18 3:17am
Jochen Arndt 24-May-18 2:55am
The StackOverflow link is about Visual Studio (Windows) and not Ubuntu (Linux).

I suggest to update your question (use the green "Improve question") link with more information. Especially the full error message and the related source code (for compilation errors) and make file / gcc call (for linker errors).
CPallini 24-May-18 3:39am
The message is clear: the compiler is unable to find such a header.
How did you 'include all the directories' ?
Jochen Arndt 24-May-18 3:42am
For the updated question:

How / where have you set the include file paths? It must be set as environment variable or on the compiler command line (optionally from a make file).

First locate the dcmimage.h file to know the directory and then add it to the include path (compiler -I option).

1 solution

Check the header file.

a) it is a typo and the file name wrong
b) you need to update the header search path or copy the file so the compiler finds it.

My tip is: a)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900