ImfInputPart.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // Copyright (c) Contributors to the OpenEXR Project.
  4. //
  5. #ifndef IMFINPUTPART_H_
  6. #define IMFINPUTPART_H_
  7. #include "ImfForward.h"
  8. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
  9. //-------------------------------------------------------------------
  10. // class InputPart:
  11. //
  12. // Same interface as InputFile. Please refer to InputFile.
  13. //-------------------------------------------------------------------
  14. class IMF_EXPORT_TYPE InputPart
  15. {
  16. public:
  17. IMF_EXPORT
  18. InputPart(MultiPartInputFile& multiPartFile, int partNumber);
  19. IMF_EXPORT
  20. const char * fileName () const;
  21. IMF_EXPORT
  22. const Header & header () const;
  23. IMF_EXPORT
  24. int version () const;
  25. IMF_EXPORT
  26. void setFrameBuffer (const FrameBuffer &frameBuffer);
  27. IMF_EXPORT
  28. const FrameBuffer & frameBuffer () const;
  29. IMF_EXPORT
  30. bool isComplete () const;
  31. IMF_EXPORT
  32. bool isOptimizationEnabled () const;
  33. IMF_EXPORT
  34. void readPixels (int scanLine1, int scanLine2);
  35. IMF_EXPORT
  36. void readPixels (int scanLine);
  37. IMF_EXPORT
  38. void rawPixelData (int firstScanLine,
  39. const char *&pixelData,
  40. int &pixelDataSize);
  41. IMF_EXPORT
  42. void rawPixelDataToBuffer (int scanLine,
  43. char *pixelData,
  44. int &pixelDataSize) const;
  45. IMF_EXPORT
  46. void rawTileData (int &dx, int &dy,
  47. int &lx, int &ly,
  48. const char *&pixelData,
  49. int &pixelDataSize);
  50. private:
  51. InputFile* file;
  52. // for internal use - give OutputFile and TiledOutputFile access to file for copyPixels
  53. friend class OutputFile;
  54. friend class TiledOutputFile;
  55. };
  56. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
  57. #endif /* IMFINPUTPART_H_ */