[Insight-developers] Possible bugs in ImageToImage metric with threads

Johnson, Hans J hans-johnson at uiowa.edu
Sun Mar 6 19:27:05 EST 2011


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.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110307/7ddf0f55/attachment.htm>


More information about the Insight-developers mailing list