Open acardona opened 9 years ago
@arcardona, I just factored the cropping tool's crop request generation into a separate CATMAID.crop()
function. This should allow you to create the sub-volumes you wanted based on project space coordinates. Cropping a bouding box from (10, 11, 12) to (21,22,23) in the current project and active stack viewer's primary stack at zoom level 1 would look like this:
var stackId = project.focusedStackViewer.primaryStack.id;
CATMAID.crop(project.id, [stackId], 10, 11, 12, 21, 22, 23, 1);
You can optionally add a (clockwise) rotation around project Z as an extra parameter. The function returns a promise. So to do add a continuation to this call, use .then
, e.g. CATMAID.crop(...).then(function() { console.log('done'); });
.
A number of issues to address: