I'm trying to display 3D images (volumes) using Javascript and XTK. I can view the volumes fine, but I am having problems trying to access the volume dimensions.
//Create a new volume
volume = new X.volume();
//Add data. Works fine, and I can see slice views and scroll through them
volume.file = 'http://...nrrd';
Using the next line of code, I can see in Firebug that 'volume' has a property called 'dimensions' of size 3 that holds the correct dimensions of my image.
console.log(volume);
dimensions -> [200, 200, 396]
However, if I try to access that array, for example like below, I get an array of [10, 10, 10]
console.log("dimensions", volume.dimensions);
dimensions -> [10, 10, 10]