The brush tool only operates when the centre of the tool is in the bounding box.
It makes sense to have this constraint because there are no objects to segment outside the image, however, it becomes a problem for features located on the edge of the bounding box.
When the centre of the brush tool reaches the border, the tool continues in the unconstrained direction.
This results in a perfectly straight selection the 1 radius width from the border (see attached image). This becomes very annoying when trying to segment a feature as it leaves the field of view in a stack.
I would like to request that the brush tool be allowed to operate outside of the bounding box, or at least 1 radius unit outside the box.
Ideally, I'd also like to be able to activate the brush selection outside the box, so a selection can be gently dragged into the field of view without having to precisely find the border first. This would greatly improve my workflow.
Thank you.
Hi Ben,
the clipping of the brush tool occurs in two situations:
1. when the brush is at the physical edge of the dataset (Pixel Info: has negative values, as in case1.jpg)
2. when the brush is at the edge of the viewing window(for example when zoomed-in, case2.jpg)
to make sure that I understand the problem correctly, which of these cases you are referring?
Thank you Ilya, I am specifically referring to case 1.
Using the MIB splash screen as an example;
A 12px radius brush located at (1;256) should select a 226px^2 area region that extends 12px from the image border; and it does (first attached image).
A 12px radius brush located at (0;256) should select a 202px^2 area region that extends 11px from the image border; but it does not, because the tool cannot activate (second attached image).
Also, I noticed some very unusual behaviour in the coordinate display while acquiring those screen shots. Compare the coordinates of the cursor in the two attached images; translating the cursor one unit (-1;0) from (1;256) displayed (0;289) instead of (0;256). I assure you that I did not move the cursor 33 pixels.
Similar coordinate discrepancies occur when the cursor crosses the other physical borders, and the varies depending on the size of the image. Does the region surrounding the image data have its own coordinate system independently of the image coordinate system? I could see how that might complicate my feature request.
(p.s. I actually consider “case 2” to be a feature; it prevents the accidental selection of objects that are not currently visible)
thank you for clarification.
Case 2: I must admit it bugs me slightly also, but there is a technical reason why the brush is clipped. To improve performance, MIB renders always renders only the part of the dataset that you currently see on the screen. As result. when the brush gets to the edge of the shown dataset it gets clipped. To fix this, I would have to rewrite the rendering part and render image that is ~1/4 larger in height/width than the shown area. This unfortunately will drop performance with large rasters.
Thank you for the workaround Ilya.
I should clarify further though; I do not need a model to be larger than the image and I actually need to avoid that.
I am segmenting correlative data (confocal + FIBSEM) and I am constantly switching modalities. Everything has already been aligned to a coordinate system, so I'm trying to avoid adjustments to image coordinates. All I'd like to do is select features inside the image, without the centre of the brush tool being within the image.
I like the dX/dY method, but I have a few more questions:
Will the new boundary dimensions apply when I reload a model? or do I need to re-load the image, add a frame with dX/dY, then load the model?
Is there an easy way to define the image boundary geometry separately from the exported mask geometry (i.e. allow image selections within {0,512;0,512}. [i.e. Image size after adding dX/dY] but only export {64,448;64,448} [i.e. the original image boundaries before adding dX/dY])?
It would probably be easier for me to add a pre-defined border to all my data before loading it into MIB, but then I wont be able to use some of the thresholding features in MIB.
ok, now I finally got the point. I need to check how easy it can be done, but I agree, it it nice thing to have.
The only requirement is that physical sizes (width/height/depth) of the image dataset and models should match. When you add frame, both image and model are increased by the size of the frame. If you save them both after that, both of the files will be larger. Perhaps, when you finish the model you can crop the dataset with loaded model to restore original dimensions (Dataset->Crop dataset).
not with default tools, the export/save work only for the full dataset. The crop of the dataset back to the original dimensions is the only way. Or use scripting if you have MIB under Matlab environment. The current beta of MIB is focused on implementation of the batching, when used many opetations can be automatically repeated. For example, it is possible to have the crop operation as the batch action, which may make restoration of the dataset to the original size much easier.
I also noticed that I should add to the add frame possibility to use negative values, in this case the added frame can be easily removed by using the same tool with the negative values.
yes, there may be some problems due to that. The idea is to make the border with the color of your background. In this case thresholding techniques won't take it. Or not consider those areas at all, because you can remove them at the end using the crop.