def get_dicom_info_from_description(dicom_object, return_extra=False, sop_class_name='UNKNOWN'):
    '\n    Attempts to return some information from a DICOM\n    This is typically used for naming converted NIFTI files\n\n    Args:\n        dicom_object (pydicom.dataset.FileDataset): The DICOM object\n        return_extra (bool, optional): return information that is usually not required\n\n    Returns:\n        info (str): Some extracted information\n    '
    try:
        dicom_sop_class_name = dicom_object.SOPClassUID.name
    except AttributeError:
        logger.warning(f'Could not find DICOM SOP Class UID, using {sop_class_name}.')
        dicom_sop_class_name = sop_class_name
    if ('Image' in dicom_sop_class_name):
        image_modality = dicom_object.Modality
        logger.info(f'    Image modality: {image_modality}')
        if (image_modality == 'CT'):
            if return_extra:
                try:
                    protocol_name = dicom_object.ProtocolName
                    if (protocol_name != ''):
                        return re.sub('[^\\w]', '_', protocol_name).upper()
                except AttributeError:
                    logger.warning('    Could not find ProtocolName')
            return ''
        elif (image_modality == 'MR'):
            try:
                protocol_name = re.sub('[^\\w]', '_', dicom_object.ProtocolName).upper()
            except AttributeError:
                logger.warning('    Could not find ProtocolName')
                protocol_name = ''
            try:
                sequence_name = re.sub('[^\\w]', '_', dicom_object.SequenceName).upper()
            except AttributeError:
                logger.warning('    Could not find SequenceName')
                sequence_name = ''
            try:
                series_description = re.sub('[^\\w]', '_', dicom_object.SeriesDescription).upper()
            except AttributeError:
                logger.warning('    Could not find SequenceName')
                series_description = ''
            combined_name = '_'.join([protocol_name, sequence_name, series_description])
            while ('__' in combined_name):
                combined_name = combined_name.replace('__', '_')
            if ((protocol_name != '') and (not return_extra)):
                return protocol_name
            else:
                return combined_name
        elif (image_modality == 'PT'):
            try:
                corrections = dicom_object.CorrectedImage
            except AttributeError:
                corrections = 'NONE'
            if ('ATTN' in corrections):
                return 'AC'
            else:
                return 'NAC'
Attempts to return some information from a DICOM
This is typically used for naming converted NIFTI files

Args:
    dicom_object (pydicom.dataset.FileDataset): The DICOM object
    return_extra (bool, optional): return information that is usually not required

Returns:
    info (str): Some extracted information
def get_dicom_info_from_description(dicom_object, return_extra=False, sop_class_name='UNKNOWN'):
    '\n    Attempts to return some information from a DICOM\n    This is typically used for naming converted NIFTI files\n\n    Args:\n        dicom_object (pydicom.dataset.FileDataset): The DICOM object\n        return_extra (bool, optional): return information that is usually not required\n\n    Returns:\n        info (str): Some extracted information\n    '
    try:
        dicom_sop_class_name = dicom_object.SOPClassUID.name
    except AttributeError:
        logger.warning(f'Could not find DICOM SOP Class UID, using {sop_class_name}.')
        dicom_sop_class_name = sop_class_name
    if ('Image' in dicom_sop_class_name):
        image_modality = dicom_object.Modality
        logger.info(f'    Image modality: {image_modality}')
        if (image_modality == 'CT'):
            if return_extra:
                try:
                    protocol_name = dicom_object.ProtocolName
                    if (protocol_name != ):
                        return re.sub('[^\\w]', '_', protocol_name).upper()
                except AttributeError:
                    logger.warning('    Could not find ProtocolName')
            return 
        elif (image_modality == 'MR'):
            try:
                protocol_name = re.sub('[^\\w]', '_', dicom_object.ProtocolName).upper()
            except AttributeError:
                logger.warning('    Could not find ProtocolName')
                protocol_name = 
            try:
                sequence_name = re.sub('[^\\w]', '_', dicom_object.SequenceName).upper()
            except AttributeError:
                logger.warning('    Could not find SequenceName')
                sequence_name = 
            try:
                series_description = re.sub('[^\\w]', '_', dicom_object.SeriesDescription).upper()
            except AttributeError:
                logger.warning('    Could not find SequenceName')
                series_description = 
            combined_name = '_'.join([protocol_name, sequence_name, series_description])
            while ('__' in combined_name):
                combined_name = combined_name.replace('__', '_')
            if ((protocol_name != ) and (not return_extra)):
                return protocol_name
            else:
                return combined_name
        elif (image_modality == 'PT'):
            try:
                corrections = dicom_object.CorrectedImage
            except AttributeError:
                corrections = 'NONE'
            if ('ATTN' in corrections):
                return 'AC'
            else:
                return 'NAC'