fw4spl
Landmarks1.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #include "fwStructuralPatch/creator/fwData/Landmarks1.hpp"
8 
9 #include <fwAtoms/Map.hpp>
10 
11 #include <fwAtomsPatch/helper/Object.hpp>
12 
13 namespace fwStructuralPatch
14 {
15 namespace creator
16 {
17 namespace fwData
18 {
19 
20 // ----------------------------------------------------------------------------
21 
23 {
24  m_classname = "::fwData::Landmarks";
25  m_version = "1";
26 }
27 
28 // ----------------------------------------------------------------------------
29 
31 {
32 }
33 
34 // ----------------------------------------------------------------------------
35 
38 {
39 }
40 
41 // ----------------------------------------------------------------------------
42 
43 ::fwAtoms::Object::sptr Landmarks1::create()
44 {
45  ::fwAtoms::Object::sptr landmarks = this->createObjBase();
46  ::fwAtomsPatch::helper::Object helper(landmarks);
47 
48  helper.addAttribute("landmarks", ::fwAtoms::Map::New());
49 
50  return landmarks;
51 }
52 
53 // ----------------------------------------------------------------------------
54 
55 } // namespace fwMedData
56 } // namespace creator
57 } // namespace fwStructuralPatch
FWSTRUCTURALPATCH_API ~Landmarks1()
Destructor.
Definition: Landmarks1.cpp:30
virtual FWSTRUCTURALPATCH_API::fwAtoms::Object::sptr create() override
Create the specified object (sets &#39;landmarks&#39; attribute).
Definition: Landmarks1.cpp:43
std::string m_version
Object version.
Contains base functionalities used to transform objects from a version to another.
Definition: Abstract.hpp:16
FWSTRUCTURALPATCH_API Landmarks1()
Constructor.
Definition: Landmarks1.cpp:22
Contains creators and structural patches.
Definition: Landmarks1.hpp:13
FWATOMSPATCH_API::fwAtoms::Object::sptr createObjBase() const
Create the object base : create meta infos : classname, version and id.
FWATOMSPATCH_API void addAttribute(const std::string &name,::fwAtoms::Base::sptr value, conditions::Abstract::sptr condition=conditions::Abstract::New())
Adds a new attribute in the current object.
FWATOMSPATCH_API IStructuralCreator()
Constructor.
Contains the representation of the data objects used in the framework.
std::string m_classname
Object classname.
Structural creator for fwData::Landmarks version &#39;1&#39;.
Definition: Landmarks1.hpp:21