コード例 #1
0
ファイル: TransferFunction.hpp プロジェクト: dragonlet/fw4spl
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 );
}