DCMTK MacOS Installation Homebrew
Moderator: Moderator Team
-
- Posts: 9
- Joined: Fri, 2020-07-10, 11:19
DCMTK MacOS Installation Homebrew
Hi! I'm new to C++ and DCMTK and I think I've completed the steps to install Homebrew and the DCMTK toolkit onto my Mac. I've attempted to run commands like dcmdump to read the header of my DICOM files in the terminal and it seems to be working. When I try this using the CodeBlocks IDE however, the compiler doesn't recognise the toolkit. I can't seem to find further instructions on how to start using DCMTK with my IDE (CodeBlocks) but I'm assuming I need to tell the IDE where the header files are. I'm not sure how I would go about finding the location of the header files or how to link the toolkit to my IDE to ensure I can read the tags in my DICOM header. There's not much documentation on how to read the tags in DICOM file using C++ either so any help would be appreciated. Thank you.
-
- DCMTK Developer
- Posts: 2073
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK MacOS Installation Homebrew
Hi,
I don't know CodeBLlocks so I cannot help with that.
Here is a hit how you can include DCMTK into your CMake-based project using CMake's find_package mechanism.
General examples how to read and write DICOM files and how to access DICOM tags can be found in the dcmdata documentation (scroll down to code example).
Best regards,
Michael
I don't know CodeBLlocks so I cannot help with that.
Here is a hit how you can include DCMTK into your CMake-based project using CMake's find_package mechanism.
General examples how to read and write DICOM files and how to access DICOM tags can be found in the dcmdata documentation (scroll down to code example).
Best regards,
Michael
-
- Posts: 9
- Joined: Fri, 2020-07-10, 11:19
Re: DCMTK MacOS Installation Homebrew
Thanks for your help but after reading the contents of the provided link I'm still not sure how to go about using the find_package mechanism to include DCMTK into my IDE. Could you perhaps explain the process? Thanks
-
- DCMTK Developer
- Posts: 2073
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK MacOS Installation Homebrew
Hi,
Maybe your IDE can directly load a project by opening the main CMakeLists.txt file?
Best regards,
Michael
Maybe your IDE can directly load a project by opening the main CMakeLists.txt file?
Best regards,
Michael
-
- DCMTK Developer
- Posts: 2073
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK MacOS Installation Homebrew
PS or create a CodeBlocks project file, see here for example: https://stackoverflow.com/questions/376 ... cmake-file
Also, CodeBlocks should show up on the cmake GUI if you prefer the GUI.
Also, CodeBlocks should show up on the cmake GUI if you prefer the GUI.
-
- Posts: 9
- Joined: Fri, 2020-07-10, 11:19
Re: DCMTK MacOS Installation Homebrew
Hi again. I'm really new to this so I'd appreciate it if you could explain everything in layman's terms. Why is the CMakeLists.txt file important? I need to link the header files to the compiler in my IDE, I don't see how that txt file is relevant?
-
- Posts: 9
- Joined: Fri, 2020-07-10, 11:19
Re: DCMTK MacOS Installation Homebrew
I know I can manually add the header files into my CodeBlocks project but there should be an easier way to do this via command line? How do I get the path of all my header files? And am I correct in thinking that the .h files contain the libraries that I'd need to #include at the top of my code?
-
- Posts: 9
- Joined: Fri, 2020-07-10, 11:19
Re: DCMTK MacOS Installation Homebrew
Update: I've found a way to link the libraries to my project in CodeBlocks: https://www.learncpp.com/cpp-tutorial/a ... odeblocks/
In the link its mentioned that you need to link both the header and library files. I know where the header files are stored in the installed dcmtk folder but where are the library files stored? Or are both the header and library files the same? I'd appreciate any clarification.
In the link its mentioned that you need to link both the header and library files. I know where the header files are stored in the installed dcmtk folder but where are the library files stored? Or are both the header and library files the same? I'd appreciate any clarification.
Last edited by jazibaskari on Sun, 2020-07-26, 19:17, edited 1 time in total.
-
- Posts: 9
- Joined: Fri, 2020-07-10, 11:19
Re: DCMTK MacOS Installation Homebrew
I'd also appreciate it if you could tell me which header files the following interface classes are stored in so that I'm able to test some code after manually linking the header files to my IDE:
DcmFileFormat
DcmDataset
DcmItem
DcmElement
Thanks.
DcmFileFormat
DcmDataset
DcmItem
DcmElement
Thanks.
Who is online
Users browsing this forum: No registered users and 1 guest