[Mristudio-users] transformations with AIR in Landmarker

Siewmin Gan siewmin.gan at gmail.com
Mon May 11 12:20:42 EDT 2009


Hi Susumu, I have learnt a lot from your correspondence, as usual. Will try
as you've suggested.
Thanks

Siewmin


 ------------------------------
> *From:* mristudio-users-bounces at mristudio.org [
> mristudio-users-bounces at mristudio.org] On Behalf Of susumu [
> susumu at mri.jhu.edu]
> *Sent:* Sunday, May 10, 2009 9:39 AM
> *To:* 'DTI Studio, ROI Editor, Landmarker Questions/Support'
> *Subject:* Re: [Mristudio-users] transformations with AIR in Landmarker
>
>    Siewmin raised some important points and I hope other users could gain
> some important information from this thread.
>
>
>
>  I got the mean DWI and tensor file from the original 4D DWI. The tensor
> file is as you've said, which contains  "Dxx, Dyy, Dzz, Dxy, Dxz Dyz" in one
> file. In Landmarker, I loaded only the mean DWI of the subject and then the
> tensor file with the "open .d" button. The 4D raw DWI is not used in
> Landmarker or later. With the "linear" option in AIR, I could rotate the
> tensor and the mean DWI to the template DWI without having to subsample the
> input data first. The "nonlinear" option requires the subject data (mean DWI
> and the tensor file) to be of the same dimension as the template (i.e 181,
> 217, 181 if ICBM81 DWI is used as template). This is noted in the pop up
> message, and it would only continue once the input files are resampled to
> the template.
>
>
>
> >It is always advised to do linear transformation first. To start
> non-linear, you have to make sure that the brain locations and shapes are as
> similar as possible. This is similar to non-linear fitting. You always have
> to provide “initial” values close to the real solutions. Otherwise,
> non-linear fitting could converge to a wrong solution (trapped by “local
> minima”).
>
>
>
> Additionally, I tried affine in the linear registration option. The output
> DWI of the registration is identical to the input of the DWIs if I used one
> of my subject's DWI as the template. Using the 2nd order polynomial in
> nonlinear option, an error message occurs "registration terminated due to a
> calculation problem, please try a lower order model". It seems to only work
> if the template is one of those provided in Landmarker.
>
>
>
> > If you can send us two images you are having the problem, we can take a
> look at why AIR doesn’t work.
>
>
>
> I then saved the rotated tensor file as one file in the .dat format and the
> linearly registered 3D  meanDWI. In MRIview3D, I loaded this new 3D DWI and
> open this new tensor.dat file with the open.dat button to re-calculates the
> fa, colour map etc. I viewed the colour map output from this and it looks
> pretty good, and as described previously.
>
>
>
> > This is the correct procedure.
>
>
>
> I saved the fa and principal eigenvector file and used them to perform
> fiber-tracking. The tracts that are manually extracted obtained looks
> similiar to the fiber tracts from the original raw 4D DWI.
>
>
>
> > That is a good sign.
>
>
>
> The FA values of these tracts are smaller uniformly in comparison, and the
> assymetry preserved (i.e the left tract FA is smaller than the right tract
> FA using the maps calculated from the original and rotated tensor).
>
>
>
> > Normalization requires pixel interpolation, which leads to decreased FA.
> So you can not compare FA values with and without normalization.
>
>
>
> If the non-linear option is used, is there a problem that the tensor is
> subsampled first before it is re-oriented, as described above?
>
>
>
> > As I mentioned above, nonlinear should be AFTER linear transformation.
> This means, the data are transformed multiple times and pixels are
> interpolated multiple times. To avoid this, once you did linear (save
> transformation matrix: T-linear) and nonlinear (save transformation matrix:
> T-nonlinear), you can combine the T-linear x T-nonlinear using one of the
> buttons in the LDDMM section. Once you combined all transformation matrices,
> you can apply it only once to the original image in the native space.
>
>
>
> > Another interesting thing is, there are two ways to transform images;
> transform your image to an atlas or transform atlas (usually, binary
> segmentation map) to your original data for automated segmentation. For the
> latter approach, you don’t have to transform (therefore interpolate) your
> original data. When you transform the atlas (segmentation map), make sure to
> use “nearest neighbor” (no interpolation), not the tri-linear interpolation.
> The segmentation map consists of arbitrary numbers assigned to each segment
> (e.g. the internal capsule is “1” and the corona radiata is “3”). If you
> interpolate these two segments and obtain “2” in between these two segments
> and if “2” means pons, you would get the pons in between the internal
> capsule and the corona radiata. On the other hand, when you are transforming
> your data to an atlas space, use the tri-linear interpolation. Otherwise,
> you could get strange discontinuity artifacts.
>
>
>
> Do you suggest using the affine or non-linear transformation of the DWIs
> and the corresponding transformation of the tensor? Lastly, I'm not sure if
> the colour map display is of an issue? It occurs both using the linear
> affine option and the non-linear option.
>
>
>
> > When everything is working right, the color map should look smooth and
> clean. Maybe you are using “nearest neighbor” for the tensor transformation?
>
>
>
> Thanks
>
>
>
> Siewmin
>
>
>
>
>
>
>
>
>
> On Sat, May 9, 2009 at 7:44 AM, susumu <susumu at mri.jhu.edu> wrote:
>
> First, I tried rotating the tensor but had problems with the results. When
> I look at the colour map from the resulting tensor, it looks ok generally,
> but there are certain areas of blotchiness and some mixing of colours
> especially in the sidelines of white matter regions (i.e there can be a
> striking red line or a blotch of redness in the middle of a green regions
> within the saggital stratum). These are the steps I took, and would like to
> check if it is done correctly.
>
> 1. resample mean DWI of subject data (together with the 4D DTI data and the
> tensor) to DWI of ICBM 81 template. Non-linear transform (2nd order
> trilinear) the resampled meandwi of subject to dwi of template, and used
> that to drive the transformation of the resampled 4D DTI and the resampled
> tensor simultaneously. (The resampled tensor was loaded with the .dat
> button.) I used MRIview 3D to load the normalised 4D DTI, followed by the
> normalised tensor with the .dat button, and calculate the fa, colour etc
> maps from the normalised tensor. I  tried various thresholding with AIR but
> the colour maps problem remains.
>
>
>
> > First of all, I think you don't have to resample DTI images before AIR.
> AIR can take data with different matrix and pixel sizes and the output
> images have the same matrix/pixel dimensions as the template (in your case,
> 181x217x181 of ICBM81).
>
> > By saying "4D DTI", do you mean raw 4D DWI before tensor calculation? if
> so, I don't think you want transform raw DWIs. If you want to do anything to
> raw DTI, you also want to transform the corresponding gradient table, which
> could be messy. Our tools do not provide methods to transform raw DWIs.
>
> > When you say, "tensor" data, I assume you are talking about 4D file that
> contains "Dxx, Dyy, Dzz, Dxy, Dxz, Dyz" images in one file. If so, please
> make sure that you load this 4D tensor file by the "open .d" button in
> Landmarker. Once read in Landmarker, the 4D tensor file is disassembled to 6
> 3D data for Dxx, Dyy, Dzz, Dxy, Dxz, Dyz.
>
> > Once the AIR is done using mean DWI (your data) - mean DWI (template),
> the 6 3D tensor element data should be stored all together into one file as
> a "transformed 4D tensor file".
>
> > This transformed 4D tensor file needs to be read into DtiStudio to
> re-calculate new transformed FA, color, vec, etc.
>
> > The blotch-looking colormap could happen by; 1) transform the color map
> directly (you should recreate color maps using the recalcuated FA and vector
> files from the transformed tensor file or 2) you transformed a vector file
> (transformed vector files should be obtained from the transformed tensor
> file. Vector can not be directly transformed).
>
>
>
> Second, I tried without rotating the tensor. I calculate the scalar and
> colour maps from the original 4D DTI data, aligned the maps to AC-PC line,
> draw rois on them and invert transform the rois back to native dti space to
> extract the relevant white matter tracts. I had two problems here. 1)  with
> orienting the subjects scalar DWI to  another particular subject's DWI with
> rigid transformation in AIR and 2) Invert transform ROIs drawn on the
> registered colour map back to the original DTI space. These are the steps I
> took:
>
>
>
> > Maybe you are transforming raw DWI data? Again, you should not transform
> raw DWI and recalcuate tensor. You have to first calculate tensor (throw
> away the raw DWIs) and transform the tensor.
>
>
>
> 1. A subject's data which is acquired // to AC-PC is chosen and other
> subjects not acquired //to AC are registered to this. Again the meanDWI is
> used for source and target images, this time using rigid transformation in
> AIR in Landmarker. However, there is no difference detected after the
> transformation has taken place. However, if I change the target image from a
> subject's DWI to the mean DWI of the ICBM 81 template, it works but the
> source data would be subsampled to that of the ICBM template. I'm not sure
> why it didn't work in the 1st case?
>
>
>
> > As mentioned above, AIR not only adjust the image orientation and
> translation, but also the matrix / pixel size..
>
> > Rigid transformation of AIR is sometimes very cranky. We are working on
> alternative methods now. please try different threshold or affine.
>
>
>
> Additionally, using either another subject or the template DWI as target
> image, would yield the an output file (AlignlinearOutput.air) when the
> transformation has been performed, which I saved the
> invert_AlignlinearOutput.air. However, when I clicked on these .air files in
> the folder it is saved as an installer package, I get the following error
> message " An error has occurred.The application could not be installed
> because the AIR file is damaged. Try obtaining a new AIR file from the
> application author." I have installed the air application and placed it in
> the same folder, together with the alignlinear.exe file. Is it possible to
> view the transformation matrix files saved or did I not installed the air
> application appropriately?
>
>
>
> > Maybe Xin can answer this question better, but I'm not sure why you want
> to open *.air??
>
> > Once you save the *.air, you can load it back to Landmarker and apply to
> images by using the "open M" button in the LDDMM section.
>
>
>
> 2. ROIs are drawn on the transformed AC-PC aligned colour maps with
> ROI-editor. I would like to check if it's OK to draw rois on the transformed
> colour map? These ROIs would later be used as the start ROI and stop ROI to
> extract the corresponding white matter tract with DTI studio)
>
>
>
> > Drawing ROIs on color maps is fine. ROI is simply 1/0 information about
> which pixels you chose and the color maps are simply what is displayed to
> aid your ROI drawing.
>
> > If you draw ROI in the atlas space and have a plan to back-transform your
> ROI files to the native space, there are several things you have to know;
>
> 1) Atlas space is 1x1x1 and your native space could be 2-3 mm. The ROI
> defined in the thin 1 mm slice could be lost after transformation to the
> thick 2-3mm slice. Therefore, you have to create 3D ROIs in the atlas space
> with at least 3mm thick
>
> 2) Use nearest neighbor interpolation when you back-transfer. You don't
> want to get a pixel with 0.3 or 0.4 after transformation. You want 1/0
>
>
>
> 3. I  tried to invert-transform these ROIs back to the original DTI space
> with the previously saved invert_matrix.air file. How is that done in
> Landmarker and if the previous error message needs to be resolved before I
> can used the matrix files?
>
>
>
> > Xin, how to do the invert-transformation of *.air?
>
>
>
> Susumu
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Mristudio-users mailing list
> Mristudio-users at mristudio.org
> http://lists.mristudio.org/mailman/listinfo/mristudio-users
>
>
>
> ------------------------------
> This e-mail message (including any attachments) is for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution
> or copying of this message (including any attachments) is strictly
> prohibited.
>
> If you have received this message in error, please contact
> the sender by reply e-mail message and destroy all copies of the
> original message (including attachments).
>
> _______________________________________________
> Mristudio-users mailing list
> Mristudio-users at mristudio.org
> http://lists.mristudio.org/mailman/listinfo/mristudio-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mristudio.org/pipermail/mristudio-users/attachments/20090512/cac99a9c/attachment-0001.html 


More information about the Mristudio-users mailing list