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

Register the segmentation back to the T1 space #100

Open
CCaredda opened this issue Dec 9, 2024 · 4 comments
Open

Register the segmentation back to the T1 space #100

CCaredda opened this issue Dec 9, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@CCaredda
Copy link

CCaredda commented Dec 9, 2024

Hi,

thank you for this great tool! I understood that Brats use preprocessed files (skullstripped and co-registered in the SRI-24 space).
With the pre-processing functions, is there a way to register the segmented volume back to the T1 space?

Thank you,
Best,
Charly

@CCaredda CCaredda added the question Further information is requested label Dec 9, 2024
@neuronflow neuronflow self-assigned this Dec 9, 2024
@neuronflow neuronflow transferred this issue from BrainLesion/BraTS Dec 9, 2024
@neuronflow
Copy link
Collaborator

Hi Charly @CCaredda,
I transferred your question to the preprocessing repository. Assuming you are actually using this repo to preprocess your files?

Your answer depends on how you preprocess your files.

@CCaredda
Copy link
Author

Hi,
Thank you for your answer.
This is exact, I use this repo to pre-process my files (PreProcessor class), see a portion of the code below:

` # define modalities
center = Modality(
modality_name="t1",
input_path=t1,
raw_bet_output_path=output_dir + "t1_bet.nii.gz",
atlas_correction=True,
normalizer=percentile_normalizer,
)

moving_modalities = [
    Modality(
        modality_name="flair",
        input_path=flair,
        raw_bet_output_path=output_dir + "fla_bet.nii.gz",
        atlas_correction=True,
        normalizer=percentile_normalizer,
    ),
]


preprocessor = Preprocessor(
    center_modality=center,
    moving_modalities=moving_modalities,
    registrator=ANTsRegistrator(),
    brain_extractor=HDBetExtractor(),
    temp_folder="temporary_directory",
    limit_cuda_visible_devices="0",
)
preprocessor.run()`

Best,

@neuronflow
Copy link
Collaborator

Hi Charlie,

Currently, we don't have a built-in method to warp back to native space.

This method allows you to save the intermediate computation steps and registration matrixes https://brainles-preprocessing.readthedocs.io/en/latest/brainles-preprocessing.html#brainles_preprocessing.preprocessor.Preprocessor.run

Depending on your registration framework, in your case, ANTs, one can now use the inverse of these steps to warp back to native space.

It would be nice to have such a method in the future. Ideally, we solve this one first, as this would boil it down to running a single transform:
#92

@CCaredda
Copy link
Author

Thank you, I will take a look at this and let you know.
Best,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants