DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Private Attributes | List of all members
DcmJsonFormatPretty Class Reference

Subclass for handling JSON formatted output. More...

Inheritance diagram for DcmJsonFormatPretty:

## Public Member Functions
| DcmJsonFormatPretty (const OFBool printMetaInfo=OFTrue)
| DcmJsonFormatPretty constructor. More...
void | printIndention (STD_NAMESPACE ostream &out)
| Indent to the specific level. More...
void | increaseIndention ()
| Increase the indention level.
void | decreaseIndention ()
| Decrease the indention level.
OFString | newline ()
| Print a newline. More...
OFString | space ()
| Print a space. More...
Public Member Functions inherited from DcmJsonFormat
| DcmJsonFormat (const OFBool printMetaInfo)
| Constructor. More...
virtual | ~DcmJsonFormat ()
| Virtual destructor, does nothing.
Indention | indent ()
| Method to return an indention proxy object for increasing, decreasing or printing indention. More...
virtual OFBool | asBulkDataURI (const DcmTagKey &tag, Uint32 len) const
| Check if an attribute should be exported as BulkDataURI. More...
virtual void | getBulkDataDirectory (OFString &directory) const
| return path of bulk data directory More...
virtual void | getBulkDataURIPrefix (OFString &prefix) const
| return the current bulk data URI prefix More...
virtual void | printValuePrefix (STD_NAMESPACE ostream &out)
| Print the Prefix which for JSON Values needed with indention and newlines as in the format Variable given. More...
virtual void | printValueSuffix (STD_NAMESPACE ostream &out)
| Print the Suffix which for JSON Values needed with indention and newlines as in the format Variable given. More...
virtual void | printBulkDataURIPrefix (STD_NAMESPACE ostream &out)
| Print the Prefix which for JSON BulkDataURI needed with indention and newlines as in the format Variable given. More...
virtual void | printInlineBinaryPrefix (STD_NAMESPACE ostream &out)
| Print the Prefix which for JSON InlineBinary needed with indention and newlines as the format specifies. More...
virtual void | printNextArrayElementPrefix (STD_NAMESPACE ostream &out)
| Print the prefix for array elements (except the first one), with indention and newlines as the format specifies. More...
virtual OFBool | getJsonExtensionEnabled () const
| return the flag indicating whether extended JSON number encoding is enabled.
virtual void | setJsonExtensionEnabled (OFBool enabled)
| set the flag indicating whether extended JSON number encoding is enabled. More...
virtual NumStringPolicy | getJsonNumStringPolicy () const
| return the flag defining how IS/DS elements should be converted to JSON.
virtual void | setJsonNumStringPolicy (NumStringPolicy policy)
| set the flag defining how IS/DS elements should be converted to JSON. More...
virtual void | setMinBulkSize (ssize_t min_bulk_size)
| set the minimum size of binary attributes stored as bulk data. More...
virtual void | setBulkURIPrefix (const char *bulk_uri_prefix)
| set the prefix for URIs generated for bulk data More...
virtual void | setBulkDir (const char *bulk_dir)
| set the directory to which bulk data files should be written More...
virtual OFCondition | writeBulkData (STD_NAMESPACE ostream &out, const DcmTagKey &tagkey, Uint32 len, Uint8 *byteValues, const char *extension=".bin")
| write an attribute as BulkDataURI. More...
virtual OFCondition | writeBinaryAttribute (STD_NAMESPACE ostream &out, const DcmTagKey &tagkey, Uint32 len, Uint8 *byteValues, const char *extension=".bin")
| write a binary attribute either as InlineBinary or as BulkDataURI. More...

## Private Attributes
unsigned | m_IndentionLevel
| Variable for the indention level of DcmJsonFormat.

## Additional Inherited Members
Public Types inherited from DcmJsonFormat
enum | NumStringPolicy { NSP_auto , NSP_always_number , NSP_always_string }
| an enumeration defining how to convert IS/DS elements to JSON More...
Static Public Member Functions inherited from DcmJsonFormat
static void | escapeControlCharacters (STD_NAMESPACE ostream &out, OFString const &value)
| Escapes all forbidden control characters in JSON. More...
static void | normalizeDecimalString (OFString &value)
| Normalize Decimal String to specific JSON format. More...
static void | normalizeIntegerString (OFString &value)
| Normalize Integer String to specific JSON format. More...
static void | printString (STD_NAMESPACE ostream &out, const OFString &value)
| Prints either null if empty or the string value (with all illegal characters escaped). More...
static void | printValueString (STD_NAMESPACE ostream &out, const OFString &value)
| Prints either null if empty or a quoted string (with leading and ending quotation marks and all illegal characters escaped). More...
static void | printNumberInteger (STD_NAMESPACE ostream &out, OFString &value)
| Print either null if empty or a Number as normalized IntegerString. More...
static void | printNumberDecimal (STD_NAMESPACE ostream &out, OFString &value)
| Print either null if empty or a Number as normalized IntegerDecimal. More...
Public Attributes inherited from DcmJsonFormat
const OFBool | printMetaheaderInformation
| Option that defines if metaheader information should be printed.

## Detailed Description

Subclass for handling JSON formatted output.

Standard class for formatted output.

## Constructor & Destructor Documentation

## ◆ DcmJsonFormatPretty()

DcmJsonFormatPretty::DcmJsonFormatPretty | ( | const OFBool | printMetaInfo = `OFTrue` | ) |
| explicit

DcmJsonFormatPretty constructor.

Parameters

  printMetaInfo | Enable/Disable including Metaheader in the output

## Member Function Documentation

## ◆ newline()

OFString DcmJsonFormatPretty::newline | ( |  | ) |
| virtual

Print a newline.

Returns
  a newline

Implements DcmJsonFormat.

## ◆ printIndention()

void DcmJsonFormatPretty::printIndention | ( | STD_NAMESPACE ostream & | out | ) |
| virtual

Indent to the specific level.

Parameters

  out | output stream to which the indention is written.

Implements DcmJsonFormat.

## ◆ space()

OFString DcmJsonFormatPretty::space | ( |  | ) |
| virtual

Print a space.

Returns
  a space

Implements DcmJsonFormat.

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

- dcmdata/include/dcmtk/dcmdata/dcjson.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1