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

first try failed. #3

Open
devhliu opened this issue Mar 16, 2024 · 3 comments
Open

first try failed. #3

devhliu opened this issue Mar 16, 2024 · 3 comments

Comments

@devhliu
Copy link

devhliu commented Mar 16, 2024

t1w
This is my first try.... it seems the regularization is still a big issue....

@marcniethammer
Copy link
Contributor

Looks like this is a multi-modal test case. Can you run a case without instance optimization? If this works then it is possible that switching the similarity measure from 1-LNCC to 1-LNCC^2 for instance optimization could fix the issue.

@HastingsGreer
Copy link
Contributor

Hi! As much as I bragged about getting spacing and orientation correct, it looks like I messed it up somewhere. Could you post the output of this program for the fixed and moving images?

import argparse
parser = argparse.ArgumentParser(description='info of a volume')
parser.add_argument('-w', action='store_true')
parser.add_argument('volumes', metavar='Volume', nargs='+',
                   help='volumes to investigate')
import SimpleITK as sitk
args = parser.parse_args()
for v in args.volumes:
    reader = sitk.ImageFileReader()

    reader.SetFileName(v)
    
    
    reader.LoadPrivateTagsOn()

    reader.ReadImageInformation()
    print("=" * 30)
    print(v)
    if(args.w):
        for k in reader.GetMetaDataKeys():
            v = reader.GetMetaData(k)
            print("({0}) = = \"{1}\"".format(k, v))

    print("Image Size: {0}".format(reader.GetSize()))
    print("Image PixelType: {0}"
          .format(sitk.GetPixelIDValueAsString(reader.GetPixelID())))
    print("Image Spacing: {0}".format(reader.GetSpacing()))
    

@HastingsGreer
Copy link
Contributor

Our approach handles differences in spacing well, but not yet differences in axis orientation. The current best workaround when images have different axis orientations ( itk.Image.GetDirection() ) is to resample one image to the coordinate system of the other before registering. We hope to automate this process soon, but for now it can be handled with a call to unigradicon-warp to resample the image before calling unigradicon-register.

I've documented the issue and the fix in this notebook:

https://colab.research.google.com/drive/1CmbTUneDRAlOkjUjcOm8f9ebSOarZhT3?usp=sharing

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

3 participants