[Insight-developers] Video frame index could be negative?
Xiaoxiao Liu
xiaoxiao.liu at kitware.com
Thu Dec 1 13:01:12 EST 2011
Hi there,
I am trying to fix the win64 build error about itkTemporalProcessObjecTest:
http://www.cdash.org/CDash/testDetails.php?test=125262330&build=1778091
I noticed that the error might be triggered by the integer types used
in*itkTemproalProcessObject
* class.
This function is really
suspicious: TemporalProcessObject::UpdateOutputInformation():
The variables scannableDuration and outputDuration are turned
out to be "-1" in the erroring test, their types
are "long" instead of "unsigned long", which messes up with the line 301:
largestRegion.SetFrameDuration(outputDuration),
which basically assign "-1" to unsigned long , make it to be
18446744073709551615 in 64 bit machine.
Is this somehow on purpose? It has no problem passing in linux,
mac and win32, but causing trouble in win64 (probably
due to the ULONG_MAX is still defined to be 4294967295.)
Also, I am planning to clean up this class by switching all usage of
:unsigned long and long to be proper itk types.
Are there variables that should be long instead of unsigned long at all?
for example:
long m_FrameSkipPerOutput,
long m_InputStencilCurrentFrameIndex
Thanks for your help!
-Xiaoxiao
---------------------------------------------
*Xiaoxiao Liu*, Ph.D.
R & D Engineer
Kitware Inc <http://www.kitware.com/>.
Clifton Park, NY
Phone: (518) 881-4924 or (518) 371-3971 x124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20111201/325bcc56/attachment.htm>
More information about the Insight-developers
mailing list