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

brian avants stnava at gmail.com
Sun Mar 6 20:01:18 EST 2011


hi hans

i think we'll have new metric implementations over the next month or
so.  it would be great if you would let us know what you're after so
we can keep it in mind during redesign.  the new metrics inherit from
the ObjectToObjectMetric.

why are we developing new metrics?  because it has been very difficult
(as you point out) to see what's going on in the existing framework.
in addition, unifying dense and sparse/linear frameworks is not really
possible if we base everything on the the old metric system.

brian




On Sun, Mar 6, 2011 at 7:27 PM, 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.
> ________________________________


More information about the Insight-developers mailing list