Hi,
i noticed that when opening an .ISQ file and then writing it as an .ISQ file, parts of the metadata seem to get deleted, or changed.
It seems to be affecting the CalibrationData, CreationDate, ModificationDate, MuScaling, MuWater, RescaleIntercept, RescaleSlope, RescaleType and RescaleUnits.
Here is an example of the code:
import itk
image=itk.imread('original_file.ISQ')
print(dict(image))
itk.imwrite(image,'saved_file.ISQ')
image_saved=itk.imread('saved_file.ISQ')
print(dict(image_saved))
Output for the original file:
{'CalibrationData': '60 kVp, BH: 200 mg HA/ccm, Scaling 8192', 'CreationDate': '14-JUN-2021 13:27:50.972', 'DataRange': (-5135.0, 11000.0), 'Energy': 59.4, 'Intensity': 0.9, 'MeasurementIndex': 24945, 'ModificationDate': '14-JUN-2021 13:27:50.972', 'MuScaling': 8192.0, 'MuWater': 0.2402999997138977, 'NumberOfProjections': 750, 'NumberOfSamples': 1536, 'PatientIndex': 3453, 'PatientName': 'Anonymous', 'ReconstructionAlg': 3, 'ReferenceLine': 0.0, 'RescaleIntercept': -1000.0, 'RescaleSlope': 0.5079913135469725, 'RescaleType': 2, 'RescaleUnits': 'mg HA/ccm', 'SampleTime': 100.0, 'ScanDistance': 125.952, 'ScannerID': 3333, 'ScannerType': 9, 'Site': 39, 'SliceIncrement': 0.08199999999999999, 'SliceThickness': 0.08199999999999999, 'Version': 'CTDATA-HEADER_V1', 'origin': array([0., 0., 0.]), 'spacing': array([0.082, 0.082, 0.082]), 'direction': array([[1., 0., 0.],
[0., 1., 0.],
[0., 0., 1.]])}
Output for the written file:
{'CalibrationData':` '', 'CreationDate': '6-DEC-1911 13:07:54.671', 'DataRange': (-5135.0, 11000.0), 'Energy': 59.4, 'Intensity': 0.9, 'MeasurementIndex': 24945, 'ModificationDate': '6-DEC-1911 13:07:54.671', 'MuScaling': 1.0, 'MuWater': 0.7032999992370605, 'NumberOfProjections': 750, 'NumberOfSamples': 1536, 'PatientIndex': 3453, 'PatientName': 'Anonymous', 'ReconstructionAlg': 3, 'ReferenceLine': 0.0, 'RescaleIntercept': 0.0, 'RescaleSlope': 1.0, 'RescaleType': 0, 'RescaleUnits': '', 'SampleTime': 100.0, 'ScanDistance': 125.952, 'ScannerID': 3333, 'ScannerType': 9, 'Site': 39, 'SliceIncrement': 0.08199999999999999, 'SliceThickness': 0.08199999999999999, 'Version': 'CTDATA-HEADER_V1', 'origin': array([0., 0., 0.]), 'spacing': array([0.082, 0.082, 0.082]), 'direction': array([[1., 0., 0.],
[0., 1., 0.],
[0., 0., 1.]])}
Is there maybe a solution for this?
Thanks for any help in advance and thanks for providing this tool!