Issue with registration- Get a registered black image

86 views
Skip to first unread message

Mohammad Javad Shojaei

unread,
Dec 8, 2022, 11:30:54 AM12/8/22
to elastix-imageregistration
Hi everyone,

I am trying to register the attached two images using Affine transform. I tried different parameters, but the Stepsize got zero during registration, and I got a completely black image as the outcome. Can you please advise me on how I can fix this? The log file and parameter files are attached too for your review.

Many thanks,
Javad
elastix.log
affinep.txt
m.jpg
f.jpg

Niels Dekker

unread,
Dec 8, 2022, 3:01:14 PM12/8/22
to elastix-imageregistration
Thanks for your question, Javad. I just tried  -p affinep.txt -f f.jpg -m m.jpg -out myoutputdir

It produced the attached tif file, which is almost entirely black, but not completely! It appears to have the edge of the object in m.jpg.

Maybe my result is different because I registered your jpg files, instead of your tif files (HE2.tif, TIC.tif). Could you still attach your tif files as well?

Also I wonder what would be a proper registration for these two images anyway, because they are quite different! What do you think?

Kind regards, Niels
result.0.tif

Mohammad Javad Shojaei

unread,
Dec 12, 2022, 5:08:35 AM12/12/22
to elastix-imageregistration
Dear Niels,

Many thanks for your response. The tif format can be accessed via the following link. If I can register a crop portion of the image, that would be fine too. I really appreciate your advice on how to register them.


Best wishes,
Javad

Niels Dekker

unread,
Dec 13, 2022, 9:07:01 AM12/13/22
to elastix-imageregistration
No problem, Javad.

The log file you attached, "elastix.log" says:

  -f        HE2.tif
  -m        TIC.tif

But the files on dropbox are "HE003.tif", "Mn003.tif", and "TIC.tif". So can you tell me, what is your fixed image, and what is your moving image, exactly?

If you intended to use "TIC.tif" as a mask image, you should pass it either as "-fMask TIC.tif" (for a fixed mask) or "-mMask TIC.tif" (for a moving mask). 

Mohammad Javad Shojaei

unread,
Dec 13, 2022, 9:19:24 AM12/13/22
to elastix-imageregistration
Dear Niels,

Many thanks. I chose both HE and TIC as the fix image, and did registration, but both were not successful. It's not important that one specific should be fixed image, we can choose one that works better. HE2 is the same as  HE003. Also,  TIC is not a mask image, it's another image like  Mn003. Each of them can be used for registration. Please let me know your advice on this.

Many thanks,
Javad

Reply all
Reply to author
Forward
0 new messages