i've stumbled across some unexpected error messages today, when performing loops over sequences of the following kind:
Code: Select all
do
{
DRTROIContourSequence::Item& currentContour = rtROIContourSequence.getCurrentItem();
if (currentContour.isValid())
{
// doSomething
}
else {
std::cerr << "Error: Invalid item "<< std::endl;
}
} while (rtROIContourSequence.gotoNextItem().good());
It appears that there is a problem in the gotoNextItem() method.
Code: Select all
OFCondition DRTROIContourSequence::gotoNextItem()
{
OFCondition result = EC_IllegalCall;
if (CurrentItem != SequenceOfItems.end())
{
++CurrentItem;
result = EC_Normal;
}
return result;
}
Note that I am using the standard library instead of the built-in types of DCMTK.