void load(Archive & ar, ::fwData::TransferFunction & _transferFunction, const unsigned int version) { double attrLevel; double attrWindow; std::string attrName; bool attrIsClamped; int attrInterpolationMode; ::fwData::TransferFunction::TFColor attrBackgroundColor; ::fwData::TransferFunction::TFDataType tfData; ar & ::boost::serialization::make_nvp( "level" , attrLevel ); ar & ::boost::serialization::make_nvp( "window" , attrWindow ); ar & ::boost::serialization::make_nvp( "name" , attrName ); ar & ::boost::serialization::make_nvp( "isClamped" , attrIsClamped ); ar & ::boost::serialization::make_nvp( "interpolationMode" , attrInterpolationMode ); ar & ::boost::serialization::make_nvp( "backgroundColor" , attrBackgroundColor ); ar & ::boost::serialization::make_nvp( "tfData" , tfData ); _transferFunction.setLevel(attrLevel); _transferFunction.setWindow(attrWindow); _transferFunction.setName(attrName); _transferFunction.setIsClamped(attrIsClamped); _transferFunction.setInterpolationMode( static_cast< ::fwData::TransferFunction::InterpolationMode >(attrInterpolationMode) ); _transferFunction.setBackgroundColor( attrBackgroundColor ); _transferFunction.setTFData( tfData ); }
void save(Archive & ar, const ::fwData::TransferFunction & _transferFunction, const unsigned int version) { std::string newStr; double attrLevel = _transferFunction.getLevel(); double attrWindow = _transferFunction.getWindow(); std::string attrName = _transferFunction.getName(); bool attrIsClamped = _transferFunction.getIsClamped(); int attrInterpolationMode = _transferFunction.getInterpolationMode(); ::fwData::TransferFunction::TFColor attrBackgroundColor = _transferFunction.getBackgroundColor(); ::fwData::TransferFunction::TFDataType tfData = _transferFunction.getTFData(); ar & ::boost::serialization::make_nvp( "level" , attrLevel ); ar & ::boost::serialization::make_nvp( "window" , attrWindow ); ar & ::boost::serialization::make_nvp( "name" , attrName ); ar & ::boost::serialization::make_nvp( "isClamped" , attrIsClamped ); ar & ::boost::serialization::make_nvp( "interpolationMode" , attrInterpolationMode ); ar & ::boost::serialization::make_nvp( "backgroundColor" , attrBackgroundColor ); ar & ::boost::serialization::make_nvp( "tfData" , tfData ); }