ome-xml  5.5.1
Pixels.h
1 /*
2  * #%L
3  * OME-XML C++ library for working with OME-XML metadata structures.
4  * %%
5  * Copyright © 2006 - 2016 Open Microscopy Environment:
6  * - Massachusetts Institute of Technology
7  * - National Institutes of Health
8  * - University of Dundee
9  * - Board of Regents of the University of Wisconsin-Madison
10  * - Glencoe Software, Inc.
11  * %%
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions are met:
14  *
15  * 1. Redistributions of source code must retain the above copyright notice,
16  * this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright notice,
18  * this list of conditions and the following disclaimer in the documentation
19  * and/or other materials provided with the distribution.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  * The views and conclusions contained in the software and documentation are
34  * those of the authors and should not be interpreted as representing official
35  * policies, either expressed or implied, of any organization.
36  * #L%
37  */
38 
39 /*─────────────────────────────────────────────────────────────────────────────
40  *
41  * THIS IS AUTOMATICALLY GENERATED CODE. DO NOT MODIFY.
42  *
43  *─────────────────────────────────────────────────────────────────────────────
44  */
45 
46 #ifndef OME_XML_MODEL_PIXELS_H
47 #define OME_XML_MODEL_PIXELS_H
48 
49 #include <algorithm>
50 #include <list>
51 #include <stdexcept>
52 #include <string>
53 #include <vector>
54 
55 #include <ome/common/log.h>
56 
57 #include <ome/common/xml/dom/Document.h>
58 #include <ome/common/xml/dom/Element.h>
59 #include <ome/common/xml/dom/Node.h>
60 
61 #include <ome/xml/model/primitives/Quantity.h>
62 
63 #include <ome/xml/model/MetadataOnly.h>
64 #include <ome/xml/model/detail/OMEModelObject.h>
65 #include <ome/xml/model/enums/DimensionOrder.h>
66 #include <ome/xml/model/enums/PixelType.h>
67 #include <ome/xml/model/enums/UnitsLength.h>
68 #include <ome/xml/model/enums/UnitsTime.h>
69 #include <ome/xml/model/primitives/PositiveFloat.h>
70 #include <ome/xml/model/primitives/PositiveInteger.h>
71 
72 namespace ome
73 {
74  namespace xml
75  {
76  namespace model
77  {
78 
79  // Forward declarations.
80  class BinData;
81  class Channel;
82  class OMEModel;
83  class Plane;
84  class TiffData;
85 
90  {
91  private:
92  class Impl;
94  std::shared_ptr<Impl> impl;
95 
96  public:
98  Pixels();
99 
105  Pixels (const Pixels& copy);
106 
108  virtual
109  ~Pixels ();
110 
125  static std::shared_ptr<Pixels>
126  create(const common::xml::dom::Element& element,
128 
129  // Documented in superclass.
130  const std::string&
131  elementName() const;
132 
133  // Documented in superclass.
134  bool
135  validElementName(const std::string& name) const;
136 
137  private:
139  Pixels&
140  operator= (const Pixels&);
141 
142  public:
143  // -- OMEModelObject API methods --
144 
146  virtual void
147  update(const common::xml::dom::Element& element,
149 
150  public:
151  // -- Pixels API methods --
152 
154  bool
155  link (std::shared_ptr<Reference>& reference,
156  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
157 
164  getSizeT () const;
165 
171  void
173 
181 
188  getDimensionOrder () const;
189 
195  void
197 
203  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
204  getPhysicalSizeZ ();
205 
211  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
212  getPhysicalSizeZ () const;
213 
219  void
221 
227  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
228  getPhysicalSizeY ();
229 
235  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
236  getPhysicalSizeY () const;
237 
243  void
245 
251  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
252  getPhysicalSizeX ();
253 
259  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
260  getPhysicalSizeX () const;
261 
267  void
269 
276  getSizeX () const;
277 
283  void
285 
292  getSizeY () const;
293 
299  void
301 
308  getSizeZ () const;
309 
315  void
317 
323  std::shared_ptr<bool>
324  getBigEndian ();
325 
331  const std::shared_ptr<bool>
332  getBigEndian () const;
333 
339  void
340  setBigEndian (std::shared_ptr<bool>& bigEndian);
341 
347  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsTime > >&
348  getTimeIncrement ();
349 
355  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsTime > >&
356  getTimeIncrement () const;
357 
363  void
365 
371  std::shared_ptr<ome::xml::model::primitives::PositiveInteger>
373 
379  const std::shared_ptr<ome::xml::model::primitives::PositiveInteger>
380  getSignificantBits () const;
381 
387  void
388  setSignificantBits (std::shared_ptr<ome::xml::model::primitives::PositiveInteger>& significantBits);
389 
396  getSizeC () const;
397 
403  void
405 
412  getType ();
413 
420  getType () const;
421 
427  void
429 
435  const std::string&
436  getID () const;
437 
443  void
444  setID (const std::string& id);
445 
451  std::shared_ptr<bool>
452  getInterleaved ();
453 
459  const std::shared_ptr<bool>
460  getInterleaved () const;
461 
467  void
468  setInterleaved (std::shared_ptr<bool>& interleaved);
469 
475  std::vector<std::shared_ptr<ome::xml::model::Channel>>::size_type
476  sizeOfChannelList () const;
477 
484  std::vector<std::shared_ptr<ome::xml::model::Channel>>&
485  getChannelList ();
486 
493  const std::vector<std::shared_ptr<ome::xml::model::Channel>>&
494  getChannelList () const;
495 
503  std::shared_ptr<ome::xml::model::Channel>&
504  getChannel (std::vector<std::shared_ptr<ome::xml::model::Channel>>::size_type index);
505 
513  const std::shared_ptr<ome::xml::model::Channel>&
514  getChannel (std::vector<std::shared_ptr<ome::xml::model::Channel>>::size_type index) const;
515 
523  void
524  setChannel (std::vector<std::shared_ptr<ome::xml::model::Channel>>::size_type index,
525  std::shared_ptr<ome::xml::model::Channel>& channel);
526 
535  void
536  addChannel (std::shared_ptr<ome::xml::model::Channel>& channel);
537 
547  void
548  removeChannel (std::shared_ptr<ome::xml::model::Channel>& channel);
549 
555  std::vector<std::shared_ptr<ome::xml::model::BinData>>::size_type
556  sizeOfBinDataList () const;
557 
564  std::vector<std::shared_ptr<ome::xml::model::BinData>>&
565  getBinDataList ();
566 
573  const std::vector<std::shared_ptr<ome::xml::model::BinData>>&
574  getBinDataList () const;
575 
583  std::shared_ptr<ome::xml::model::BinData>&
584  getBinData (std::vector<std::shared_ptr<ome::xml::model::BinData>>::size_type index);
585 
593  const std::shared_ptr<ome::xml::model::BinData>&
594  getBinData (std::vector<std::shared_ptr<ome::xml::model::BinData>>::size_type index) const;
595 
603  void
604  setBinData (std::vector<std::shared_ptr<ome::xml::model::BinData>>::size_type index,
605  std::shared_ptr<ome::xml::model::BinData>& binData);
606 
615  void
616  addBinData (std::shared_ptr<ome::xml::model::BinData>& binData);
617 
627  void
628  removeBinData (std::shared_ptr<ome::xml::model::BinData>& binData);
629 
635  std::vector<std::shared_ptr<ome::xml::model::TiffData>>::size_type
636  sizeOfTiffDataList () const;
637 
644  std::vector<std::shared_ptr<ome::xml::model::TiffData>>&
645  getTiffDataList ();
646 
653  const std::vector<std::shared_ptr<ome::xml::model::TiffData>>&
654  getTiffDataList () const;
655 
663  std::shared_ptr<ome::xml::model::TiffData>&
664  getTiffData (std::vector<std::shared_ptr<ome::xml::model::TiffData>>::size_type index);
665 
673  const std::shared_ptr<ome::xml::model::TiffData>&
674  getTiffData (std::vector<std::shared_ptr<ome::xml::model::TiffData>>::size_type index) const;
675 
683  void
684  setTiffData (std::vector<std::shared_ptr<ome::xml::model::TiffData>>::size_type index,
685  std::shared_ptr<ome::xml::model::TiffData>& tiffData);
686 
695  void
696  addTiffData (std::shared_ptr<ome::xml::model::TiffData>& tiffData);
697 
707  void
708  removeTiffData (std::shared_ptr<ome::xml::model::TiffData>& tiffData);
709 
715  std::shared_ptr<ome::xml::model::MetadataOnly>
716  getMetadataOnly ();
717 
723  const std::shared_ptr<ome::xml::model::MetadataOnly>
724  getMetadataOnly () const;
725 
731  void
732  setMetadataOnly (std::shared_ptr<ome::xml::model::MetadataOnly>& metadataOnly);
733 
739  std::vector<std::shared_ptr<ome::xml::model::Plane>>::size_type
740  sizeOfPlaneList () const;
741 
748  std::vector<std::shared_ptr<ome::xml::model::Plane>>&
749  getPlaneList ();
750 
757  const std::vector<std::shared_ptr<ome::xml::model::Plane>>&
758  getPlaneList () const;
759 
767  std::shared_ptr<ome::xml::model::Plane>&
768  getPlane (std::vector<std::shared_ptr<ome::xml::model::Plane>>::size_type index);
769 
777  const std::shared_ptr<ome::xml::model::Plane>&
778  getPlane (std::vector<std::shared_ptr<ome::xml::model::Plane>>::size_type index) const;
779 
787  void
788  setPlane (std::vector<std::shared_ptr<ome::xml::model::Plane>>::size_type index,
789  std::shared_ptr<ome::xml::model::Plane>& plane);
790 
799  void
800  addPlane (std::shared_ptr<ome::xml::model::Plane>& plane);
801 
811  void
812  removePlane (std::shared_ptr<ome::xml::model::Plane>& plane);
813 
814  protected:
815  // Documented in base class.
816  virtual void
818  common::xml::dom::Element& element) const;
819 
820  public:
821  // Documented in superclass.
822  const std::string&
823  getXMLNamespace() const;
824  };
825 
826  }
827  }
828 }
829 
830 #endif // OME_XML_MODEL_PIXELS_H
831 
832 /*
833  * Local Variables:
834  * mode:C++
835  * End:
836  */
Private implementation details of Pixels model object.
Definition: Pixels.cpp:103
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
const ome::xml::model::primitives::PositiveInteger & getSizeT() const
Get the SizeT property.
Definition: Pixels.cpp:560
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Pixels.cpp:313
void setInterleaved(std::shared_ptr< bool > &interleaved)
Set the Interleaved property.
Definition: Pixels.cpp:826
Pixels()
Default constructor.
Definition: Pixels.cpp:277
virtual ~Pixels()
Destructor.
Definition: Pixels.cpp:292
void setType(const ome::xml::model::enums::PixelType &type)
Set the Type property.
Definition: Pixels.cpp:791
std::shared_ptr< ome::xml::model::Channel > & getChannel(std::vector< std::shared_ptr< ome::xml::model::Channel >>::size_type index)
Get Channel.
Definition: Pixels.cpp:851
const ome::xml::model::primitives::PositiveInteger & getSizeY() const
Get the SizeY property.
Definition: Pixels.cpp:672
std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > > & getPhysicalSizeZ()
Get the PhysicalSizeZ property.
Definition: Pixels.cpp:595
std::shared_ptr< bool > getInterleaved()
Get the Interleaved property.
Definition: Pixels.cpp:812
void setPhysicalSizeZ(const std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > > &physicalSizeZ)
Set the PhysicalSizeZ property.
Definition: Pixels.cpp:609
std::vector< std::shared_ptr< ome::xml::model::BinData > >::size_type sizeOfBinDataList() const
Get size of linked BinData list.
Definition: Pixels.cpp:891
void setBinData(std::vector< std::shared_ptr< ome::xml::model::BinData >>::size_type index, std::shared_ptr< ome::xml::model::BinData > &binData)
Set BinData.
Definition: Pixels.cpp:921
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
void setMetadataOnly(std::shared_ptr< ome::xml::model::MetadataOnly > &metadataOnly)
Set the MetadataOnly property.
Definition: Pixels.cpp:1021
void setSizeZ(const ome::xml::model::primitives::PositiveInteger &sizeZ)
Set the SizeZ property.
Definition: Pixels.cpp:693
Pixels & operator=(const Pixels &)
Assignment operator (deleted).
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Pixels.cpp:1288
std::vector< std::shared_ptr< ome::xml::model::Plane > >::size_type sizeOfPlaneList() const
Get size of linked Plane list.
Definition: Pixels.cpp:1028
static std::shared_ptr< Pixels > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Pixels model object from DOM element.
Definition: Pixels.cpp:297
void removeTiffData(std::shared_ptr< ome::xml::model::TiffData > &tiffData)
Remove TiffData.
Definition: Pixels.cpp:996
const ome::xml::model::primitives::PositiveInteger & getSizeX() const
Get the SizeX property.
Definition: Pixels.cpp:658
void addChannel(std::shared_ptr< ome::xml::model::Channel > &channel)
Add Channel.
Definition: Pixels.cpp:872
std::vector< std::shared_ptr< ome::xml::model::Channel > >::size_type sizeOfChannelList() const
Get size of linked Channel list.
Definition: Pixels.cpp:833
std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > > & getPhysicalSizeY()
Get the PhysicalSizeY property.
Definition: Pixels.cpp:616
std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > > & getPhysicalSizeX()
Get the PhysicalSizeX property.
Definition: Pixels.cpp:637
void setSizeY(const ome::xml::model::primitives::PositiveInteger &sizeY)
Set the SizeY property.
Definition: Pixels.cpp:679
void setSignificantBits(std::shared_ptr< ome::xml::model::primitives::PositiveInteger > &significantBits)
Set the SignificantBits property.
Definition: Pixels.cpp:756
ome::xml::model::enums::PixelType & getType()
Get the Type property.
Definition: Pixels.cpp:777
void setPhysicalSizeY(const std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > > &physicalSizeY)
Set the PhysicalSizeY property.
Definition: Pixels.cpp:630
DimensionOrder enumeration.
Definition: DimensionOrder.h:72
std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsTime > > & getTimeIncrement()
Get the TimeIncrement property.
Definition: Pixels.cpp:721
std::shared_ptr< ome::xml::model::primitives::PositiveInteger > getSignificantBits()
Get the SignificantBits property.
Definition: Pixels.cpp:742
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: Pixels.cpp:545
void setDimensionOrder(const ome::xml::model::enums::DimensionOrder &dimensionOrder)
Set the DimensionOrder property.
Definition: Pixels.cpp:588
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: Pixels.cpp:1085
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Pixels.h:92
Open Microscopy Environment C++ implementation.
std::vector< std::shared_ptr< ome::xml::model::BinData > > & getBinDataList()
Get the BinData list.
Definition: Pixels.cpp:897
void removeChannel(std::shared_ptr< ome::xml::model::Channel > &channel)
Remove Channel.
Definition: Pixels.cpp:880
const std::string & elementName() const
Get the element name of this model object.
Definition: Pixels.cpp:306
std::shared_ptr< ome::xml::model::BinData > & getBinData(std::vector< std::shared_ptr< ome::xml::model::BinData >>::size_type index)
Get BinData.
Definition: Pixels.cpp:909
std::vector< std::shared_ptr< ome::xml::model::Plane > > & getPlaneList()
Get the Plane list.
Definition: Pixels.cpp:1034
const std::string & getID() const
Get the ID property.
Definition: Pixels.cpp:798
Pixels model object.
Definition: Pixels.h:89
void setPlane(std::vector< std::shared_ptr< ome::xml::model::Plane >>::size_type index, std::shared_ptr< ome::xml::model::Plane > &plane)
Set Plane.
Definition: Pixels.cpp:1058
std::shared_ptr< bool > getBigEndian()
Get the BigEndian property.
Definition: Pixels.cpp:700
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: Pixels.cpp:319
std::vector< std::shared_ptr< ome::xml::model::TiffData > > & getTiffDataList()
Get the TiffData list.
Definition: Pixels.cpp:955
void removePlane(std::shared_ptr< ome::xml::model::Plane > &plane)
Remove Plane.
Definition: Pixels.cpp:1075
std::shared_ptr< ome::xml::model::Plane > & getPlane(std::vector< std::shared_ptr< ome::xml::model::Plane >>::size_type index)
Get Plane.
Definition: Pixels.cpp:1046
void setID(const std::string &id)
Set the ID property.
Definition: Pixels.cpp:805
const ome::xml::model::primitives::PositiveInteger & getSizeZ() const
Get the SizeZ property.
Definition: Pixels.cpp:686
void removeBinData(std::shared_ptr< ome::xml::model::BinData > &binData)
Remove BinData.
Definition: Pixels.cpp:938
const ome::xml::model::primitives::PositiveInteger & getSizeC() const
Get the SizeC property.
Definition: Pixels.cpp:763
void setTiffData(std::vector< std::shared_ptr< ome::xml::model::TiffData >>::size_type index, std::shared_ptr< ome::xml::model::TiffData > &tiffData)
Set TiffData.
Definition: Pixels.cpp:979
PixelType enumeration.
Definition: PixelType.h:72
std::shared_ptr< ome::xml::model::MetadataOnly > getMetadataOnly()
Get the MetadataOnly property.
Definition: Pixels.cpp:1007
std::vector< std::shared_ptr< ome::xml::model::Channel > > & getChannelList()
Get the Channel list.
Definition: Pixels.cpp:839
A quantity of a defined unit.
Definition: Quantity.h:57
void setSizeC(const ome::xml::model::primitives::PositiveInteger &sizeC)
Set the SizeC property.
Definition: Pixels.cpp:770
void setSizeT(const ome::xml::model::primitives::PositiveInteger &sizeT)
Set the SizeT property.
Definition: Pixels.cpp:567
void addPlane(std::shared_ptr< ome::xml::model::Plane > &plane)
Add Plane.
Definition: Pixels.cpp:1067
std::shared_ptr< ome::xml::model::TiffData > & getTiffData(std::vector< std::shared_ptr< ome::xml::model::TiffData >>::size_type index)
Get TiffData.
Definition: Pixels.cpp:967
std::vector< std::shared_ptr< ome::xml::model::TiffData > >::size_type sizeOfTiffDataList() const
Get size of linked TiffData list.
Definition: Pixels.cpp:949
void setPhysicalSizeX(const std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > > &physicalSizeX)
Set the PhysicalSizeX property.
Definition: Pixels.cpp:651
void setChannel(std::vector< std::shared_ptr< ome::xml::model::Channel >>::size_type index, std::shared_ptr< ome::xml::model::Channel > &channel)
Set Channel.
Definition: Pixels.cpp:863
void addTiffData(std::shared_ptr< ome::xml::model::TiffData > &tiffData)
Add TiffData.
Definition: Pixels.cpp:988
ome::xml::model::enums::DimensionOrder & getDimensionOrder()
Get the DimensionOrder property.
Definition: Pixels.cpp:574
void setBigEndian(std::shared_ptr< bool > &bigEndian)
Set the BigEndian property.
Definition: Pixels.cpp:714
void addBinData(std::shared_ptr< ome::xml::model::BinData > &binData)
Add BinData.
Definition: Pixels.cpp:930
void setTimeIncrement(const std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsTime > > &timeIncrement)
Set the TimeIncrement property.
Definition: Pixels.cpp:735
A numeric type constrained to a subrange (or subranges) of its range limits.
Definition: ConstrainedNumeric.h:118
void setSizeX(const ome::xml::model::primitives::PositiveInteger &sizeX)
Set the SizeX property.
Definition: Pixels.cpp:665