Hello ANTs experts, I have a linear transformation file (translation + rotation) in Dicom format (Modality tagged as REG in header) and I want to either convert this to any of mat/tfm/nifti/nrrd/mha etc. format or directly apply it to an image using antsApplyTransforms. I tried the latter but didn't work. I also tried to conver it using ITK Dicom to nifti code but it doesn't seem to be designed for a REG transformation as it only supports GDCMImageIO. Is this possible somehow? Thanks, Seth
Thanks. One last question: In the docs, I see ANTs uses ITK histogram matching filter "itk::HistogramMatchingImageFilter". Is ThresholdAtMeanIntensityOn() switched on by default?
Hi Nick, I looked at the algorithm used for Histogram matching and I have a question: Does it make sense to use HistogramMatching when doing a multi-modality registration like MR-CT registration or they should be at least the same modality with probably different intensity distribution? e.g. Contrast and non-contrast CT. Because I guess MR and CT have different intensity distribution and try matching some points in their histogram of the entire image maybe doesn't do anything useful? I'm not sure...
Great! Thanks Nick. One final thing, is there any ANTs paper that mentions this issue?
Thanks, Nick. I used Mattes mutual information metric actually, because that was less sensitive to different parameters and I got much better registration results. It is also faster than CC. Does Mattes require rescaling?
Btw, I do the histogram matching, though.
Hello ANTs experts, I am doing 2 types of registerations using BSyN i.e. MRI to CT multimodality and MRI to MRI monomodality. The MRI images are weekly scans (5 scans). All the MRI images have more or less the same intensity distribution 0~500/600 (Min~Max). I was wondering if I have to standardize/normalize all the MRI images before doing the registrations? What I asume is that since registration itself is kind of a normalization task (minimize the intensity difference) and tries to normalize the...
Hello ANTs folks, I was wondering what's the default value for out of frame regions in antsRegistrationSyNQuick? Is there somewhere I can change the value? I didn't find it in -h. Thanks, Seth
Nick, Since I have segmentations (binary label map) for both images, I'm thinking roughly registering the images by aligning center of geometries of the segmentations first, then do rigid registration to correct the misalignments. I'm wondering how can I pass the center of segmentations as the initial transfomration point? I know this "--initial-moving-transform [$fixed,$moving,0]", but the problem is that center of label map is still the center of original image, not the center of segmentation itself....
Hi Nick, The images are lung. CT has the whole body including the lungs, but MR covers only the lungs. Here I shared the images: https://drive.google.com/open?id=1nN-1QvFTeLhWirf2KMJJYFvJqSbSb2EW As you say, the content is more important, so maybe the easiest could be to crop only the lung area in CT to match the MR and register them?
Hello, I want to register 3D MR images to 3D CT images. For now I'm trying the linear registration. Both images have similar voxel size (~1x1x3mm), but problem is that, MR only has 40 slices (z) whereas CT has 120 slices. So, when I just register them, even linear alignment is bad. It's reasonable, becasue there's not ebough slices in MR to match to CT. So, I thought maybe deforming CT is better than deforming MR, because CT has more information here. So I changed the direction and the result got...
Hello, I was wondering how finding corresponding points between two images works in ANTs registration? I know for example in a BSpline based FFD registration corresponding BSpline control points are used to find the points where you get to choose the mesh size for each level. However in ANTs, is it done voxel-by-voxel in the fixed image to find the Geodesics shortest path to those voxels in the moving image, instead of using the control points? Thanks, Seth
Hello, I tried different updateFieldMeshSizeAtBaseLevel in BSyN registration i.e. 8,16,32,64,128mm, I logged the metric values and then plotted them wrt the number of iterations. Please see this figure. https://drive.google.com/open?id=17qMzfbuPhRw_BPMgyp03-DyiCLVdgipg I used MI and the registrations were done in 3 levels. I'm confused in the interpretation of the metric values. Considering updateFieldMeshSizeAtBaseLevel=32mm (green), it starts with 32, then 16 and fianlly 8. So I assume if the MI...
Or do you know any paper that can refer me to?
Brian, Could you please explain what does "diffeomorphic specific Jacobian" mean? I thought Jacobian means determinant of Jacobian matrix of the deformation field, that is voxel-wise calcuated and indicates the change of the vectors with respect to the very neighbors. If there exists a volume loss then >1 or <1 and =1 if no change. How is it that transformation specific? diffeomorphic or non-diffeomorophic? Thanks, Seth
OK. Thanks Nick.
Hello ANTs experts, After reading a couple posts about how updateFieldMeshSizeAtBaseLevel parameter works in BSplineSyN[gradientStep, updateFieldMeshSizeAtBaseLevel, 0, 3] including https://sourceforge.net/p/advants/discussion/840261/thread/91efe303/?limit=25#237f https://github.com/ANTsX/ANTs/issues/385 https://sourceforge.net/p/advants/discussion/840261/thread/a577ea54/?limit=25#7cbf I'm still confused. So, if I set updateFieldMeshSizeAtBaseLevel=20mm with 3 resolution levels, the registration...
You're right. I just had a hard time finding which component of SyN or Bspline trasnformation in ANTs can regularize the twisting/folding during the registration? Is there any specific regularization term for this? Thanks
Yes, I've tried using a mask. It works fine for small structural differences. If the deformation in the non-ROI regions is relatively large between fixed and moving image, then the ROI is rigidly fixed, but the rest (non-ROI regions) look twisted/distorted. But I guess, a rigidity term, penalizes warping components of a non-rigid registration, without acutely forcing the rest of the regions to be mapped. so I expect a smoother alignment in the non-ROI regions. This is the paper I saw: http://onlinelibrary.wiley.com/doi/10.1118/1.2776236/abstract...
Hello, Is there any function equivalent to rigidity penalty regularization term defined in ANTs? So that we can preserve part of an image ROI rigidly while performing nonrigid deformation on other parts. Thanks, Seth
Thanks Nick and Brian. I used the larger mask but I changed my approach. I first align the images globally based on center of mass of the fixed image, not the lesion. This will align the large structures e.g. bones etc. Then I deformably register (syn) only the masks containing lesions from both images (defining fixed and moving masks). So, all the other structures are preserved, while the moving lesion is shifted/transformed to the fixed lesion area. The registered image looks fine this way. What...
I checked the metric values and they are not exactly the same. But the registered images are very similar. My main confusion is that, I suppose if I use mask, the masked region with 0 values should be preserved and maybe the surrounding area would stretch. But here in both with or without mask cases, the lesions inside the masks are not preserved and shifted after registration.
Nick, I uploaded 2 images and a mask here: https://drive.google.com/drive/folders/1btJWcq7BCmco887kU_i2ytXQHIrr0UuH?usp=sharing These two images are already aligned based on center of mass of reference lesion (big uptake you see in the middle of Pre_Fused.nrrd. please set W=0.16, L=0.18). I want to freeze two aligned lesions that are inside the mask (0 value) and only correct the mis-alignments of the surrounding organs such as bones, heart, etc (value 1). I thought a rigid + syn should simply do...
Hello, I have another question about masking registration. Does masking work in linear (Rigid, Affine etc) registration? I tested rigid registering two CT images with and without masking a lesion and the results are the same. Is there any particular reason that masking only works on deformable stages? Thanks,
Hi, If two images to be registered are already linearly aligned (they are in the same space) and we defined a fixed image mask for non-linear registration purpose. Does that mean the masked regions from both images are excluded from the cost function caluclation? becasue if you define a mask on a region of fixed image, then the corresponding regions on the moving image should be masked. Is that correct?
Hi ANT experts, When you say "the mask is inclusive i.e. where it is value 1 , the computation influences the solution. otherwise, it does not", does that mean deformation/displacement should be zero in the region that mask = 0? Because when I use mask for registration, I still see large displacement vectors on some area that mask=0. or, is this becasue of the interpolation ? Thanks,
Ok Nick. I think this is what I need: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3870320/ I tried BSplineSyN. It adds elasticity to diffeomorphic SyN that works really good. So, wherever there is small change it keeps 1-1 mapping/smooth vectors and in larger deformations it allows FFD. I just see vorticity/rotation in some area. I'm thinking adding a Gaussian Displacement as another regularizer to smooth these out somehow. Thanks,
Hello ANTs experts, I want to capture shrinkage/growth (sink/source) between two images using image registration. I know I don't have to use pure diffeomorphic transformation and have to integrate some elasticity for one-to-many mapping. I want to control the trasnfroamtion such that it is inverse consistent (one-to-one mapped diffoemorphism) in small deformations (smoothe vectors) and on the other hand, elastic/free-form in larger deformations (less smooth vectors). My question is 1) how can I use...
I updated the ANTs and it's working beautifully. Thanks
Ok. I suspect the problem is my outdated ANTs. I'll update and try again. Thanks Philip.
Hi Philip, I missed the --output option here, but even including the --output I get the same error. Yes, you're right. I already set up the ANTSPATH, I was just directly calling antsRegistration here, because I wanted to test the executable and the command. I shared the data here: https://drive.google.com/drive/folders/0B_HxqPArKo_DbDhTWGhzNEZsTWM?usp=sharing PrePET / PostPET are total body images, PrePET_50 / PostPET_50 are the cropped ones including ROI that I'm interested in, so basically I don't...
Hello, I am running into a strange error when using the following command to register two cropped PET images. ./antsRegistration --dimensionality 3 --float 0 --interpolation BSpline[3] --use-histogram-matching 1 --initial-moving-transform [PrePET_50.nrrd,PostPET_50.nrrd,1] --transform Rigid[0.1] --metric MI[PrePET_50.nrrd,PostPET_50.nrrd,1,32,Regular,0.25] --convergence [1000x500x250x0,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox --transform SyN[0.1,3,0] --metric MeanSquares[PrePET_50.nrrd,PostPET_50.nrrd,1,16,Regular,0.25]...
Hello, I have CT images that in Fixed image there is a quite large air hole but then...
Thanks Philip! I'll try this out and let you know. I appreciate it.
Philip, Nice catch. you were right about the inconsistency. The problem is that 'cropping'...
Please let me know if you had any luck on this. Thanks
Yes. That's what I did. Cropped images have enough information for registration....
You can find the original full image now. Since we are mostly interested in the area...
Hi Philip, I uploaded the original moving image. You can find them in the link here:...
Nick, Actually, the mask is binary (inside air is 0 that is background and the rest...
Hello, I have CT images that in Fixed image there is a quite large air hole but then...
Those images are already rigidly aligned so no prior linear registration is needed....
I put Fixed, Moving and the Mask in the same location with the same link above. Yes,...
Hello registration experts, I'm trying to deformably register two PET images which...
Thank you Nick. Well, you're right, the images are quite aligned. But if you overlay...
I masked out both PET/CT images based on that labelmap contour and then used them...
Hi Nick, Actually, I have only one contour at a region which is based on PET and...
Hi Nick, Actually, I have only one contour at a region which is based on PET and...
Hello all, I have a PET/CT image of lung and two tumor contours. There is a small...
Hello all, I have a PET/CT image of lung and two tumor contours. There is a small...