ImfDeepImageState.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // Copyright (c) Contributors to the OpenEXR Project.
  4. //
  5. #ifndef INCLUDED_IMF_DEEPIMAGESTATE_H
  6. #define INCLUDED_IMF_DEEPIMAGESTATE_H
  7. //-----------------------------------------------------------------------------
  8. //
  9. // enum DeepImageState -- describes how orderly the pixel data
  10. // in a deep image are
  11. //
  12. // The samples in a deep image pixel may be sorted according to
  13. // depth, and the sample depths or depth ranges may or may not
  14. // overlap each other. A pixel is
  15. //
  16. // - SORTED if for every i and j with i < j
  17. //
  18. // (Z[i] < Z[j]) || (Z[i] == Z[j] && ZBack[i] < ZBack[j]),
  19. //
  20. // - NON_OVERLAPPING if for every i and j with i != j
  21. //
  22. // (Z[i] < Z[j] && ZBack[i] <= Z[j]) ||
  23. // (Z[j] < Z[i] && ZBack[j] <= Z[i]) ||
  24. // (Z[i] == Z[j] && ZBack[i] <= Z[i] & ZBack[j] > Z[j]) ||
  25. // (Z[i] == Z[j] && ZBack[j] <= Z[j] & ZBack[i] > Z[i]),
  26. //
  27. // - TIDY if it is SORTED and NON_OVERLAPPING,
  28. //
  29. // - MESSY if it is neither SORTED nor NON_OVERLAPPING.
  30. //
  31. // A deep image is
  32. //
  33. // - MESSY if at least one of its pixels is MESSY,
  34. // - SORTED if all of its pixels are SORTED,
  35. // - NON_OVERLAPPING if all of its pixels are NON_OVERLAPPING,
  36. // - TIDY if all of its pixels are TIDY.
  37. //
  38. // Note: the rather complicated definition of NON_OVERLAPPING prohibits
  39. // overlapping volume samples, coincident point samples and point samples
  40. // in the middle of a volume sample, but it does allow point samples at
  41. // the front or back of a volume sample.
  42. //
  43. //-----------------------------------------------------------------------------
  44. #include "ImfExport.h"
  45. #include "ImfNamespace.h"
  46. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
  47. enum IMF_EXPORT_ENUM DeepImageState : int
  48. {
  49. DIS_MESSY = 0,
  50. DIS_SORTED = 1,
  51. DIS_NON_OVERLAPPING = 2,
  52. DIS_TIDY = 3,
  53. DIS_NUMSTATES // Number of different image states
  54. };
  55. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
  56. #endif