Analysing sham rat brain sections


#1

I would like to analyse some sham rat brain sections in the same way as I analysed the ones with a lesion.

I have used next macro to have a perilesional area of 200µm from the border of the lesion:

setBatchMode(true);
drawOverlay( "cyan" );
getSelectionCoordinates(xpoints, ypoints);
xpoints = Array.concat(xpoints,xpoints[xpoints.length-1],xpoints[0]);
ypoints = Array.concat(ypoints,0,0);
makeSelection("polygon", xpoints, ypoints);
run("Enlarge...", "enlarge=55"); // 200µm = 55.32pel
drawOverlay( "yellow" );
run("Select None");
setBatchMode(false);
exit();
function drawOverlay( color ) {
	roiManager("Add");
	roiManager("Set Color", color);
	roiManager("Set Line Width", 2);
	run("Add Selection...");
}

So I would like to ask if it is possible to ‘copy and paste’ the outlined region onto the sham brain sections?

Thanks in advance,
Kaat


#2

@Kaat_Beunen

Do you have an image that we could run this code on? If so - please post one so we can access it (preferably, in the original file format in which it was acquired).

Too - can you clarify a bit more on what exactly you want for your analysis workflow? Remember… we all come from different backgrounds and don’t necessarily know your science (and the jargon that comes with it). :slight_smile: So just be as clear and concise as you can be.

I think what you want to do is overlay the selected area (ROI) onto another image? Is correct? If so… you need to add code that:

  1. selects the image that you want to overlay the ROI onto (make sure it’s the activated image… so with the following combination calls:
id  = getImageID();
selectImage(id); // to activate that window
  1. then you can select the ROI you want to overlay… (the number will change depending on which ROI you want/need)
roiManager("Select", 0);
  1. and then run:
run("Add Selection...");

That should do it.

eta :slight_smile:


#3

Dear,

The next two tiff-files are pictures of both sides of one lesion. It’s the intention to overlap the same area as here (with the macro I send earlier) on another brain section, but from a sham rat (so this rat has been through the same surgery as the rat with the lesion, but no arteria was occluded so no ischemia appeared and subsequently there was no lesion). We want to measure the same area to use as a control for our study.
131-1-c131-1-c 2

So my question, is it possible to copy and paste te same area used in the lesion sections onto a sham section?

I tried to send a picture with the marked area, but apparently that’s not possible. To outline the ROI, I first draw a line with the freehand line tool at the border of the lesion and perilesion and afterwards I run the macro.

Kind regards,
Kaat


#4

@Kaat_Beunen

I still do not completely understand what you wish to do… step-wise. Maybe my morning coffee has not quite kicked in?? :blush:

But regarding

The answer is yes - as long as you take into account the differing sizes of your images. You will have to register them before overlaying ROIs - to ensure images are the same size/scale/etc.

eta