7 #include <fwTools/UUID.hpp> 9 #include <fwAtoms/Object.hpp> 10 #include <fwAtoms/Object.hxx> 11 #include <fwAtoms/Numeric.hpp> 12 #include <fwAtoms/Numeric.hxx> 14 #include <fwAtomsPatch/helper/functions.hpp> 16 #include "fwMDSemanticPatch/V2/V03AGO/fwData/Image.hpp" 31 this->
addContext(
"MedicalData",
"V2",
"V03AGO");
49 const ::fwAtoms::Object::sptr& previous,
50 const ::fwAtoms::Object::sptr& current,
51 ::fwAtomsPatch::IPatch::NewVersionsType& newVersions)
53 ISemanticPatch::apply(previous, current, newVersions);
54 ::fwAtomsPatch::helper::cleanFields( current );
57 ::fwAtoms::Object::sptr array = ::fwAtoms::Object::dynamicCast(previous->getAttribute(
"array"));
58 ::fwAtoms::Numeric::sptr nbComponent = ::fwAtoms::Numeric::dynamicCast(array->getAttribute(
"nb_of_components"));
Contains the semantic patches within the context "MedicalData".
FWMDSEMANTICPATCH_API Image()
Constructor.
Contains base functionalities used to transform objects from a version to another.
FWMDSEMANTICPATCH_API ~Image()
Destructor.
std::string m_originClassname
Origin classname of the object.
virtual FWATOMSPATCH_API void addContext(const std::string &context, const std::string &originVersion, const std::string &targetVersion)
Add a context where the patch can be applied.
FWATOMSPATCH_API void replaceAttribute(const std::string &name,::fwAtoms::Base::sptr newValue, conditions::Abstract::sptr condition=conditions::Abstract::New())
Replaces an attribute.
std::string m_originVersion
Origin version of the object.
Patch an image from version 'V2' to 'V03AGO' within 'MedicalData' context.
virtual FWMDSEMANTICPATCH_API void apply(const ::fwAtoms::Object::sptr &previous, const ::fwAtoms::Object::sptr ¤t,::fwAtomsPatch::IPatch::NewVersionsType &newVersions) override
Applies patch.
FWATOMSPATCH_API ISemanticPatch()
Constructor.
Contains the representation of the data objects used in the framework.