ome-xml  5.6.0
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 
138  Pixels&
139  operator= (const Pixels&) = delete;
141 
142  // -- OMEModelObject API methods --
143 
145  virtual void
146  update(const common::xml::dom::Element& element,
148 
149  public:
150  // -- Pixels API methods --
151 
153  bool
154  link (std::shared_ptr<Reference>& reference,
155  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
156 
163  getSizeT () const;
164 
170  void
172 
180 
187  getDimensionOrder () const;
188 
194  void
196 
202  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
203  getPhysicalSizeZ ();
204 
210  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
211  getPhysicalSizeZ () const;
212 
218  void
220 
226  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
227  getPhysicalSizeY ();
228 
234  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
235  getPhysicalSizeY () const;
236 
242  void
244 
250  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
251  getPhysicalSizeX ();
252 
258  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::PositiveFloat > >&
259  getPhysicalSizeX () const;
260 
266  void
268 
275  getSizeX () const;
276 
282  void
284 
291  getSizeY () const;
292 
298  void
300 
307  getSizeZ () const;
308 
314  void
316 
322  std::shared_ptr<bool>
323  getBigEndian ();
324 
330  const std::shared_ptr<bool>
331  getBigEndian () const;
332 
338  void
339  setBigEndian (std::shared_ptr<bool>& bigEndian);
340 
346  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsTime > >&
347  getTimeIncrement ();
348 
354  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsTime > >&
355  getTimeIncrement () const;
356 
362  void
364 
370  std::shared_ptr<ome::xml::model::primitives::PositiveInteger>
372 
378  const std::shared_ptr<ome::xml::model::primitives::PositiveInteger>
379  getSignificantBits () const;
380 
386  void
387  setSignificantBits (std::shared_ptr<ome::xml::model::primitives::PositiveInteger>& significantBits);
388 
395  getSizeC () const;
396 
402  void
404 
411  getType ();
412 
419  getType () const;
420 
426  void
428 
434  const std::string&
435  getID () const;
436 
442  void
443  setID (const std::string& id);
444 
450  std::shared_ptr<bool>
451  getInterleaved ();
452 
458  const std::shared_ptr<bool>
459  getInterleaved () const;
460 
466  void
467  setInterleaved (std::shared_ptr<bool>& interleaved);
468 
474  std::vector<std::shared_ptr<ome::xml::model::Channel>>::size_type
475  sizeOfChannelList () const;
476 
483  std::vector<std::shared_ptr<ome::xml::model::Channel>>&
484  getChannelList ();
485 
492  const std::vector<std::shared_ptr<ome::xml::model::Channel>>&
493  getChannelList () const;
494 
502  std::shared_ptr<ome::xml::model::Channel>&
503  getChannel (std::vector<std::shared_ptr<ome::xml::model::Channel>>::size_type index);
504 
512  const std::shared_ptr<ome::xml::model::Channel>&
513  getChannel (std::vector<std::shared_ptr<ome::xml::model::Channel>>::size_type index) const;
514 
522  void
523  setChannel (std::vector<std::shared_ptr<ome::xml::model::Channel>>::size_type index,
524  std::shared_ptr<ome::xml::model::Channel>& channel);
525 
534  void
535  addChannel (std::shared_ptr<ome::xml::model::Channel>& channel);
536 
546  void
547  removeChannel (std::shared_ptr<ome::xml::model::Channel>& channel);
548 
554  std::vector<std::shared_ptr<ome::xml::model::BinData>>::size_type
555  sizeOfBinDataList () const;
556 
563  std::vector<std::shared_ptr<ome::xml::model::BinData>>&
564  getBinDataList ();
565 
572  const std::vector<std::shared_ptr<ome::xml::model::BinData>>&
573  getBinDataList () const;
574 
582  std::shared_ptr<ome::xml::model::BinData>&
583  getBinData (std::vector<std::shared_ptr<ome::xml::model::BinData>>::size_type index);
584 
592  const std::shared_ptr<ome::xml::model::BinData>&
593  getBinData (std::vector<std::shared_ptr<ome::xml::model::BinData>>::size_type index) const;
594 
602  void
603  setBinData (std::vector<std::shared_ptr<ome::xml::model::BinData>>::size_type index,
604  std::shared_ptr<ome::xml::model::BinData>& binData);
605 
614  void
615  addBinData (std::shared_ptr<ome::xml::model::BinData>& binData);
616 
626  void
627  removeBinData (std::shared_ptr<ome::xml::model::BinData>& binData);
628 
634  std::vector<std::shared_ptr<ome::xml::model::TiffData>>::size_type
635  sizeOfTiffDataList () const;
636 
643  std::vector<std::shared_ptr<ome::xml::model::TiffData>>&
644  getTiffDataList ();
645 
652  const std::vector<std::shared_ptr<ome::xml::model::TiffData>>&
653  getTiffDataList () const;
654 
662  std::shared_ptr<ome::xml::model::TiffData>&
663  getTiffData (std::vector<std::shared_ptr<ome::xml::model::TiffData>>::size_type index);
664 
672  const std::shared_ptr<ome::xml::model::TiffData>&
673  getTiffData (std::vector<std::shared_ptr<ome::xml::model::TiffData>>::size_type index) const;
674 
682  void
683  setTiffData (std::vector<std::shared_ptr<ome::xml::model::TiffData>>::size_type index,
684  std::shared_ptr<ome::xml::model::TiffData>& tiffData);
685 
694  void
695  addTiffData (std::shared_ptr<ome::xml::model::TiffData>& tiffData);
696 
706  void
707  removeTiffData (std::shared_ptr<ome::xml::model::TiffData>& tiffData);
708 
714  std::shared_ptr<ome::xml::model::MetadataOnly>
715  getMetadataOnly ();
716 
722  const std::shared_ptr<ome::xml::model::MetadataOnly>
723  getMetadataOnly () const;
724 
730  void
731  setMetadataOnly (std::shared_ptr<ome::xml::model::MetadataOnly>& metadataOnly);
732 
738  std::vector<std::shared_ptr<ome::xml::model::Plane>>::size_type
739  sizeOfPlaneList () const;
740 
747  std::vector<std::shared_ptr<ome::xml::model::Plane>>&
748  getPlaneList ();
749 
756  const std::vector<std::shared_ptr<ome::xml::model::Plane>>&
757  getPlaneList () const;
758 
766  std::shared_ptr<ome::xml::model::Plane>&
767  getPlane (std::vector<std::shared_ptr<ome::xml::model::Plane>>::size_type index);
768 
776  const std::shared_ptr<ome::xml::model::Plane>&
777  getPlane (std::vector<std::shared_ptr<ome::xml::model::Plane>>::size_type index) const;
778 
786  void
787  setPlane (std::vector<std::shared_ptr<ome::xml::model::Plane>>::size_type index,
788  std::shared_ptr<ome::xml::model::Plane>& plane);
789 
798  void
799  addPlane (std::shared_ptr<ome::xml::model::Plane>& plane);
800 
810  void
811  removePlane (std::shared_ptr<ome::xml::model::Plane>& plane);
812 
813  protected:
814  // Documented in base class.
815  virtual void
817  common::xml::dom::Element& element) const;
818 
819  public:
820  // Documented in superclass.
821  const std::string&
822  getXMLNamespace() const;
823  };
824 
825  }
826  }
827 }
828 
829 #endif // OME_XML_MODEL_PIXELS_H
830 
831 /*
832  * Local Variables:
833  * mode:C++
834  * End:
835  */
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:568
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Pixels.cpp:321
void setInterleaved(std::shared_ptr< bool > &interleaved)
Set the Interleaved property.
Definition: Pixels.cpp:834
Pixels()
Default constructor.
Definition: Pixels.cpp:281
virtual ~Pixels()
Destructor.
Definition: Pixels.cpp:300
void setType(const ome::xml::model::enums::PixelType &type)
Set the Type property.
Definition: Pixels.cpp:799
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:859
const ome::xml::model::primitives::PositiveInteger & getSizeY() const
Get the SizeY property.
Definition: Pixels.cpp:680
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:603
std::shared_ptr< bool > getInterleaved()
Get the Interleaved property.
Definition: Pixels.cpp:820
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:617
std::vector< std::shared_ptr< ome::xml::model::BinData > >::size_type sizeOfBinDataList() const
Get size of linked BinData list.
Definition: Pixels.cpp:899
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:929
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:1029
void setSizeZ(const ome::xml::model::primitives::PositiveInteger &sizeZ)
Set the SizeZ property.
Definition: Pixels.cpp:701
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Pixels.cpp:1296
std::vector< std::shared_ptr< ome::xml::model::Plane > >::size_type sizeOfPlaneList() const
Get size of linked Plane list.
Definition: Pixels.cpp:1036
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:305
void removeTiffData(std::shared_ptr< ome::xml::model::TiffData > &tiffData)
Remove TiffData.
Definition: Pixels.cpp:1004
const ome::xml::model::primitives::PositiveInteger & getSizeX() const
Get the SizeX property.
Definition: Pixels.cpp:666
void addChannel(std::shared_ptr< ome::xml::model::Channel > &channel)
Add Channel.
Definition: Pixels.cpp:880
std::vector< std::shared_ptr< ome::xml::model::Channel > >::size_type sizeOfChannelList() const
Get size of linked Channel list.
Definition: Pixels.cpp:841
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:624
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:645
void setSizeY(const ome::xml::model::primitives::PositiveInteger &sizeY)
Set the SizeY property.
Definition: Pixels.cpp:687
void setSignificantBits(std::shared_ptr< ome::xml::model::primitives::PositiveInteger > &significantBits)
Set the SignificantBits property.
Definition: Pixels.cpp:764
ome::xml::model::enums::PixelType & getType()
Get the Type property.
Definition: Pixels.cpp:785
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:638
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:729
std::shared_ptr< ome::xml::model::primitives::PositiveInteger > getSignificantBits()
Get the SignificantBits property.
Definition: Pixels.cpp:750
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:553
void setDimensionOrder(const ome::xml::model::enums::DimensionOrder &dimensionOrder)
Set the DimensionOrder property.
Definition: Pixels.cpp:596
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:1093
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:905
void removeChannel(std::shared_ptr< ome::xml::model::Channel > &channel)
Remove Channel.
Definition: Pixels.cpp:888
const std::string & elementName() const
Get the element name of this model object.
Definition: Pixels.cpp:314
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:917
std::vector< std::shared_ptr< ome::xml::model::Plane > > & getPlaneList()
Get the Plane list.
Definition: Pixels.cpp:1042
const std::string & getID() const
Get the ID property.
Definition: Pixels.cpp:806
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:1066
std::shared_ptr< bool > getBigEndian()
Get the BigEndian property.
Definition: Pixels.cpp:708
virtual SKIP 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:327
std::vector< std::shared_ptr< ome::xml::model::TiffData > > & getTiffDataList()
Get the TiffData list.
Definition: Pixels.cpp:963
void removePlane(std::shared_ptr< ome::xml::model::Plane > &plane)
Remove Plane.
Definition: Pixels.cpp:1083
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:1054
void setID(const std::string &id)
Set the ID property.
Definition: Pixels.cpp:813
const ome::xml::model::primitives::PositiveInteger & getSizeZ() const
Get the SizeZ property.
Definition: Pixels.cpp:694
void removeBinData(std::shared_ptr< ome::xml::model::BinData > &binData)
Remove BinData.
Definition: Pixels.cpp:946
const ome::xml::model::primitives::PositiveInteger & getSizeC() const
Get the SizeC property.
Definition: Pixels.cpp:771
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:987
PixelType enumeration.
Definition: PixelType.h:72
std::shared_ptr< ome::xml::model::MetadataOnly > getMetadataOnly()
Get the MetadataOnly property.
Definition: Pixels.cpp:1015
std::vector< std::shared_ptr< ome::xml::model::Channel > > & getChannelList()
Get the Channel list.
Definition: Pixels.cpp:847
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:778
void setSizeT(const ome::xml::model::primitives::PositiveInteger &sizeT)
Set the SizeT property.
Definition: Pixels.cpp:575
void addPlane(std::shared_ptr< ome::xml::model::Plane > &plane)
Add Plane.
Definition: Pixels.cpp:1075
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:975
std::vector< std::shared_ptr< ome::xml::model::TiffData > >::size_type sizeOfTiffDataList() const
Get size of linked TiffData list.
Definition: Pixels.cpp:957
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:659
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:871
void addTiffData(std::shared_ptr< ome::xml::model::TiffData > &tiffData)
Add TiffData.
Definition: Pixels.cpp:996
ome::xml::model::enums::DimensionOrder & getDimensionOrder()
Get the DimensionOrder property.
Definition: Pixels.cpp:582
void setBigEndian(std::shared_ptr< bool > &bigEndian)
Set the BigEndian property.
Definition: Pixels.cpp:722
void addBinData(std::shared_ptr< ome::xml::model::BinData > &binData)
Add BinData.
Definition: Pixels.cpp:938
void setTimeIncrement(const std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsTime > > &timeIncrement)
Set the TimeIncrement property.
Definition: Pixels.cpp:743
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:673