Arithmetic about apply regularization transform

image
I am developing an independent software for my clients.

I need this function to correct the data.

The tilt value can be found in Tag,

but how to make changes to the data,

I searched the source code,

but I can’t find the implementation entry for this.

Can anyone help me? Thank you !

I searched the source code,

If you search for the words Regularization and regularization, you should be able to identify the relevant files.

Let us know if you sill have issues.


Here is the result ,it seems that there is no what I want.

The description and the corresponding source code are here:

1 Like

Thank you very much ! :+1:

To complete my previous answer, doing a case-insensitive search returns the following:

$ rg -i regularization

[...]

Docs/user_guide/modules/dicom.md
186:        - Acquisition geometry regularization option supports the creation of a nonlinear transform that corrects for things like missing slices or gantry tilt in the acquisition.  See more information [here](https://github.com/Slicer/Slicer/commit/3328b81211cb2e9ae16a0b49097744171c8c71c0)
243:Scanners may create image volumes with varying image slice spacing. Slicer can represent such images in the scene by apply a non-linear transform. To enable this feature, go to menu: Edit / Application settings / DICOM and set *Acquisition geometry regularization* to *apply regularization transform*. Slice view, segmentation, and many other features work directly on non-linearly transformed volumes. For some other features, such as volume rendering, you need to harden the transform on the volume: go to Data module, in the row of the volume node, right-click on the transform column, and choose *Harden transform*.

Modules/Scripted/DICOMLib/DICOMUtils.py
665:    # Get acquisition geometry regularization setting value
667:    acquisitionGeometryRegularizationEnabled = (settings.value("DICOM/ScalarVolume/AcquisitionGeometryRegularization", "default") != "none")
688:                if acquisitionGeometryRegularizationEnabled:
691:                    warningText += ("  If loaded image appears distorted, enable 'Acquisition geometry regularization'"

Modules/Scripted/DICOMPlugins/DICOMScalarVolumePlugin.py
88:                                          " If no regularization is applied then image may appear distorted if it was acquired with irregular geometry.")
90:        importFormatsComboBox.addItem(_("default (apply regularization transform)"), "default")
92:        importFormatsComboBox.addItem(_("apply regularization transform"), "transform")
96:        formLayout.addRow(_("Acquisition geometry regularization:"), importFormatsComboBox)
98:            "DICOM/ScalarVolume/AcquisitionGeometryRegularization", importFormatsComboBox,
137:    def acquisitionGeometryRegularizationEnabled(self):
139:        return (settings.value("DICOM/ScalarVolume/AcquisitionGeometryRegularization", "default") != "none")
542:                                                                addAcquisitionTransformIfNeeded=self.acquisitionGeometryRegularizationEnabled())
850:                    logging.warning(warningText + "  Regularization transform is not added, as the option is disabled.")

[...]
2 Likes