How ro register CT and MRI DICOM images

Hi.

I am trying to create a functionality for my application that is capable of register images of the CT brain with 512x512 resolution and MRI with 256x256 resolution of T1 sequences in DICOM format, and for this I have used some examples that come with ITK, such as Mutual Information of Mattes, but I only get black images. My question: What am I doing wrong or what am I not doing?
I would appreciate any help, I don’t have the experience that most of you have in this field.

Thanks in advance

You need to provide the source code which does not work in order for someone to help you.