GDCM
2.2.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Source
MediaStorageAndFileFormat
gdcmJPEGCodec.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: GDCM (Grassroots DICOM). A DICOM library
4
5
Copyright (c) 2006-2011 Mathieu Malaterre
6
All rights reserved.
7
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notice for more information.
12
13
=========================================================================*/
14
#ifndef GDCMJPEGCODEC_H
15
#define GDCMJPEGCODEC_H
16
17
#include "
gdcmImageCodec.h
"
18
19
namespace
gdcm
20
{
21
22
class
PixelFormat;
23
class
TransferSyntax;
40
class
GDCM_EXPORT
JPEGCodec
:
public
ImageCodec
41
{
42
public
:
43
JPEGCodec
();
44
~
JPEGCodec
();
45
bool
CanDecode(
TransferSyntax
const
&ts)
const
;
46
bool
CanCode(
TransferSyntax
const
&ts)
const
;
47
bool
Decode(
DataElement
const
&is,
DataElement
&os);
48
void
SetPixelFormat(
PixelFormat
const
&pf);
49
51
void
ComputeOffsetTable(
bool
b);
52
54
bool
Code(
DataElement
const
&in,
DataElement
&out);
55
56
virtual
bool
GetHeaderInfo(std::istream &is,
TransferSyntax
&ts);
57
58
//void SetReversible(bool res);
59
60
void
SetQuality(
double
q);
61
double
GetQuality()
const
;
62
63
void
SetLossless(
bool
l);
64
bool
GetLossless()
const
;
65
66
protected
:
67
bool
Decode(std::istream &is, std::ostream &os);
68
bool
IsValid(
PhotometricInterpretation
const
&pi);
69
70
protected
:
71
// Internal method called by SetPixelFormat
72
// Instantiate the right jpeg codec (8, 12 or 16)
73
void
SetBitSample(
int
bit);
74
75
protected
:
76
int
BitSample
;
77
bool
Lossless
;
78
int
Quality
;
79
80
private
:
81
void
SetupJPEGBitCodec(
int
bit);
82
JPEGCodec
*Internal;
83
};
84
85
}
// end namespace gdcm
86
87
#endif //GDCMJPEGCODEC_H
Generated on Wed Jun 13 2012 20:40:37 for GDCM by
1.8.1