gdcm::ImageWriter Class Reference

ImageWriter. More...

`#include <gdcmImageWriter.h>`

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

## Public Member Functions

| ImageWriter ()
| ~ImageWriter () override
MediaStorage | ComputeTargetMediaStorage ()
const Image & | GetImage () const override
Image & | GetImage () override
bool | Write () override
| Write.
Public Member Functions inherited from gdcm::PixmapWriter
| PixmapWriter ()
| ~PixmapWriter () override
Pixmap & | GetPixmap ()
const Pixmap & | GetPixmap () const
virtual void | SetImage (Pixmap const &img)
void | SetPixmap (Pixmap const &img)
bool | Write () override
| Write.
Public Member Functions inherited from gdcm::Writer
| Writer ()
virtual | ~Writer ()
void | CheckFileMetaInformationOff ()
void | CheckFileMetaInformationOn ()
File & | GetFile ()
void | SetCheckFileMetaInformation (bool b)
| Undocumented function, do not use (= leave default).
void | SetFile (const File &f)
| Set/Get the DICOM file (DataSet + Header).
void | SetFileName (const char *filename_native)
| Set the filename of DICOM file to write:
void | SetStream (std::ostream &output_stream)
| Set user ostream buffer.

## Additional Inherited Members

Protected Member Functions inherited from gdcm::PixmapWriter
void | DoIconImage (DataSet &ds, Pixmap const &image)
bool | PrepareWrite (MediaStorage const &refms)
Protected Member Functions inherited from gdcm::Writer
bool | GetCheckFileMetaInformation () const
std::ostream * | GetStreamPtr () const
void | SetWriteDataSetOnly (bool b)
Protected Attributes inherited from gdcm::PixmapWriter
SmartPointer< Pixmap > | PixelData
Protected Attributes inherited from gdcm::Writer
std::ofstream * | Ofstream
std::ostream * | Stream

## Detailed Description

ImageWriter.

This is an extended version of the PixmapWriter. Pay attention that:

1. It will populate missing attribute for Secondary Capture Image Storage instances,
2. It may also change an input MR Image Storage instance into a pseudo Enhanced MR Image Storage instance whenever Modality LUT is required.
3. Some DataElement related to gdcm::Image may be slightly altered.

Examples
  BasicImageAnonymizer.cs, CompressImage.cxx, CompressLossyJPEG.cs, CreateARGBImage.cxx, CreateCMYKImage.cxx, DecompressImage.cs, GenFakeImage.cxx, GetSubSequenceData.cxx, HelloVizWorld.cxx, MergeTwoFiles.cxx, MpegVideoInfo.cs, TemplateEmptyImage.cxx, csa2img.cxx, and iU22tomultisc.cxx.

## Constructor & Destructor Documentation

## ImageWriter()

gdcm::ImageWriter::ImageWriter | ( |  | ) |

## ~ImageWriter()

gdcm::ImageWriter::~ImageWriter | ( |  | ) |

override

## Member Function Documentation

## ComputeTargetMediaStorage()

MediaStorage gdcm::ImageWriter::ComputeTargetMediaStorage | ( |  | ) |

internal function used to compute a target MediaStorage the most appropriate User may want to call this function ahead of time (before Write)

Examples
  TemplateEmptyImage.cxx.

## GetImage() [1/2]

const Image & gdcm::ImageWriter::GetImage | ( |  | ) | const

inline override virtual

Set/Get Image to be written It will overwrite anything Image infos found in DataSet (see parent class to see how to pass dataset)

Reimplemented from gdcm::PixmapWriter.

Examples
  CreateARGBImage.cxx, CreateCMYKImage.cxx, csa2img.cxx, and iU22tomultisc.cxx.

## GetImage() [2/2]

Image & gdcm::ImageWriter::GetImage | ( |  | ) |

inline override virtual

Reimplemented from gdcm::PixmapWriter.

## Write()

bool gdcm::ImageWriter::Write | ( |  | ) |

override virtual

Write.

Reimplemented from gdcm::Writer.

Examples
  BasicImageAnonymizer.cs, CompressImage.cxx, CompressLossyJPEG.cs, CreateARGBImage.cxx, CreateCMYKImage.cxx, DecompressImage.cs, GenFakeImage.cxx, GetSubSequenceData.cxx, HelloVizWorld.cxx, MergeTwoFiles.cxx, MpegVideoInfo.cs, TemplateEmptyImage.cxx, csa2img.cxx, and iU22tomultisc.cxx.

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

- gdcmImageWriter.h