Make sure that include this header file to support loading color images
#include "dcmtk/dcmimage/diregist.h"