Hi again! It is actually quite neat to have the control panel, and is very useful to set the reconstruction blur FWHM to see the effect on each reconstruction. However once I've decided for a certain blur, I was wondering if there was a way to open directly an image file without going trough the control panel. I reckon it would be very useful for a macro that I'm writing which automatically assembles 3B reconstructions of small contiguous ROIs into a larger reconstructed area.

morales wrote:Hi again! It is actually quite neat to have the control panel, and is very useful to set the reconstruction blur FWHM to see the effect on each reconstruction. However once I've decided for a certain blur, I was wondering if there was a way to open directly an image file without going trough the control panel.

Such a feature does not currently exist. It looks quite easy to implement. I'll reply to the thread again when it's done.

I reckon it would be very useful for a macro that I'm writing which automatically assembles 3B reconstructions of small contiguous ROIs into a larger reconstructed area.

This should actually be easier. You can simply combine all the runs into one large file by simply pasting them one after another. The result will be loaded and the ROI set appropriately. Note that if they've been run for different amounts of time, then the relative brightnesses will be different, but if they've been run for roughly the same number of iterations, then the reconstruction will be fine.

morales wrote:Hi again! It is actually quite neat to have the control panel, and is very useful to set the reconstruction blur FWHM to see the effect on each reconstruction. However once I've decided for a certain blur, I was wondering if there was a way to open directly an image file without going trough the control panel.

If you go to "Open 3B run", you will see that the new dialog box has options for the initial choice for the reconstruction FWHM and pixel size. If you record a macro to open a 3B run, you will get a line like this:

edrosten wrote:This should actually be easier. You can simply combine all the runs into one large file by simply pasting them one after another. The result will be loaded and the ROI set appropriately. Note that if they've been run for different amounts of time, then the relative brightnesses will be different, but if they've been run for roughly the same number of iterations, then the reconstruction will be fine.

Thanks! This feature comes very handy. I don't know why I did not know about it. I only have a question. In the manual it says: "If possible, placing the boundary near a bright region should be avoided. If this is not possible, then the reconstruction close to the boundary should be ignored." When we concatenate the file as you suggest, should we be careful in interpreting any fluorescence coming from pixels close to the boundary of the individual ROIs?

edrosten wrote:run("Open 3B run", "open=test.txt pixel=100 fwhm=100 reconstruction=10 show");if you delete the "show" parameter and run the macro, it will simply export the reconstruction as an image and not show the control panel.Is this what you had in mind?

Thank you very much. This is exactly what I had in mind. I'm using round 12x12 pixel ROIs and I can't always have boundaries of the ROI free of fluorescence. Therefore I was thinking I should only take the center of the ROI (6x6) and that is why I cut from the reconstructions and paste them on a stack at its proper location at different slices and z-project the maximum intensity. Hope that makes sense.... Thanks again!

edrosten wrote:This should actually be easier. You can simply combine all the runs into one large file by simply pasting them one after another. The result will be loaded and the ROI set appropriately. Note that if they've been run for different amounts of time, then the relative brightnesses will be different, but if they've been run for roughly the same number of iterations, then the reconstruction will be fine.

Thanks! This feature comes very handy. I don't know why I did not know about it. I only have a question. In the manual it says: "If possible, placing the boundary near a bright region should be avoided. If this is not possible, then the reconstruction close to the boundary should be ignored." When we concatenate the file as you suggest, should we be careful in interpreting any fluorescence coming from pixels close to the boundary of the individual ROIs?

That's correct. The best solution is to use ROIs which are too large and then discard any data near the edges. The strategy we use is:1. Divide the image up into adjacent, non-overlapping squares.2. For each square, create a ROI which is a bit larger (e.g. 2 pixels). The ROIs will now overlap.3. After processing each ROI, discard any spots which lie outside it's square.4. Combine all the results

This will avoid using the area too close to the edge of the ROI and will ensure that there are no gaps or overlaps.

We're hoping to add some features to 3B later to help do this, but we have no immediate plans.

morales wrote:

edrosten wrote:run("Open 3B run", "open=test.txt pixel=100 fwhm=100 reconstruction=10 show");if you delete the "show" parameter and run the macro, it will simply export the reconstruction as an image and not show the control panel.Is this what you had in mind?

Thank you very much. This is exactly what I had in mind. I'm using round 12x12 pixel ROIs and I can't always have boundaries of the ROI free of fluorescence. Therefore I was thinking I should only take the center of the ROI (6x6) and that is why I cut from the reconstructions and paste them on a stack at its proper location at different slices and z-project the maximum intensity. Hope that makes sense.... Thanks again!

That's probably an excessive amount of cut out. It will work, but be slower than necessary. For a 12x12 ROI, you could probably use the 8x8 inner square. Good values are 11x11 for the inner one, and 13x13 for the outer one.

Performing a cut, paste and Z project will work. Another alternative is to filter out spots from the data and then do a reconstruction from the filtered data. Let me know if you require any assistance in this regard.

edrosten wrote:Performing a cut, paste and Z project will work. Another alternative is to filter out spots from the data and then do a reconstruction from the filtered data. Let me know if you require any assistance in this regard.

-Ed

Hi!I reconstructed a whole image by concatenating the files and by cutting and pasting the center. The results are quite different. In the cutting and pasting method I see very define spots and clusters of the signal. These clusters are blurred and appear diffuse in the reconstruction from the concatenated files. Therefore, I would be very interested in learning how to filter spots from the text file to take only the center of the ROI to see if that makes a difference . Although I have to say that the cutting pasting method works very well.Thanks again. It all has been very useful!

edrosten wrote:Performing a cut, paste and Z project will work. Another alternative is to filter out spots from the data and then do a reconstruction from the filtered data. Let me know if you require any assistance in this regard.

Hi!I reconstructed a whole image by concatenating the files and by cutting and pasting the center. The results are quite different. In the cutting and pasting method I see very define spots and clusters of the signal. These clusters are blurred and appear diffuse in the reconstruction from the concatenated files. Therefore, I would be very interested in learning how to filter spots from the text file to take only the center of the ROI to see if that makes a difference . Although I have to say that the cutting pasting method works very well.Thanks again. It all has been very useful!

My guess would be that the difference in appearance is due to different relative scaling of the different areas.

When it comes to filtering spots, you need to know the format of the file. The format is relatively simple. Each line of the file is a record. There are records of many different types and you can ignore and discard almost all of them.

The important ones are the PIXELS line which records the ROI and the PASSx: lines, which record the results of a pass of the algorithm. The ROIs you just want to pass through unmodified to the plugin viewer.

The PASSx lines are of this format:

PASS1: brightness1 size1 x1 y1 brightness2 size2 x2 y2 ...

You need to filter out points by x and y. You don't need to keep the brightenss and size values since while they're important to the algorithm they are not used by the viewer.

Naturally you'll need to modify the x and y ranges given to match the rectangluar area you want to accept. The vaules are in pixels. 3B considers (0,0) to be the top left pixel of an image (the same as ImageJ).

In the manual it says: "If possible, placing the boundary near a bright region should be avoided. If this is not possible, then the reconstruction close to the boundary should be ignored." When we concatenate the file as you suggest, should we be careful in interpreting any fluorescence coming from pixels close to the boundary of the individual ROIs??

Yes, in general you need to be very careful about using data near the boundary.

If the region is too large and you cannot avoid the boundary then the solution is to split the region up into a grid of overlapping masks. That way data from near the edge of the mask can be rejected without leaving gaps in the final reconstruction. There are some instructions and programs described here which will help: