How to show a DICOM image with ITK and Visual Studio?


I am learning to use ITK with visual studio. My question is: How can I, once I have read a DICOM file, be able to show it or load it in a PictureBox (System.Windows.Forms.PictureBox) component of Visual Studio?

Thanks any help.

Hi Armando,
the question is more about visualization rather than image reading or analysis, so you may want to see the resources provided by VTK for visualization purposes.

It is quite a long time since I have not used the .NET framework, so I cannot tell much about it. Unless you are constrained by some requirements, using VTK as a means to display your images will save you a lot of time.

Finally, VTK is multi-platform, so you are not necessarily tied to MSVC.


Hello, Jon Haitz Legarreta Gorroño.

Thank you very much for your reply. The project for which I am working needs to register multimodal images (CT and MRI) for stereotactic surgery planning, for this reason I use ITK. At the same time I need to visualize the images. As a beginner, I do not know if only with ITK I can solve everything I want. Personally I feel more comfortable using C ++ Builder, but it is currently not possible to compile ITK for Embarcadero C ++ Builder 10.2.3, for this reason I use Visual Studio, but if you have a suggestion to give based on your experience I will thank you very much.

Thanks again.

Hi Armando,
using MSVC is not a restriction to use VTK. VTK can be built for macOS, Linux and Windows platforms using a whole set of compilers, including MSVC.

For your problem, ITK will certainly be of help for the the registration process, but as said, you may want to try VTK for visualization.

The documentation is extensive. You would be amazed to know how powerful it is.


Hi Jon.

I am now compiling VTK with MSVC.
Is it possible to compile VTK with Embarcadero C ++ Builder 10.2.3? I’ve tried but it gives some me errors when I Configure. Any suggestions?

Thanks for your help.

You should ask to the VTK folks:

I use MSVC for both ITK and VTK. If you get errors, they will certainly be happy to fix them and have VTK built in an even larger set of compilers.

Hi @Armando,
A suggestion could be making a bridge between itk and opencv. Then you can easilly see your images by several tools in that library.

Hi, rasoul.

Thanks for the idea.

To add to the suggestions of @jhlegarreta and @Armando

Hello Matt.

Thank you very much.
I am viewing the post right now.


I would recommend to build on an existing open-source application framework instead of redeveloping all basic infrastructure again.

For medical applications, you can use 3D Slicer (that I’m one of the core developers of). Slicer uses ITK for image I/O and processing, VTK for visualization, and Qt for GUI. It already has all the features that you may need for stereotactic surgery planning and guidance, such as DICOM import, rich multimodality image and tool visualization, intensity-based multimodality image registration, patient registration, tool calibration, automatic stereotactic frame registration. All comes with open-source, restriction-free (BSD-type) license. It is used clinically (under IRB approval) for many procedures. It is used in several commercial products - you can apply your own branding, style sheet, etc. and use simplified, application-specific user interface.

If you have any questions you can post it on Slicer forum.

1 Like

Hi Andras.

First of all, thank you very much for the information and advice. I very appreciate your help.
I have been offline some days. I would like to be able to consult you about the project that I am developing and keep in touch with you. I’m catching up with 3D Slicer.

Best regards,