0

I think it is a simple question, but it really confuse me...

In the case which I try to show three object together, like Fibers, Volume and Mesh, just as you can see in this demo web.

Demo Web: http://goo.gl/NP2eUo

But there is a problem, the Fibers object can not automatic alignment with Volume and Mesh. Those files are come from the same source (one subject's DICOM file) so it should can be match together in default.

If only show the Fibers object, it can be put in the center of the view. But if show three object together, then Fibers object will be Shift!!!

Is there any possible way can let three object automatic alignment together?

And here is my source code: http://goo.gl/Ttzc84

AndyWhite
  • 83
  • 1
  • 7

1 Answers1

0

What if you try to call reset boundingBox on showtime?

...
// .. add the mesh
r.add(mesh);

r.onShowtime = function() {

  r.resetBoundingBox();

}

r.render();
...

How did you generate the surface and the trk file? Freesurfer and DTK?

I suspect the trk file does not provide any IJKToRAS transformation.

Nicolas
  • 2,191
  • 3
  • 29
  • 49
  • [1] I think r.resetBoundingBox(); doesn't help... If only write: /* var fibers = new X.fibers(); fibers.file = "file/MyTracts_10000.trk"; r.add(fibers); r.onShowtime = function() { r.resetBoundingBox(); } r.render(); */ It still be shifted... [2] On the other hand, if only Mesh and Fibers object, even let mesh visible property be "false", Fibers will still be shifted, I think...because that r.add(mesh); which is mean Mesh had be "add", even is not visible [3] trk File is creat by "DSI Studio" [4] What is "IJKToRAS transformation" mean? – AndyWhite May 30 '14 at 16:06
  • Is there any possible that the problem is caused by "DSI Studio"?? As I know, if the trk file is created by "DSI Studio", then the Fibers points which records in file is only be positive values. Maybe that is the reason why the Fibers object will display on the left-up, that mean "The first quadrant", am I correct? If it is...how to solve this problem? I found some example like this web demo: http://my.slicedrop.com/?WA In this demo, you can see that the object is totally be mach together. But if you download the source file "streamlineres.small.trk" and put it in my code, it will be shifted – AndyWhite May 30 '14 at 16:23