pydicom.valuerep.DS¶
- pydicom.valuerep.DS(val: Union[None, str, int, float, decimal.Decimal], auto_format: bool = False, validation_mode: Optional[int] = None) Union[None, str, pydicom.valuerep.DSfloat, pydicom.valuerep.DSdecimal]¶
Factory function for creating DS class instances.
Checks for blank string; if so, returns that, else calls
DSfloatorDSdecimalto create the class instance. This avoids overridingDSfloat.__new__()(which carries a time penalty for large arrays of DS).Similarly the string clean and check can be avoided and
DSfloatcalled directly if a string has already been processed.