Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve how ukat performs MDR on T1 data with a temporal slice spacing. #233

Open
alexdaniel654 opened this issue Jan 14, 2025 · 0 comments
Labels
type:enhancement 🛠️ Improvements to existing features type:maintenance 🔌
Milestone

Comments

@alexdaniel654
Copy link
Member

For M2D data, mdreg can take a list of dictionaries so each slice can be fit to a different model. In our case, we would want different TI for each slice if tss != 0.

Something vaguely like

pixel_array, deform, _, _ = mdreg.fit(
                    self.pixel_array,
                    force_2d=True,
                    verbose=1,
                    fit_image = [{
                        'func': _t1_fit, 
                        'inversion_list': np.array(self.inversion_list) + self.tss * slice
                        'affine': self.affine,
                        'tss': self.tss,
                        'tss_axis': self.tss_axis,
                        'mask': self.mask,
                        'parameters': self.parameters,
                        'mag_corr': self.mag_corr,
                        # MOLLI-correction is not relevant for MDR
                        'molli': False,
                        'multithread': self.multithread,
                    } for slice in range(self.shape[-1])],
                    # All default settings but kept here as a template for if
                    # we decide to expose coreg options to ukat users in the
                    # future.
                    fit_coreg={
                        'package': 'elastix',
                        'parallel': False,  # elastix is not parallelizable
                    }
                )
@alexdaniel654 alexdaniel654 added this to the v0.8.0 milestone Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement 🛠️ Improvements to existing features type:maintenance 🔌
Projects
None yet
Development

No branches or pull requests

1 participant