xtk

xtoolkit - volume.range is undefined


volume.range is undefined

here is a part from the code :

    var sliceXController = volumegui.add(volume, 'indexX', 0,
        volume.range[0] - 1);
    var sliceYController = volumegui.add(volume, 'indexY', 0,
        volume.range[1] - 1);
    var sliceZController = volumegui.add(volume, 'indexZ', 0,
        volume.range[2] - 1);
    volumegui.open();

and here is the full code from lesson13 : http://jsfiddle.net/gh/get/toolkit/edge/xtk/lessons/tree/master/13/#run

what should i do now and thanks a lot


Solution

  • Did you get this to work? I'm new to XTK and had problems with this when loading my own NRRD/NII files. I changed volume.range[0] to volume.dimensions[0] (etc.) and that worked fine for me, but not sure if that's a legit way of fixing things.

    Edit: Actually, check which build you are using. I switched to xtk_edge.js and volume.range works fine with that build.

    https://github.com/xtk/ge