*/
+/** @file src/xyz_frame.cc
+ * @brief XZYFrame class.
+ */
+
#include "xyz_frame.h"
-#include <cassert>
+#include "dcp_assert.h"
#include <stdexcept>
using namespace dcp;
XYZFrame::XYZFrame (opj_image_t* image)
: _opj_image (image)
{
- assert (_opj_image->numcomps == 3);
+ DCP_ASSERT (_opj_image->numcomps == 3);
}
+/** Construct a new XYZFrame with undefined contents.
+ * @param size Size for the frame in pixels.
+ */
XYZFrame::XYZFrame (Size size)
{
opj_image_cmptparm_t cmptparm[3];
_opj_image->y1 = size.height;
}
+/** XYZFrame destructor */
XYZFrame::~XYZFrame ()
{
opj_image_destroy (_opj_image);
}
+/** @param c Component index (0, 1 or 2)
+ * @return Pointer to the data for component c; 12-bit values from 0-4095.
+ */
int *
XYZFrame::data (int c) const
{
- assert (c >= 0 && c < 3);
+ DCP_ASSERT (c >= 0 && c < 3);
return _opj_image->comps[c].data;
}
+/** @return Size of the image in pixels */
dcp::Size
XYZFrame::size () const
{