5#include "slideio/imagetools/encodeparameters.hpp"
14 enum ConverterEncoding {
27 bool isValid()
const {
return x >= 0 && y >= 0 && width > 0 && height > 0; }
30 class ConverterParameters
33 ConverterParameters() : m_format(ImageFormat::Unknown), m_zSlice(0), m_tFrame(0) {
36 ImageFormat getFormat()
const {
39 Rectangle& getRect() {
42 void setRect(
const Rectangle& rect) {
45 int32_t getZSlice()
const {
48 void setZSlice(int32_t zSlice) {
51 int32_t getTFrame()
const {
54 void setTFrame(int32_t tFrame) {
64 class SVSConverterParameters :
public ConverterParameters
67 SVSConverterParameters() : m_tileWidth(256),
71 m_format = ImageFormat::SVS;
75 return m_tileEncoding;
77 int getTileWidth()
const {
80 void setTileWidth(
int tileWidth) {
81 m_tileWidth = tileWidth;
83 int getTileHeight()
const {
86 void setTileHeight(
int tileHeight) {
87 m_tileHeight = tileHeight;
89 int getNumZoomLevels()
const {
90 return m_numZoomLevels;
92 void setNumZoomLevels(
int numZoomLevels) {
93 m_numZoomLevels = numZoomLevels;
95 virtual EncodeParameters& getEncodeParameters() = 0;
96 virtual const EncodeParameters& getEncodeParameters()
const = 0;
104 class SVSJpegConverterParameters :
public SVSConverterParameters,
105 public JpegEncodeParameters
108 SVSJpegConverterParameters(){
111 EncodeParameters& getEncodeParameters()
override {
112 return static_cast<JpegEncodeParameters&
>(*this);
114 const EncodeParameters& getEncodeParameters()
const override {
115 return static_cast<const JpegEncodeParameters&
>(*this);
119 class SVSJp2KConverterParameters :
public SVSConverterParameters,
120 public JP2KEncodeParameters
123 SVSJp2KConverterParameters() {
126 EncodeParameters& getEncodeParameters()
override {
127 return static_cast<JP2KEncodeParameters&
>(*this);
129 const EncodeParameters& getEncodeParameters()
const override {
130 return static_cast<const JP2KEncodeParameters&
>(*this);
Definition: exceptions.hpp:12
Compression
raster data compression enum
Definition: slideio_enums.hpp:12
@ Jpeg2000
JPEG 2000 compression.