[ITK] [ITK-users] Combining two images after registration

Francois Budin francois.budin at kitware.com
Thu Feb 16 16:45:34 EST 2017


Hello Andrew,

There is currently no complete implementation of what you are doing in ITK.
However, there are a few pieces that are available and that you can use.
1) To combine multiple images that partially overlap, you can refer to this
insight Journal article [1].
2) To compute the size of the output image that you need, you can look at
[2] (computing transformed image bounding box).
3) If you create a more complete implementation that solves this problem,
feel free to contribute to ITK. The easiest way to contribute to ITK is to
write an Insight Journal article and implement an external ITK module. You
can refer to the ITK software guide for more information about the process
[3].

Hope this helps,
Francois

[1] http://www.insight-journal.org/browse/publication/914
[2] https://github.com/fbudin69500/ITKTransformTools
[3] https://itk.org/ITK/help/documentation.html


On Wed, Feb 15, 2017 at 12:40 PM, Andrew Harris <aharr8 at uwo.ca> wrote:

> That will work for the region inside the overlap region, but the region
> outside the overlap region would then have their value reduced by half.  Is
> there a filter pre-written that checks for information in the overlap
> region before doing the scaling?  I have something partially written that
> does that but it doesn't fix the portion of the image that is cut off
> because it rotates outside the original image bounds.
>
> Thanks for your help.
>
> --
>
> AH
>
>
> ------------------------------------------------------------
> -----------------------------------
>
> *This email and any attachments thereto may contain private,
> confidential, and privileged materials for the sole use of the intended
> recipient. Any reviewing, copying, or distribution of this email (or any
> attachments thereto) by other than the intended recipient is strictly
> prohibited. If you are not the intended recipient, please contact the
> sender immediately and permanently destroy this email and any attachments
> thereto.*
>
> On Wed, Feb 15, 2017 at 10:07 AM, ibraheem aldhamari <ibr_ex at yahoo.com>
> wrote:
>
>> save the images in the same datatype then multiply each image by 0.5
>> before adding
>> https://itk.org/ITKExamples/src/Filtering/ImageIntensity/Mul
>> tiplyImageByScalar/Documentation.html
>>
>>
>> Best regards and have a nice day!
>> Ibraheem
>>
>>
>> ------------------------------
>> *From:* Andrew Harris <aharr8 at uwo.ca>
>> *To:* ibraheem aldhamari <ibr_ex at yahoo.com>
>> *Cc:* Insight-users <insight-users at itk.org>
>> *Sent:* Wednesday, February 15, 2017 4:01 PM
>> *Subject:* Re: [ITK-users] [ITK] Combining two images after registration
>>
>> Thanks for getting back to me,
>> I looked at that filter and it has a warning that said “No numeric
>> overflow checking is performed in this filter”, so I assumed that meant
>> that if I put an image through it there would be a simple addition
>> pixelwise across the image.  That would make the overlap region brighter
>> than the non-overlap region which I was trying to avoid.
>>
>> --
>> AH
>>
>> ------------------------------------------------------------
>> -----------------------------------
>> *This email and any attachments thereto may contain private,
>> confidential, and privileged materials for the sole use of the intended
>> recipient. Any reviewing, copying, or distribution of this email (or any
>> attachments thereto) by other than the intended recipient is strictly
>> prohibited. If you are not the intended recipient, please contact the
>> sender immediately and permanently destroy this email and any attachments
>> thereto.*
>>
>> On Wed, Feb 15, 2017 at 9:42 AM, ibraheem aldhamari <ibr_ex at yahoo.com>
>> wrote:
>>
>> Hey,
>> In Slicer you can use Add Scalar Volume plugin.
>> In itk use this :
>>     https://itk.org/Doxygen/ html/classitk_1_ 1AddImageFilter.html
>> <https://itk.org/Doxygen/html/classitk_1_1AddImageFilter.html>
>>     https://itk.org/Wiki/ITK/ Examples/ImageProcessing/ AddImageFilter
>> <https://itk.org/Wiki/ITK/Examples/ImageProcessing/AddImageFilter>
>>
>> Best regards and have a nice day!
>> Ibraheem
>>
>>
>> ------------------------------
>> *From:* Andrew Harris <aharr8 at uwo.ca>
>> *To:* Insight-users <insight-users at itk.org>
>> *Sent:* Wednesday, February 15, 2017 3:39 PM
>> *Subject:* [ITK-users] [ITK] Combining two images after registration
>>
>> Hello,
>> Hopefully someone can point me in the right direction.  I have a
>> successful image registration between two images of the same size I have
>> confirmed by outputting two .mha files and blending them in Slicer.  What I
>> would like to be able to do is to combine them within C++ and output a
>> single .mha file. As a further complication, part of the moving image gets
>> left off because the image rotates outside the bounds of the original image
>> size, and it would be preferable if I could figure out how to pad the
>> moving image automatically in the dimensions necessary to prevent this from
>> happening.
>>
>> Any thoughts are welcome.
>> --
>> AH
>>
>> ------------------------------ ------------------------------
>> ------------------------------ -----
>> *This email and any attachments thereto may contain private,
>> confidential, and privileged materials for the sole use of the intended
>> recipient. Any reviewing, copying, or distribution of this email (or any
>> attachments thereto) by other than the intended recipient is strictly
>> prohibited. If you are not the intended recipient, please contact the
>> sender immediately and permanently destroy this email and any attachments
>> thereto.*
>>
>> ______________________________ _______
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/ opensource/opensource.html
>> <http://www.kitware.com/opensource/opensource.html>
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/ products/protraining.php
>> <http://www.kitware.com/products/protraining.php>
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_ FAQ <http://www.itk.org/Wiki/ITK_FAQ>
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/ mailman/listinfo/insight-users
>> <http://public.kitware.com/mailman/listinfo/insight-users>
>>
>>
>>
>>
>>
>>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170216/d1a94567/attachment-0001.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list