The itkTransformTest is the only test failing on my Visual Studio 2013
Debug dashboard because of this code:
virtual OutputVectorPixelType TransformVector(const
InputVectorPixelType & itkNotUsed(inputVector) ) const ITK_OVERRIDE
{
OutputVectorPixelType outVector;
outVector.Fill( 88.8 );
return outVector;
}
The problem is in the Fill implementation:
template< typename TValue >
void VariableLengthVector< TValue >
::Fill(TValue const & v) ITK_NOEXCEPT
{
std::fill_n(&this->m_Data[0], m_NumElements, v);
}
In this test call, m_Data is nullptr, and m_NumElements is 0, so
clearly,&m_Data[0] is not a useful pointer, and with 0 elements, there
is nothing to fill.
So.... should the implementation of Fill be changed to be conditional
on the pointer being non-nullptr, or the number of elements being
non-zero, or both? (Are other Fill implementations protected like so?)
Or should the test be changed to avoid calling Fill when there are no
elements...?
Thanks,
David C.
_______________________________________________
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.php
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://public.kitware.com/mailman/listinfo/insight-developers