[Insight-developers] ImageRegionConstIterator - thread safe?
Nicholas Tustison
ntustison at gmail.com
Wed Apr 13 18:18:57 EDT 2011
Hi Michael,
Just for clarification, and so that nobody gets worried, I wouldn't say that
we're going to replace the current B-spline transform but, since we're
going to have the DeformableTransform framework, it will be trivial
to add one constrained by B-splines which has practical advantages
over the current framework.
Nick
On Apr 13, 2011, at 5:15 PM, M Stauffer (V) wrote:
> Thanks Luis. This may actually end up being moot for the case of
> itkBSplineDeformaableTransform since we're planning on replacing this
> with Nick's new BSpline transform based on DeformationFieldTransform.
>
> Yes, a more certain way to test for thread-safety would be wonderful!
> Maybe we could cook up a test option that specifies to run tests that
> are designated as testing thread-safety many times (e.g. 1000x) instead
> of the single run in a normal test run? These could be run periodically
> to avoid having each test run take more time.
>
> Maybe a cmake var THREAD_SAFETY_TEST_REPITITIONS that is usually 1, but
> gets set to 1000 (or 10000??) once a week or month or so, and individual
> tests can pull in the var through the command params in CMakeLists and
> use it for their testing loop as appropriate.
>
> We could do this manually for individual tests of course, but seems it
> would give a more peace of mind to be able to do this on lots of
> different platforms periodically.
>
> -M
>
>> -----Original Message-----
>> From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
>> Sent: Sunday, April 10, 2011 6:38 PM
>> To: M Stauffer (V)
>> Cc: ITK-dev-list-mstauff at ver
>> Subject: Re: [Insight-developers] ImageRegionConstIterator -
>> thread safe?
>>
>> Hi Marius,
>>
>> I would think that it is thread-safe,
>>
>> at least in the sense that a "Const" iterator
>> will not modify its internal member variables.
>>
>> A "grep" didn't return any instances of "mutable"
>> in this family of classes either,
>>
>> So it looks safe...
>>
>> I wish there was a less uncertain way of
>> making this determination...
>>
>>
>> Luis
>>
>>
>> -----------------------------------------------------------
>> On Tue, Apr 5, 2011 at 5:18 PM, M Stauffer (V)
>> <mstauff at verizon.net> wrote:
>>> Hi,
>>>
>>> Does anyone know if ImageRegionConstIterator is thread-safe for
>>> read-only operations?
>>>
>>> I'm trying to determine the thread-safety of
>>> itkBSplineDeformaableTransform::TransformPoint( const
>> InputPointType &
>>> point, OutputPointType & outputPoint, WeightsType & weights,
>>> ParameterIndexArrayType & indices, bool & inside). The
>>> ImageRegionConstIterator used here is the only unknown for me at this
>>> point, the rest of it looks thread-safe.
>>>
>>> I can look at ImageRegionConstIterator myself in detail, but
>> thought I'd
>>> check first if someone else already knows.
>>>
>>> Cheers,
>>> Michael
>>>
>>> _______________________________________________
>>> 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
>>>
>
> _______________________________________________
> 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
More information about the Insight-developers
mailing list