1 /*
2  *
3  *  Copyright (C) 1997-2011, OFFIS e.V.
4  *  All rights reserved.  See COPYRIGHT file for details.
5  *
6  *  This software and supporting documentation were developed by
7  *
8  *    OFFIS e.V.
9  *    R&D Division Health
10  *    Escherweg 2
11  *    D-26121 Oldenburg, Germany
12  *
13  *
14  *  Module:  dcmjpeg
15  *
16  *  Author:  Norbert Olges, Marco Eichelberg
17  *
18  *  Purpose: representation parameter for lossless JPEG
19  *
20  */
21 
22 #ifndef DJRPLOL_H
23 #define DJRPLOL_H
24 
25 #include "dcmtk/config/osconfig.h"
26 #include "dcmtk/dcmdata/dcpixel.h" /* for class DcmRepresentationParameter */
27 #include "dcmtk/dcmjpeg/djdefine.h"
28 
29 /** representation parameter for lossless JPEG
30  */
31 class DCMTK_DCMJPEG_EXPORT DJ_RPLossless : public DcmRepresentationParameter
32 {
33 public:
34 
35   /** constructor
36    *  @param aPrediction prediction value
37    *  @param aPt point transform value
38    */
39   DJ_RPLossless(int aPrediction=1, int aPt=0);
40 
41   /// copy constructor
42   DJ_RPLossless(const DJ_RPLossless& arg);
43 
44   /// destructor
45   virtual ~DJ_RPLossless();
46 
47   /** this methods creates a copy of type DcmRepresentationParameter *
48    *  it must be overweritten in every subclass.
49    *  @return copy of this object
50    */
51   virtual DcmRepresentationParameter *clone() const;
52 
53   /** returns the class name as string.
54    *  can be used in operator== as poor man's RTTI replacement.
55    */
56   virtual const char *className() const;
57 
58   /** compares an object to another DcmRepresentationParameter.
59    *  Implementation must make sure that classes are comparable.
60    *  @param arg representation parameter to compare with
61    *  @return true if equal, false otherwise.
62    */
63   virtual OFBool operator==(const DcmRepresentationParameter &arg) const;
64 
65   /** returns the prediction value
66    *  @return prediction value
67    */
getPrediction()68   int getPrediction() const
69   {
70     return prediction;
71   }
72 
73   /** returns the point transform
74    *  @return point transform
75    */
getPointTransformation()76   int getPointTransformation() const
77   {
78     return pt;
79   }
80 
81 private:
82 
83   /// prediction value
84   int prediction;
85 
86   /// point transform value
87   int pt;
88 };
89 
90 #endif
91