[Camino-users] tractstats

Philip A Cook cookpa at mail.med.upenn.edu
Fri Apr 27 14:12:17 PDT 2012


The problem should be fixed in r1044. It should now work without a header file and give you correct lengths in physical space (mm). You shouldn't need to use -header for this program. The man page is in need of an update though, I'm working on that now.

If you attempt to use -tractstat length with a scalar file, it will complain because length isn't something that can be derived from the scalar image, however if you use -scalarfile and a supported tractstat (eg, mean or min) it should work properly.



On Apr 27, 2012, at 4:33 PM, Yan Jin wrote:

> Hi Phil,
> 
> Thanks! -header option is not mentioned in the command list
> description page, so I didn't know. You probably need to update that
> as well. I used -scalarfile instead, but it threw out error messages.
> It also breaks for tractstatimage as well.
> 
> Yan
> 
> On Fri, Apr 27, 2012 at 1:23 PM, Philip A Cook
> <cookpa at mail.med.upenn.edu> wrote:
>> Hi,
>> 
>> Thanks for the report, this is a bug, it is failing because it doesn't have a voxel to physical space transformation. It shouldn't need one since the length of each tract is already in physical space. I will work on a fix for this.
>> 
>> In the interim, you can work around the problem by using the FA image you mentioned:
>> 
>>  cat  trk.Bfloat | tractstats -header fa.nii.gz -tractstat length >  stats.Bdouble
>> 
>> 
>> Phil
>> 
>> On Apr 27, 2012, at 4:06 PM, Yan Jin wrote:
>> 
>>> Hi Florian,
>>> 
>>> Thank you! I just tried the command, but I got lots of "?" in the
>>> text. I think that there is something wrong with the binary output
>>> from tractstats. Are you using the current version (build 1043)?
>>> 
>>> Yan
>>> 
>>> On Fri, Apr 27, 2012 at 12:50 PM, Florian Fischer
>>> <flofisch at students.uni-mainz.de> wrote:
>>>> Hi Yan,
>>>> 
>>>> you could just pass the (binary) tractstats output to "double2txt" like so:
>>>> 
>>>> tractstats -tractstat  length<  trk.Bfloat |double2txt>  stats.txt
>>>> 
>>>> 
>>>> Cheers
>>>> 
>>>> Florian
>>>> 
>>>> 
>>>> 
>>>> On 04/27/2012 09:05 PM, Yan Jin wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I just used tractstats to get the length of the streamlines. It
>>>>> doesn't seem to work. Here is what I did:
>>>>> 
>>>>> tractstats -tractstat  length<  trk.Bfloat>  stats.Bdouble
>>>>> 
>>>>> Then in Matlab:
>>>>> fid=fopen('stats.Bdouble'. 'r'. 'b');
>>>>> data=fread(fid, 'double');
>>>>> 
>>>>> But when I view data, it shows "NaN". I tried "endpointsep" as well.
>>>>> It was the same. However, "min" works with an FA image. Did I do
>>>>> anything wrong? Could you double check? I used v1043.
>>>>> 
>>>>> Thanks,
>>>>> Yan
>>>>> _______________________________________________
>>>>> Camino-users mailing list
>>>>> Camino-users at www.nitrc.org
>>>>> http://www.nitrc.org/mailman/listinfo/camino-users
>>>> 
>>>> 
>>> _______________________________________________
>>> Camino-users mailing list
>>> Camino-users at www.nitrc.org
>>> http://www.nitrc.org/mailman/listinfo/camino-users
>> 
> _______________________________________________
> Camino-users mailing list
> Camino-users at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/camino-users



More information about the Camino-users mailing list