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

Is it possible to copy existing rigid registration? #29

Open
mfizyczka opened this issue Apr 25, 2022 · 2 comments
Open

Is it possible to copy existing rigid registration? #29

mfizyczka opened this issue Apr 25, 2022 · 2 comments

Comments

@mfizyczka
Copy link

I would like to use rigid OnlineMatch as a starting point for deformable registration. But I don't want to change OnlineMatch registration itself which would be done if I load it and then run deformable registration. How can I copy this registration?

My current code:

  # select online match registration:
  for r in primaryVolume.getLinkedRegistrations(): 
    if r.getTargetVolume().getVelocityId() == cbctId and 'ONLINEMATCH' in r.getName():
      #  registrationId = r.getVelocityId()
      cbctRegistration = engine.loadRegistration(r.getVelocityId())
      print('\t\tLoading pCT-CBCT ONLINEMATCH.', engine.getErrorMessage())

  # perform deformable registration:
  deformableRegistrationSettings = velocity.DefaultBSplineDeformableRegistrationSettings()
  # PreprocessingFilterMethod: CBCTCorrectionSecondary = 4
  deformableRegistrationSettings.preprocessingMethod = 4
  # Deformable registration Type:
  deformableRegistrationSettings.type = velocity.DeformableMultiPass
  regOps.performBsplineRegistrationDICOM(deformableRegistrationSettings)
  regOps.saveRegistration()
@jakecobb
Copy link
Contributor

Load the registration and then create a new registration, it will start as a copy of the one you loaded.

@mfizyczka
Copy link
Author

Thanks a lot @jakecobb
Is there a way to get a list of loaded objects? Just to make sure that in a long code I'm not copying registration only when I intend to do so?

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

No branches or pull requests

2 participants