Header

Tensors in DTITK format with TORTOISE_V3.1.4

Submitted by ajevia on
Category

Hello,

 

I generated tensors using the binaries from DIFF_CALCV314, and want to do tensor registration with DTITK.

How do I convert the TORTOISE tensors into DTITK tensors?

I am not able to find a command that can do this conversion.

 

Thanks,

-Arnold Evia

Submitted by nayaka on Mon, 10/07/2019 - 16:09

Permalink

Hi Arnold,

We do not have a command currently implemented in TORTOISE 314, to convert to DTITK. The only command currently is the conversion of DTITK to TORTOISE.

If you are interested in the former, at the moment, you can import the TORTOISE314 computed tensor, using DIFFCALC GUI (i.e DIFFCALCV25) with the import tensor button. 

If you are interested in this approach, following are the steps:

a) from /TORTOISE_V3.1.4/Linux/TORTOISE_V3.1.4/DIFFCALC/DIFFCALCV25/DIFFCALC/diffcalc_main

open diffcalc gui by typing calcvm in a terminal

This will open the diffcalc_gui. If you have default settings file, a gui will open with the two buttons active i.e load listfile and import tensors. 

b) please select 'import tensors' button and select TORTOISE. This is to load the tortoise tensor. You can load the new tortoise v314 tensor that you are interested in converting to DTITK format. 

c) you will see a dialogue box appear with the message 'the .list file you have designated is corrupted'. Please do not worry about this error message as the gui expects and associated list file with opening the data. Since there is none, this dialogue gets displayed. Please click twice 'ok' to the error message and in a few seconds the status window will display the message, 'Please open list file <your data_L0.list' and click restore'. 

d) Please click on the 'load listfile' button in the DIFFCALC gui. 

c) this selection will take a few seconds and another gui will open with the option to pick an _L0.listfile. Please select the list file and in the main DIFFCALC gui, 'restore session' will get activated. 

d) click on the restore session button and with this the 'export image' button will get activated.

e) click on the 'export image' button and you will see several export options. DTITK is one of them and by clicking on the option, you will be able to convert to that format.

 

We are sorry that at the moment this is the only option available. 

Thanks,

Amritha

Submitted by ajevia on Thu, 10/17/2019 - 03:41

Permalink

Thanks for the instructions, they were very helpful.

I noticed that the output DTITK data has been reoriented, and the sqform is set to identity-like. Is it possible to obtain the transformation that was applied to the data in ITK format?

Best,

Arnold

 

Submitted by irfanogl on Thu, 10/24/2019 - 15:04

Permalink

Hello,

I was away for a while so just got involved in this question. So my first question is, do you want to use DTITK for a specific reason or just to create templates? If the latter, DRTAMAS part of TORTOISE can do that as well and it would be easier to use TORTOISE output data. Of course, if there is another reason, you need to convert TORTOISE tensors to DTITK as you requested.

 

The procedure Amritha described is correct. HOWEVER, the old version of TORTOISE (V2.x) does NOT consider sform and qforms and replaces the header with identity transformations. So whenever you involve the IDL based DIFFCALC, that information is gone forever.

So the solution is to not to involved old DIFFCALC. 

I just coded a converter which will be released in a few days (this week). Let me know if it works.

 

PS: I also suggest taking a look at DRTAMAS too.

 

 

 

 

 

Submitted by ajevia on Tue, 11/19/2019 - 14:42

Permalink

Thanks for including the DTITK converter. I have been using DTITK for creating templates with my dataset. At the time, I tried DRTAMAS but could not get reasonable rigid body registrations for my data. My data are postmortem hemispheres that have been imaged in different orientations, so sometimes rotations of 90 degrees or more are needed to get to a common space. Also, there is a large variation in the sforms and orientations codes in my data. These characteristics of my dataset were most likely causing DRTAMAS to fail.

 

Since my last message, I have modified my data by swapping and flipping dimensions, reorienting the tensors accordingly, replacing the sform with identity, and setting a specific orientation code. This modified dataset works well with DRTAMAS, and the results look great.