Configuration Options (pydicom.config
)¶
pydicom configuration options
- class pydicom.config.Settings[source]¶
Collection of several configuration values. Accessed via the singleton
settings
.Added in version 2.3.
- property buffered_read_size: int¶
Get or set the chunk size when reading from buffered
DataElement
values.- Parameters:
size (int) – The chunk size to use, must be greater than 0 (default 8192).
- property infer_sq_for_un_vr: bool¶
If
True
, and the VR of a known data element is encoded as UN in an explicit encoding for an undefined length data element, the VR is changed to SQ per PS 3.5, section 6.2.2. Can be set toFalse
where the content of the tag shown as UN is not DICOM conformant and would lead to a failure if accessing it.
- property reading_validation_mode: int¶
Defines behavior of validation while reading values, compared with the DICOM standard, e.g. that DS strings are not longer than 16 characters and contain only allowed characters.
- property writing_validation_mode: int¶
Defines behavior for value validation while writing a value. See
Settings.reading_validation_mode
.
The global configuration object of type |
|
Set to |
|
If invalid VR encountered, assume file switched to implicit VR |
|
Convert a field VR to "UN" and return bytes if bytes length is invalid. |
|
Set to a callable function to be called from |
|
Set the keyword arguments passed to |
|
Set to |
|
|
Turn on/off debugging of DICOM file reading and writing. |
Deprecated. |
|
|
Imitate the behavior for the next major version of pydicom. |
Handlers for converting (7FE0,0010) Pixel Data. |
|
Reset the |
|
If |
|
|
Set DS class to be derived from |
|
Set whether multi-valued elements with VR of DS will be numpy arrays |
Set using |
|
Set to False to avoid IS values being returned as numpy ndarray objects. |
|
Set using the function |
|
Use the information within JPEG 2000 data to correct the returned pixel data |
|
Control the behavior when invalid keys are used with |
|
Control the behavior when setting a |
|
If one of the validation modes is set to this value, no value validation will be performed. |
|
If one of the validation modes is set to this value, a warning is issued if a value validation error occurs. |
|
If one of the validation modes is set to this value, an exception is raised if a value validation error occurs. |