6 #ifndef INCLUDED_IMF_HEADER_H
7 #define INCLUDED_IMF_HEADER_H
51 float screenWindowWidth = 1,
68 float screenWindowWidth = 1,
84 float screenWindowWidth = 1,
93 Header (
const Header& other);
149 void erase (
const char name[]);
174 Attribute& operator[] (
const char name[]);
176 const Attribute& operator[] (
const char name[])
const;
183 template <
class T>
T& typedAttribute (
const char name[]);
184 template <
class T>
const T& typedAttribute (
const char name[])
const;
186 template <
class T>
T& typedAttribute (
const std::string& name);
187 template <
class T>
const T& typedAttribute (
const std::string& name)
const;
189 template <
class T>
T* findTypedAttribute (
const char name[]);
190 template <
class T>
const T* findTypedAttribute (
const char name[])
const;
192 template <
class T>
T* findTypedAttribute (
const std::string& name);
194 const T* findTypedAttribute (
const std::string& name)
const;
208 ConstIterator
begin ()
const;
213 ConstIterator
end ()
const;
216 Iterator
find (
const char name[]);
218 ConstIterator
find (
const char name[])
const;
250 float& screenWindowWidth ();
252 const float& screenWindowWidth ()
const;
279 void resetDefaultCompressionLevels ();
281 int& zipCompressionLevel ();
283 int zipCompressionLevel ()
const;
285 float& dwaCompressionLevel ();
287 float dwaCompressionLevel ()
const;
295 void setName (
const string& name);
300 const string&
name ()
const;
303 bool hasName ()
const;
306 void setType (
const string&
Type);
311 const string&
type ()
const;
314 bool hasType ()
const;
325 bool hasVersion ()
const;
332 void setChunkCount (
int chunks);
334 bool hasChunkCount ()
const;
336 const int& chunkCount ()
const;
345 void setView (
const string&
view);
347 bool hasView ()
const;
351 const string&
view ()
const;
383 bool hasTileDescription ()
const;
415 bool hasPreviewImage ()
const;
427 void sanityCheck (
bool isTiled =
false,
bool isMultipartFile =
false)
const;
446 static void setMaxImageSize (
int maxWidth,
int maxHeight);
448 static void setMaxTileSize (
int maxWidth,
int maxHeight);
450 static void getMaxImageSize (
int& maxWidth,
int& maxHeight);
452 static void getMaxTileSize (
int& maxWidth,
int& maxHeight);
459 bool readsNothing ();
495 Iterator (
const Header::AttributeMap::iterator& i);
498 Iterator& operator++ ();
500 Iterator operator++ (
int);
503 const char*
name ()
const;
510 Header::AttributeMap::iterator _i;
519 ConstIterator (
const Header::AttributeMap::const_iterator& i);
524 ConstIterator& operator++ ();
526 ConstIterator operator++ (
int);
529 const char*
name ()
const;
534 friend bool operator== (
const ConstIterator&,
const ConstIterator&);
535 friend bool operator!= (
const ConstIterator&,
const ConstIterator&);
537 Header::AttributeMap::const_iterator _i;
560 inline Header::Iterator::Iterator () : _i ()
565 inline Header::Iterator::Iterator (
const Header::AttributeMap::iterator& i)
572 Header::Iterator::operator++ ()
579 Header::Iterator::operator++ (
int)
581 Iterator tmp = *
this;
598 inline Header::ConstIterator::ConstIterator () : _i ()
603 inline Header::ConstIterator::ConstIterator (
604 const Header::AttributeMap::const_iterator& i)
617 Header::ConstIterator::operator++ ()
624 Header::ConstIterator::operator++ (
int)
626 ConstIterator tmp = *
this;
664 T* tattr =
dynamic_cast<T*
> (attr);
666 if (tattr == 0)
throw IEX_NAMESPACE::TypeExc (
"Unexpected attribute type.");
676 const T* tattr =
dynamic_cast<const T*
> (attr);
678 if (tattr == 0)
throw IEX_NAMESPACE::TypeExc (
"Unexpected attribute type.");
687 return typedAttribute<T> (name.c_str ());
694 return typedAttribute<T> (name.c_str ());
701 AttributeMap::iterator i = _map.find (name);
702 return (i == _map.end ()) ? 0 : dynamic_cast<T*> (i->second);
709 AttributeMap::const_iterator i = _map.find (name);
710 return (i == _map.end ()) ? 0 : dynamic_cast<const T*> (i->second);
717 return findTypedAttribute<T> (name.c_str ());
724 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.
LeafData & operator=(const LeafData &)=delete
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.