# gdcm::ImageChangeTransferSyntax Class Reference

ImageChangeTransferSyntax class Class to change the transfer syntax of an input DICOM. More...

`#include <gdcmImageChangeTransferSyntax.h>`

Inheritance diagram for gdcm::ImageChangeTransferSyntax:
[legend]
Collaboration diagram for gdcm::ImageChangeTransferSyntax:
[legend]

List of all members.

## Public Member Functions

| ImageChangeTransferSyntax ()
| ~ImageChangeTransferSyntax ()
bool | Change ()
| Change.
const TransferSyntax & | GetTransferSyntax () const
| Get Transfer Syntax.
void | SetCompressIconImage (bool b)
void | SetForce (bool f)
void | SetTransferSyntax (const TransferSyntax &ts)
| Set target Transfer Syntax.
void | SetUserCodec (ImageCodec *ic)

## Protected Member Functions

bool | TryJPEG2000Codec (const DataElement &pixelde, Bitmap const &input, Bitmap &output)
bool | TryJPEGCodec (const DataElement &pixelde, Bitmap const &input, Bitmap &output)
bool | TryJPEGLSCodec (const DataElement &pixelde, Bitmap const &input, Bitmap &output)
bool | TryRAWCodec (const DataElement &pixelde, Bitmap const &input, Bitmap &output)
bool | TryRLECodec (const DataElement &pixelde, Bitmap const &input, Bitmap &output)

## Detailed Description

ImageChangeTransferSyntax class Class to change the transfer syntax of an input DICOM.

If only Force param is set but no input TransferSyntax is set, it is assumed that user only wants to inspect encapsulated stream (advanced dev. option).

When using UserCodec it is very important that the TransferSyntax (as set in SetTransferSyntax) is actually understood by UserCodec (ie. UserCodec->CanCode( TransferSyntax ) ). Otherwise the behavior is to use a default codec.

See also:
  JPEGCodec JPEGLSCodec JPEG2000Codec

Examples:

  CompressImage.cxx.

## Constructor & Destructor Documentation

gdcm::ImageChangeTransferSyntax::ImageChangeTransferSyntax | ( |  | ) | `[inline]`

gdcm::ImageChangeTransferSyntax::~ImageChangeTransferSyntax | ( |  | ) | `[inline]`

## Member Function Documentation

bool gdcm::ImageChangeTransferSyntax::Change | ( |  | ) |

Change.

Examples:
  CompressImage.cxx.

const TransferSyntax& gdcm::ImageChangeTransferSyntax::GetTransferSyntax | ( |  | ) | const`[inline]`

Get Transfer Syntax.

void gdcm::ImageChangeTransferSyntax::SetCompressIconImage | ( | bool | b | ) | `[inline]`

Decide whether or not to also compress the Icon Image using the same Transfer Syntax Default is to simply decompress icon image

void gdcm::ImageChangeTransferSyntax::SetForce | ( | bool | f | ) | `[inline]`

When target Transfer Syntax is identical to input target syntax, no operation is actually done This is an issue when someone wants to recompress using GDCM internal implementation a JPEG (for example) image

void gdcm::ImageChangeTransferSyntax::SetTransferSyntax | ( | const TransferSyntax & | ts | ) | `[inline]`

Set target Transfer Syntax.

Examples:
  CompressImage.cxx.

void gdcm::ImageChangeTransferSyntax::SetUserCodec | ( | ImageCodec * | ic | ) | `[inline]`

Allow user to specify exactly which codec to use. this is needed to specify special qualities or compression option.

Warning:
  is the codec 'ic' is not compatible with the TransferSyntax requested, it will not be used. It is the user responsability to check that UserCodec->CanCode( TransferSyntax )

bool gdcm::ImageChangeTransferSyntax::TryJPEG2000Codec | ( | const DataElement & | pixelde,
|  | Bitmap const & | input,
|  | Bitmap & | output
| ) |  | `[protected]`

bool gdcm::ImageChangeTransferSyntax::TryJPEGCodec | ( | const DataElement & | pixelde,
|  | Bitmap const & | input,
|  | Bitmap & | output
| ) |  | `[protected]`

bool gdcm::ImageChangeTransferSyntax::TryJPEGLSCodec | ( | const DataElement & | pixelde,
|  | Bitmap const & | input,
|  | Bitmap & | output
| ) |  | `[protected]`

bool gdcm::ImageChangeTransferSyntax::TryRAWCodec | ( | const DataElement & | pixelde,
|  | Bitmap const & | input,
|  | Bitmap & | output
| ) |  | `[protected]`

bool gdcm::ImageChangeTransferSyntax::TryRLECodec | ( | const DataElement & | pixelde,
|  | Bitmap const & | input,
|  | Bitmap & | output
| ) |  | `[protected]`

The documentation for this class was generated from the following file:

- gdcmImageChangeTransferSyntax.h