I would recommend not to start writing a viewer application from scratch. There are several open-source medical image computing application frameworks that take care of basics, such as DICOM import, image processing, segmentation, registration using ITK, visualization using VTK. You can use these application frameworks and add your custom functions as plugin modules. You may need to spend a few weeks or months to learn how to use, customize, and extend them, but you save several years of development time. For example 3D Slicer and MITK are two well-established, general-purpose applications; but there are also a number of smaller, more specialized ones.