[Mrtrix-discussion] colourcoded count images; ROIs after tractography

Donald Tournier d.tournier at brain.org.au
Tue Feb 3 15:12:07 PST 2009


That's the attitude!

For the colour-coded count program, I'd recommend you start by copying
the 'tracks2prob.cpp' file in the cmd/ folder. Just make sure you call
it something else, and that it's also in the cmd/ folder - that way,
the build script will automatically compile it for you. I've also
attached a new version of 'tracks2prob.cpp', which I modified recently
to make it a fair bit quicker (others out there may also be
interested?). You can use the same looping structure, and 'simply'
modify what information gets stored. Again, I'd recommend a dyadic
tensor approach since averaging orientations is a funny business (as
opposed to averaging actual vectors, which is trivial - the issue in
your case is that orientation x is equivalent to orientation -x).

For the post-tracking editing program, you'll probably need to start
from the "cmd/streamtrack.cpp" program, and combine this with elements
of "cmd/tracks2prob" (in particular the DWI::Tractography::Reader
class and its usage). I would personally recommend that you subclass
DWI::Tracker::Base, and re-implement the init_direction() and
next_point() virtual functions to simply return the next point in the
current track as loaded from the file (using
DWI::Tractography::Reader). This is how each different tracking method
is actually implemented (look at the other files in the
src/dwi/tractography/tracker folder). That way you can essentially run
the "tracking" directly from the tracks file, and re-apply any ROIs
that you might be interested in. In fact, that might be worth
including as an additional option in "cmd/streamtrack.cpp", rather
than having a whole separate program for it, given how similar the
whole process will be. Up to you...

Otherwise, I hope you can figure out my command-line argument/option
parsing system. It should be fairly self-explanatory by looking at the
existing programs in the cmd/ folder. Also, no need to worry about
makefiles and the like, the build script should be able to figure it
all out for you - just make sure you put any additional code in the
src/ folder, and that any *.cpp in that folder also has an equivalent
*.h file). Let me know if you get stuck...

Good luck!

Donald.


On Wed, Feb 4, 2009 at 9:38 AM, Kerstin Pannek <k.pannek1 at uq.edu.au> wrote:
> D'oh! I had a feeling you would say that...
> Could you give me a hint, where in your code I would have to look? My c++ is
> a bit rusty, but never give up, never surrender!
> Cheers
> Kerstin
>
>
>
> Donald Tournier wrote:
>>
>> Hi Kerstin,
>>
>> Currently, I'm afraid the answer to both questions is no. That said,
>> it should be a relatively task to code these up, since they're both
>> fairly trivial modifications of the existing code. I won't have the
>> time to sit down and do it in the near future, but if I have a spare
>> minute I'll give it a shot. Maybe someone else out there is feeling
>> particularly brave and wants to give it a try...?
>>
>> Also, there's a slight ambiguity in how you would obtain your
>> voxel-wise track orientation, since averaging orientations is not
>> immediately obvious. I think the best way I've heard of for doing it
>> is via the so-called dyadic tensor (for those who may be interested in
>> having a go ;).
>>
>> Sorry I can't help any more than that right now...
>> Cheers,
>>
>> Donald.
>>
>>
>> On Tue, Feb 3, 2009 at 3:11 PM, Kerstin Pannek <k.pannek1 at uq.edu.au>
>> wrote:
>>
>>>
>>> Dear MRtrix experts
>>> I was just wondering if it is possible to extract the fibre orientation
>>> from
>>> *.tck images on a voxel-wise basis - to get something like a colourcoded
>>> count image.
>>> Also, I would like to know if it is possible to apply inclusion/exclusion
>>> ROIs _after_ streamtrack has finished.
>>> Thanks for your help
>>> Cheers
>>> Kerstin
>>> _______________________________________________
>>> Mrtrix-discussion mailing list
>>> Mrtrix-discussion at www.nitrc.org
>>> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
>>>
>>>
>>
>>
>>
>>
>
>



-- 
Jacques-Donald Tournier (PhD)
Brain Research Institute, Melbourne, Australia
Tel: +61 (0)3 9496 4078
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tracks2prob.cpp
Type: text/x-c++src
Size: 4263 bytes
Desc: not available
Url : http://www.nitrc.org/pipermail/mrtrix-discussion/attachments/20090204/99ba2e97/tracks2prob.bin


More information about the Mrtrix-discussion mailing list