7 #ifndef INCLUDED_IMF_HEADER_H
8 #define INCLUDED_IMF_HEADER_H
53 float screenWindowWidth = 1,
69 float screenWindowWidth = 1,
84 float screenWindowWidth = 1,
94 Header (
const Header& other);
111 Header& operator= (
const Header& other);
113 Header& operator= (Header&& other);
153 void erase (
const char name[]);
180 Attribute & operator [] (
const char name[]);
182 const Attribute & operator [] (
const char name[])
const;
189 template <
class T>
T& typedAttribute (
const char name[]);
190 template <
class T>
const T& typedAttribute (
const char name[])
const;
192 template <
class T>
T& typedAttribute (
const std::string &name);
193 template <
class T>
const T& typedAttribute (
const std::string &name)
const;
195 template <
class T>
T* findTypedAttribute (
const char name[]);
196 template <
class T>
const T* findTypedAttribute (
const char name[])
const;
198 template <
class T>
T* findTypedAttribute (
const std::string &name);
199 template <
class T>
const T* findTypedAttribute (
const std::string &name)
214 ConstIterator
begin ()
const;
219 ConstIterator
end ()
const;
222 Iterator
find (
const char name[]);
224 ConstIterator
find (
const char name[])
const;
257 float & screenWindowWidth ();
259 const float & screenWindowWidth ()
const;
286 void resetDefaultCompressionLevels ();
288 int& zipCompressionLevel ();
290 int zipCompressionLevel ()
const;
292 float& dwaCompressionLevel ();
294 float dwaCompressionLevel ()
const;
302 void setName (
const string& name);
307 const string&
name()
const;
310 bool hasName()
const;
313 void setType (
const string&
Type);
318 const string&
type()
const;
321 bool hasType()
const;
332 bool hasVersion()
const;
339 void setChunkCount(
int chunks);
341 bool hasChunkCount()
const;
343 const int & chunkCount()
const;
353 void setView(
const string &
view);
355 bool hasView()
const;
359 const string &
view()
const;
392 bool hasTileDescription()
const;
425 bool hasPreviewImage ()
const;
438 void sanityCheck (
bool isTiled =
false,
439 bool isMultipartFile =
false)
const;
459 static void setMaxImageSize (
int maxWidth,
int maxHeight);
461 static void setMaxTileSize (
int maxWidth,
int maxHeight);
508 Iterator (
const Header::AttributeMap::iterator &i);
511 Iterator & operator ++ ();
513 Iterator operator ++ (
int);
516 const char *
name ()
const;
524 Header::AttributeMap::iterator _i;
535 ConstIterator (
const Header::AttributeMap::const_iterator &i);
540 ConstIterator & operator ++ ();
542 ConstIterator operator ++ (
int);
545 const char *
name ()
const;
551 friend bool operator == (
const ConstIterator &,
const ConstIterator &);
552 friend bool operator != (
const ConstIterator &,
const ConstIterator &);
554 Header::AttributeMap::const_iterator _i;
581 Header::Iterator::Iterator (): _i()
588 Header::Iterator::Iterator (
const Header::AttributeMap::iterator &i): _i (i)
595 Header::Iterator::operator ++ ()
603 Header::Iterator::operator ++ (
int)
605 Iterator tmp = *
this;
626 Header::ConstIterator::ConstIterator (): _i()
632 Header::ConstIterator::ConstIterator
633 (
const Header::AttributeMap::const_iterator &i): _i (i)
647 Header::ConstIterator::operator ++ ()
655 Header::ConstIterator::operator ++ (
int)
657 ConstIterator tmp = *
this;
700 T *tattr = dynamic_cast <
T *> (attr);
703 throw IEX_NAMESPACE::TypeExc (
"Unexpected attribute type.");
714 const T *tattr = dynamic_cast <
const T *> (attr);
717 throw IEX_NAMESPACE::TypeExc (
"Unexpected attribute type.");
727 return typedAttribute<T> (name.c_str());
735 return typedAttribute<T> (name.c_str());
743 AttributeMap::iterator i = _map.find (name);
744 return (i == _map.end())? 0: dynamic_cast <T *> (i->second);
752 AttributeMap::const_iterator i = _map.find (name);
753 return (i == _map.end())? 0: dynamic_cast <const T *> (i->second);
761 return findTypedAttribute<T> (name.c_str());
769 return findTypedAttribute<T> (name.c_str());
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER enum IMF_EXPORT_ENUM Compression
GLsizei const GLchar *const * string
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER enum IMF_EXPORT_ENUM LineOrder
OIIO_FORCEINLINE vbool4 insert(const vbool4 &a, bool val)
Helper: substitute val for a[i].
GLint GLsizei GLsizei height
class IMF_EXPORT_TYPE Header
IMF_EXPORT bool isTiled(const std::string &name)
Box< V2i > Box2i
2D box of base type int.
OPENVDB_API void setVersion(std::ios_base &, const VersionId &libraryVersion, uint32_t fileVersion)
Associate specific file format and library version numbers with the given stream. ...
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
GLuint const GLchar * name
HUSD_API const char * pixelAspectRatio()
class IMF_EXPORT_TYPE OStream
GT_API const UT_StringHolder version
Vec2< float > V2f
Vec2 of float.
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)
class IMF_EXPORT_TYPE IStream
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.