dicomifier.bruker_to_dicom.convert#
- class dicomifier.bruker_to_dicom.convert.ReconstructionContext(path)#
Add reconstruction context to logger.
- filter(record)#
Determine if the specified record is to be logged.
Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.
- dicomifier.bruker_to_dicom.convert.convert_directory(source, dicomdir, multiframe, writer)#
Convert a Bruker directory to DICOM and write the files.
- Parameters:
source – source directory
dicomdir – whether to create a DICOMDIR
multiframe – whether to create multi-frame DICOM objects
writer – writer object from the io module
- dicomifier.bruker_to_dicom.convert.convert_element(bruker_data_set, dicom_data_set, bruker_name, dicom_name, type_, getter, frame_index, generator, vr_finder)#
Convert a Bruker element to a DICOM element.
- Parameters:
bruker_data_set – source Bruker data set
dicom_data_set – destination DICOM data set
bruker_name – Bruker name of the element
dicom_name – DICOM name of the element
type – DICOM type of the element (PS 3.5, 7.4)
getter – function returning the value using the Bruker data set, the generator and the frame index or None (direct access)
frame_index – index in frame group
generator – FrameIndexGenerator associated with the Bruker data set
vr_finder – function returning the DICOM VR from the dicom_name
- dicomifier.bruker_to_dicom.convert.convert_module(bruker_data_set, dicom_data_set, module, frame_index, generator, vr_finder)#
Convert a DICOM module..
- Parameters:
bruker_data_set – source Bruker data set
dicom_data_set – destination DICOM data set
module – sequence of 4-element tuples describing the conversions (Bruker name, DICOM name, DICOM type, getter)
frame_index – index in a frame group
generator – object that will manage the frame_index
vr_finder – function to find the VR knowing only the dicom_name
- dicomifier.bruker_to_dicom.convert.convert_reconstruction(data_set, iod_converter, writer)#
Convert and save a single reconstruction.
- Parameters:
iod_converter – conversion function
writer – writer object from the io module
- dicomifier.bruker_to_dicom.convert.to_2d(data_set)#
Convert the Bruker data set from 3D to 2D.