46 #ifndef OME_XML_MODEL_INSTRUMENT_H 47 #define OME_XML_MODEL_INSTRUMENT_H 57 #include <ome/common/xml/dom/Document.h> 58 #include <ome/common/xml/dom/Element.h> 59 #include <ome/common/xml/dom/Node.h> 61 #include <ome/xml/model/primitives/Quantity.h> 63 #include <ome/xml/model/Microscope.h> 64 #include <ome/xml/model/detail/OMEModelObject.h> 92 std::shared_ptr<Impl>
impl;
123 static std::shared_ptr<Instrument>
153 link (std::shared_ptr<Reference>& reference,
154 std::shared_ptr<ome::xml::model::OMEModelObject>&
object);
170 setID (
const std::string&
id);
177 std::shared_ptr<ome::xml::model::Microscope>
185 const std::shared_ptr<ome::xml::model::Microscope>
194 setMicroscope (std::shared_ptr<ome::xml::model::Microscope>& microscope);
201 std::vector<std::shared_ptr<ome::xml::model::LightSource>>::size_type
210 std::vector<std::shared_ptr<ome::xml::model::LightSource>>&
219 const std::vector<std::shared_ptr<ome::xml::model::LightSource>>&
229 std::shared_ptr<ome::xml::model::LightSource>&
230 getLightSource (std::vector<std::shared_ptr<ome::xml::model::LightSource>>::size_type index);
239 const std::shared_ptr<ome::xml::model::LightSource>&
240 getLightSource (std::vector<std::shared_ptr<ome::xml::model::LightSource>>::size_type index)
const;
250 setLightSource (std::vector<std::shared_ptr<ome::xml::model::LightSource>>::size_type index,
251 std::shared_ptr<ome::xml::model::LightSource>& lightSource);
262 addLightSource (std::shared_ptr<ome::xml::model::LightSource>& lightSource);
281 std::vector<std::shared_ptr<ome::xml::model::Detector>>::size_type
290 std::vector<std::shared_ptr<ome::xml::model::Detector>>&
299 const std::vector<std::shared_ptr<ome::xml::model::Detector>>&
309 std::shared_ptr<ome::xml::model::Detector>&
310 getDetector (std::vector<std::shared_ptr<ome::xml::model::Detector>>::size_type index);
319 const std::shared_ptr<ome::xml::model::Detector>&
320 getDetector (std::vector<std::shared_ptr<ome::xml::model::Detector>>::size_type index)
const;
330 setDetector (std::vector<std::shared_ptr<ome::xml::model::Detector>>::size_type index,
331 std::shared_ptr<ome::xml::model::Detector>& detector);
342 addDetector (std::shared_ptr<ome::xml::model::Detector>& detector);
354 removeDetector (std::shared_ptr<ome::xml::model::Detector>& detector);
361 std::vector<std::shared_ptr<ome::xml::model::Objective>>::size_type
370 std::vector<std::shared_ptr<ome::xml::model::Objective>>&
379 const std::vector<std::shared_ptr<ome::xml::model::Objective>>&
389 std::shared_ptr<ome::xml::model::Objective>&
390 getObjective (std::vector<std::shared_ptr<ome::xml::model::Objective>>::size_type index);
399 const std::shared_ptr<ome::xml::model::Objective>&
400 getObjective (std::vector<std::shared_ptr<ome::xml::model::Objective>>::size_type index)
const;
410 setObjective (std::vector<std::shared_ptr<ome::xml::model::Objective>>::size_type index,
411 std::shared_ptr<ome::xml::model::Objective>& objective);
422 addObjective (std::shared_ptr<ome::xml::model::Objective>& objective);
434 removeObjective (std::shared_ptr<ome::xml::model::Objective>& objective);
441 std::vector<std::shared_ptr<ome::xml::model::FilterSet>>::size_type
450 std::vector<std::shared_ptr<ome::xml::model::FilterSet>>&
459 const std::vector<std::shared_ptr<ome::xml::model::FilterSet>>&
469 std::shared_ptr<ome::xml::model::FilterSet>&
470 getFilterSet (std::vector<std::shared_ptr<ome::xml::model::FilterSet>>::size_type index);
479 const std::shared_ptr<ome::xml::model::FilterSet>&
480 getFilterSet (std::vector<std::shared_ptr<ome::xml::model::FilterSet>>::size_type index)
const;
490 setFilterSet (std::vector<std::shared_ptr<ome::xml::model::FilterSet>>::size_type index,
491 std::shared_ptr<ome::xml::model::FilterSet>& filterSet);
502 addFilterSet (std::shared_ptr<ome::xml::model::FilterSet>& filterSet);
514 removeFilterSet (std::shared_ptr<ome::xml::model::FilterSet>& filterSet);
521 std::vector<std::shared_ptr<ome::xml::model::Filter>>::size_type
530 std::vector<std::shared_ptr<ome::xml::model::Filter>>&
539 const std::vector<std::shared_ptr<ome::xml::model::Filter>>&
549 std::shared_ptr<ome::xml::model::Filter>&
550 getFilter (std::vector<std::shared_ptr<ome::xml::model::Filter>>::size_type index);
559 const std::shared_ptr<ome::xml::model::Filter>&
560 getFilter (std::vector<std::shared_ptr<ome::xml::model::Filter>>::size_type index)
const;
570 setFilter (std::vector<std::shared_ptr<ome::xml::model::Filter>>::size_type index,
571 std::shared_ptr<ome::xml::model::Filter>& filter);
582 addFilter (std::shared_ptr<ome::xml::model::Filter>& filter);
594 removeFilter (std::shared_ptr<ome::xml::model::Filter>& filter);
601 std::vector<std::shared_ptr<ome::xml::model::Dichroic>>::size_type
610 std::vector<std::shared_ptr<ome::xml::model::Dichroic>>&
619 const std::vector<std::shared_ptr<ome::xml::model::Dichroic>>&
629 std::shared_ptr<ome::xml::model::Dichroic>&
630 getDichroic (std::vector<std::shared_ptr<ome::xml::model::Dichroic>>::size_type index);
639 const std::shared_ptr<ome::xml::model::Dichroic>&
640 getDichroic (std::vector<std::shared_ptr<ome::xml::model::Dichroic>>::size_type index)
const;
650 setDichroic (std::vector<std::shared_ptr<ome::xml::model::Dichroic>>::size_type index,
651 std::shared_ptr<ome::xml::model::Dichroic>& dichroic);
662 addDichroic (std::shared_ptr<ome::xml::model::Dichroic>& dichroic);
674 removeDichroic (std::shared_ptr<ome::xml::model::Dichroic>& dichroic);
699 const std::weak_ptr<ome::xml::model::Annotation>&
712 const std::weak_ptr<ome::xml::model::Annotation>&
714 const std::shared_ptr<ome::xml::model::Annotation>& annotation);
727 linkAnnotation (
const std::shared_ptr<ome::xml::model::Annotation>& annotation);
745 unlinkAnnotation (
const std::shared_ptr<ome::xml::model::Annotation>& annotation);
770 const std::weak_ptr<ome::xml::model::Image>&
783 const std::weak_ptr<ome::xml::model::Image>&
785 const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
798 linkImage (
const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
816 unlinkImage (
const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
834 #endif // OME_XML_MODEL_INSTRUMENT_H OME model interface (abstract top-level container)
Definition: OMEModel.h:61
std::vector< std::shared_ptr< ome::xml::model::Dichroic > >::size_type sizeOfDichroicList() const
Get size of linked Dichroic list.
Definition: Instrument.cpp:738
std::shared_ptr< ome::xml::model::Objective > & getObjective(std::vector< std::shared_ptr< ome::xml::model::Objective >>::size_type index)
Get Objective.
Definition: Instrument.cpp:582
Instrument model object.
Definition: Instrument.h:87
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Instrument.cpp:802
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: Instrument.cpp:856
static std::shared_ptr< Instrument > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Instrument model object from DOM element.
Definition: Instrument.cpp:222
void addDetector(std::shared_ptr< ome::xml::model::Detector > &detector)
Add Detector.
Definition: Instrument.cpp:545
std::shared_ptr< ome::xml::model::FilterSet > & getFilterSet(std::vector< std::shared_ptr< ome::xml::model::FilterSet >>::size_type index)
Get FilterSet.
Definition: Instrument.cpp:640
void addDichroic(std::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Add Dichroic.
Definition: Instrument.cpp:777
std::shared_ptr< ome::xml::model::Microscope > getMicroscope()
Get the Microscope property.
Definition: Instrument.cpp:427
void addFilterSet(std::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Add FilterSet.
Definition: Instrument.cpp:661
void setDichroic(std::vector< std::shared_ptr< ome::xml::model::Dichroic >>::size_type index, std::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Set Dichroic.
Definition: Instrument.cpp:768
boost::multi_index_container< Ptr< T >, boost::multi_index::indexed_by< boost::multi_index::random_access<>, boost::multi_index::ordered_unique< boost::multi_index::identity< Ptr< T > >, std::owner_less< Ptr< T > > > > > type
Multi-index container type.
Definition: OMEModelObject.h:93
virtual ~Instrument()
Destructor.
Definition: Instrument.cpp:217
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
void setID(const std::string &id)
Set the ID property.
Definition: Instrument.cpp:420
std::vector< std::shared_ptr< ome::xml::model::FilterSet > > & getFilterSetList()
Get the FilterSet list.
Definition: Instrument.cpp:628
std::shared_ptr< ome::xml::model::Detector > & getDetector(std::vector< std::shared_ptr< ome::xml::model::Detector >>::size_type index)
Get Detector.
Definition: Instrument.cpp:524
std::vector< std::shared_ptr< ome::xml::model::FilterSet > >::size_type sizeOfFilterSetList() const
Get size of linked FilterSet list.
Definition: Instrument.cpp:622
std::shared_ptr< ome::xml::model::LightSource > & getLightSource(std::vector< std::shared_ptr< ome::xml::model::LightSource >>::size_type index)
Get LightSource.
Definition: Instrument.cpp:466
virtual void update(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Update the object hierarchy recursively from an XML DOM tree.
Definition: Instrument.cpp:244
void setFilter(std::vector< std::shared_ptr< ome::xml::model::Filter >>::size_type index, std::shared_ptr< ome::xml::model::Filter > &filter)
Set Filter.
Definition: Instrument.cpp:710
std::vector< std::shared_ptr< ome::xml::model::LightSource > > & getLightSourceList()
Get the LightSource list.
Definition: Instrument.cpp:454
Private implementation details of Instrument model object.
Definition: Instrument.cpp:100
const std::string & elementName() const
Get the element name of this model object.
Definition: Instrument.cpp:231
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Instrument.cpp:824
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
std::vector< std::shared_ptr< ome::xml::model::LightSource > >::size_type sizeOfLightSourceList() const
Get size of linked LightSource list.
Definition: Instrument.cpp:448
Open Microscopy Environment C++ implementation.
const std::string & getID() const
Get the ID property.
Definition: Instrument.cpp:413
std::shared_ptr< ome::xml::model::Dichroic > & getDichroic(std::vector< std::shared_ptr< ome::xml::model::Dichroic >>::size_type index)
Get Dichroic.
Definition: Instrument.cpp:756
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Instrument.cpp:1042
void addLightSource(std::shared_ptr< ome::xml::model::LightSource > &lightSource)
Add LightSource.
Definition: Instrument.cpp:487
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Instrument.cpp:862
const std::weak_ptr< ome::xml::model::Image > & getLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type index) const
Get linked Image.
Definition: Instrument.cpp:868
std::vector< std::shared_ptr< ome::xml::model::Detector > > & getDetectorList()
Get the Detector list.
Definition: Instrument.cpp:512
void setFilterSet(std::vector< std::shared_ptr< ome::xml::model::FilterSet >>::size_type index, std::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Set FilterSet.
Definition: Instrument.cpp:652
const std::weak_ptr< ome::xml::model::Annotation > & setLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Set linked Annotation.
Definition: Instrument.cpp:814
std::vector< std::shared_ptr< ome::xml::model::Objective > > & getObjectiveList()
Get the Objective list.
Definition: Instrument.cpp:570
bool link(std::shared_ptr< Reference > &reference, std::shared_ptr< ome::xml::model::OMEModelObject > &object)
Link a given OME model object to this model object.
Definition: Instrument.cpp:382
const std::weak_ptr< ome::xml::model::Annotation > & getLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type index) const
Get linked Annotation.
Definition: Instrument.cpp:808
std::vector< std::shared_ptr< ome::xml::model::Objective > >::size_type sizeOfObjectiveList() const
Get size of linked Objective list.
Definition: Instrument.cpp:564
void addFilter(std::shared_ptr< ome::xml::model::Filter > &filter)
Add Filter.
Definition: Instrument.cpp:719
void setDetector(std::vector< std::shared_ptr< ome::xml::model::Detector >>::size_type index, std::shared_ptr< ome::xml::model::Detector > &detector)
Set Detector.
Definition: Instrument.cpp:536
void addObjective(std::shared_ptr< ome::xml::model::Objective > &objective)
Add Objective.
Definition: Instrument.cpp:603
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Instrument.cpp:796
std::vector< std::shared_ptr< ome::xml::model::Dichroic > > & getDichroicList()
Get the Dichroic list.
Definition: Instrument.cpp:744
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Instrument.cpp:838
const std::weak_ptr< ome::xml::model::Image > & setLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Set linked Image.
Definition: Instrument.cpp:874
std::vector< std::shared_ptr< ome::xml::model::Detector > >::size_type sizeOfDetectorList() const
Get size of linked Detector list.
Definition: Instrument.cpp:506
void setMicroscope(std::shared_ptr< ome::xml::model::Microscope > µscope)
Set the Microscope property.
Definition: Instrument.cpp:441
bool linkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Link Image.
Definition: Instrument.cpp:884
virtual void asXMLElementInternal(common::xml::dom::Document &document, common::xml::dom::Element &element) const
Transform the object hierarchy rooted at this element to XML.
Definition: Instrument.cpp:913
std::vector< std::shared_ptr< ome::xml::model::Filter > >::size_type sizeOfFilterList() const
Get size of linked Filter list.
Definition: Instrument.cpp:680
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Instrument.cpp:238
void removeFilterSet(std::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Remove FilterSet.
Definition: Instrument.cpp:669
void removeObjective(std::shared_ptr< ome::xml::model::Objective > &objective)
Remove Objective.
Definition: Instrument.cpp:611
void removeFilter(std::shared_ptr< ome::xml::model::Filter > &filter)
Remove Filter.
Definition: Instrument.cpp:727
void setObjective(std::vector< std::shared_ptr< ome::xml::model::Objective >>::size_type index, std::shared_ptr< ome::xml::model::Objective > &objective)
Set Objective.
Definition: Instrument.cpp:594
void removeLightSource(std::shared_ptr< ome::xml::model::LightSource > &lightSource)
Remove LightSource.
Definition: Instrument.cpp:495
Instrument()
Default constructor.
Definition: Instrument.cpp:202
void setLightSource(std::vector< std::shared_ptr< ome::xml::model::LightSource >>::size_type index, std::shared_ptr< ome::xml::model::LightSource > &lightSource)
Set LightSource.
Definition: Instrument.cpp:478
std::vector< std::shared_ptr< ome::xml::model::Filter > > & getFilterList()
Get the Filter list.
Definition: Instrument.cpp:686
void removeDetector(std::shared_ptr< ome::xml::model::Detector > &detector)
Remove Detector.
Definition: Instrument.cpp:553
void removeDichroic(std::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Remove Dichroic.
Definition: Instrument.cpp:785
bool unlinkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Unlink Image.
Definition: Instrument.cpp:897
std::shared_ptr< ome::xml::model::Filter > & getFilter(std::vector< std::shared_ptr< ome::xml::model::Filter >>::size_type index)
Get Filter.
Definition: Instrument.cpp:698
Instrument & operator=(const Instrument &)
Assignment operator (deleted).
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Instrument.h:90