[Insight-developers] Possible bugs in ImageToImage metric with threads
Johnson, Hans J
hans-johnson at uiowa.edu
Mon Mar 7 08:37:30 EST 2011
Dan,Brian, and Luis,
Thanks for your responses! It sounds like this will be worked on for
ITKv4, and that several of you have found this already.
I will focus on an ITKv3 work around and leave the ITKv4 refactoring to
those of you who are already working on it.
Thanks,
Hans
On 3/7/11 12:40 AM, "Dan Mueller" <dan.muel at gmail.com> wrote:
>Hi Hans, (others),
>
>You might be interested in the following IJ article, which implements
>exactly what you suggest:
> An image sampling framework for the ITK
> http://www.insight-journal.org/browse/publication/743
>
>I'm not sure if the ITKv4 registration refactor includes this
>particular enhancement or not...
>
>HTH
>
>Cheers, Dan
>
>On 7 March 2011 01:27, Johnson, Hans J <hans-johnson at uiowa.edu> wrote:
>> Hello all,
>> I can not make heads nor tails of the ImageToImageMetric samples
>>selection
>> methods. It looks like this is a class that has experienced extreme
>>scope
>> creep over the years in an attempt to be uber flexible with respect to
>> samples selections.
>> How do all the following options interact with each other?
>> SetUseFixedImageSamplesIntensityThreshold
>> SetFixedImageRegion
>> SetUseAllPixels
>> SetUseSequentialSampling
>> SetFixedImageSamplesIntensityThreshold
>> SetUseFixedImageIndexes
>> SetFixedImageIndexes
>> SetNumberOfFixedImageSamples
>> SetFixedImageMask
>> SetMovingImageMask
>>
>> In my particular case, what is the correct behavior when requesting 1e6
>> samples from when the FixedImageMask is set and the MovingImageMask is
>>set,
>> but the intersection of the fixed and moving masks only contains 1e5
>> samples? Since the threading work distribution is based on the
>> "m_NumberOfFixedImageSamples" and that has several related variables
>> (this->m_NumberOfPixelsCounted +=
>> m_ThreaderNumberOfMovingImageSamples[threadID];) , and based on the
>>mask
>> overlapping the numberOfSamples seems to dynamically update, it could
>>be the
>> cause of the failing test cases. I've spent several hours trying to
>>trace
>> through this mess trying to determine if there really is a problem, but
>>I
>> can not narrow it down.
>> Ultimately, all permutations of this result in some sort of iteration
>>over
>> some subset of the fixed image indexes. If we decoupled the various
>>"fixed
>> image iterator generation schemes" from the ImageToImageMetric, we could
>> greatly simplify the interrelationships AND allow for other sample
>> selections schemes to be added through that consistent interface.
>> I'd like to get some feedback on this proposal before I spend more time
>> trying to identify ways to simplify this.
>> Hans
>>
>>
>> ________________________________
>> Notice: This UI Health Care e-mail (including attachments) is covered
>>by the
>> Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
>>confidential
>> and may be legally privileged. If you are not the intended recipient,
>>you
>> are hereby notified that any retention, dissemination, distribution, or
>> copying of this communication is strictly prohibited. Please reply to
>>the
>> sender that you have received the message in error, then delete it.
>>Thank
>> you.
>> ________________________________
>> _______________________________________________
>> 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://kitware.com/products/protraining.html
>>
>> 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://www.itk.org/mailman/listinfo/insight-developers
>>
>>
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
More information about the Insight-developers
mailing list