Hi
Can anyone explain me why i cannot set the "use color" property:
mitk::DataNode::Pointer oMaskNode = mitk::DataNode::New();
bool bTestUseColor = false;
if(!oMaskNode->GetBoolProperty("use color", bTestUseColor))
std::cout << "Property not found, this is OK " << std::endl;
else
std::cout << "Property is found, this is strange but OK, value is " <<
bTestUseColor << std::endl;
oMaskNode->SetData(poMaskImage3D); //this is a 3D mitk::Image object of
unsigned char with zeroes and ones filled
if(!oMaskNode->GetBoolProperty("use color", bTestUseColor))
std::cout << std::cout << "Property not found, this is OK<< std::endl;
else
std::cout << "Property is found, this is OK, value is " << bTestUseColor <<
std::endl;
mitk::CoreObjectFactory::GetInstance()->SetDefaultProperties(oMaskNode);
if(!oMaskNode->GetBoolProperty("use color", bTestUseColor))
std::cout << std::cout << "Property not found, this is NOT OK" << std::endl;
else
std::cout << "Property is found, value is: " << bTestUseColor << std::endl;
oMaskNode->SetProperty("use color", mitk::BoolProperty::New(false));
if(!oMaskNode->GetBoolProperty("use color", bTestUseColor))
std::cout << std::cout << "Property not found, this is NOT OK" << std::endl;
else
std::cout << "Property is found, value should be 0: " << bTestUseColor <<
std::endl;
My output is
Property not found, this is OK
Property is found, this is OK, value is 1
Property is found, value is 1
Property is found, value should be 0: 1
Why is the value 1?
best regards
------------------------------------------------------------------------------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful,
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance.
http://p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users