Login  Register

Splitting images & Histograms

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Splitting images & Histograms

csadangi
Hi,

I have a few questions:
1) I am using a Leica Confocal SP8 and the files are .lif. When I drag the
experimental file to ImageJ, it opens up a console with warning (attached
screenshot). Will it affect my images in any way?
<http://imagej.1557.x6.nabble.com/file/t379887/1.gif>
2) I also get a Bio-format option but I just click ok with the default
settings. Should I change anything? (attached screenshot)
<http://imagej.1557.x6.nabble.com/file/t379887/2.jpg>
3) Once I open a series, it only shows up as blue in color. But while
imaging, I used blue, green and red channels. How can I view them in their
original channels?
4) Is there a way to extract each image as a separate file using ImageJ? I
took over 30 images and some z-Stacks, can I save them as individual files?

5) I want to calculate the fluorescence intensity at the membrane. I found a
paper describing the same but I am unclear as how to calculate the peak
intensity. I have attached a screenshot for the same
<http://imagej.1557.x6.nabble.com/file/t379887/3.jpg> .

My specific questions are:
a) How did they draw two lines in the image. I drew one line and clicked
draw, but when I tried to draw the second line the first line disappeared.
b) What do they mean by 2 values/line?
c) How did they calculate the distance?
d) Is the distance between peak 1 and peak 2 the fluorescence intensity?
e) Should I just measure the center of the circle to calculate the
intensity?
The link to the complete paper is here:
https://elifesciences.org/articles/28270/figures

Thank you in advance for helping me.



-----
----
Chinmaya
Medical University Innsbruck
Innsbruck
Austria
--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Splitting images & Histograms

Jim Peterson
Regarding 4):
The macro below may help get you going.  This macro was written to split
nii files (MRI scans), but you can modify it for your lif files.  It
prompts for a directory, finds all nii files and for each creates a
directory and populates it with the z-stack as separate tif files.  The
individual file names are specified by the SequenceParams variable - in
this case ³Š/slice_zXXX, where XXX is the 3-digit stack index.

If you need to also separate the channels you will want to add
³split_channels² to the BioFormatsParams variable, but then you will need
to add logic to save the separate channel images, either putting them in
separate directories or modifying the name.  I would recommend that you
try the split by hand before running the macro.  Open one of your lif
files with bioformats and then save using "File/Save As/Image Sequenceв.
Good luck.

- Jim

The Jackson Laboratory

‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
//
// This function expands an nii file into separate tif files, one per
z-layer
//
function split_nii(BaseDir, SampleName)
{
    SampleFile = BaseDir + SampleName + ".nii";
    DirName = BaseDir + SampleName;
    BioFormatsParams = "open=" + SampleFile + " color_mode=Default
view=Hyperstack stack_order=XYCZT use_virtual_stack";
    run("Bio-Formats Importer", BioFormatsParams);
    File.mkdir(DirName);
    SequenceParams = "format=TIFF name=slice_z digits=3 save=" + DirName;
    run("Image Sequence... ", SequenceParams);
    close();
}

//
// This function processes a directory of nii files.
// For each nii file a corresponding directory is created and
// populated with the tif files corresponding to the slices.
//
function ProcessDirectoryOfFiles(BaseDir)
{
    write("Processing all nii files in directory: " + BaseDir);
    FileList = getFileList(BaseDir);
    for (i=0; i<FileList.length; i++)
    {
        if (endsWith(FileList[i], ".nii"))
        {
            write("    " + FileList[i]);
            SimpleName = replace(FileList[i], ".nii", "");
            split_nii(BaseDir, SimpleName);
        }
    }
    write("    Done");
}

function main()
{
    setBatchMode(true);                                // prevent the
image window
    write("Select directory containing nii files...");  // Write a prompt
to the log window
    BaseDir = getDirectory(".");                       // Pop up the file
select dialog
    ProcessDirectoryOfFiles(BaseDir);                  // Process all nii
files in the directory
}

main();



‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹




On 2/5/18, 3:42 PM, "ImageJ Interest Group on behalf of csadangi"
<[hidden email] on behalf of [hidden email]> wrote:

>Hi,
>
>I have a few questions:
>1) I am using a Leica Confocal SP8 and the files are .lif. When I drag the
>experimental file to ImageJ, it opens up a console with warning (attached
>screenshot). Will it affect my images in any way?
><http://imagej.1557.x6.nabble.com/file/t379887/1.gif>
>2) I also get a Bio-format option but I just click ok with the default
>settings. Should I change anything? (attached screenshot)
><http://imagej.1557.x6.nabble.com/file/t379887/2.jpg>
>3) Once I open a series, it only shows up as blue in color. But while
>imaging, I used blue, green and red channels. How can I view them in their
>original channels?
>4) Is there a way to extract each image as a separate file using ImageJ? I
>took over 30 images and some z-Stacks, can I save them as individual
>files?
>
>5) I want to calculate the fluorescence intensity at the membrane. I
>found a
>paper describing the same but I am unclear as how to calculate the peak
>intensity. I have attached a screenshot for the same
><http://imagej.1557.x6.nabble.com/file/t379887/3.jpg> .
>
>My specific questions are:
>a) How did they draw two lines in the image. I drew one line and clicked
>draw, but when I tried to draw the second line the first line disappeared.
>b) What do they mean by 2 values/line?
>c) How did they calculate the distance?
>d) Is the distance between peak 1 and peak 2 the fluorescence intensity?
>e) Should I just measure the center of the circle to calculate the
>intensity?
>The link to the complete paper is here:
>https://elifesciences.org/articles/28270/figures
>
>Thank you in advance for helping me.
>
>
>
>-----
>----
>Chinmaya
>Medical University Innsbruck
>Innsbruck
>Austria
>--
>Sent from: http://imagej.1557.x6.nabble.com/
>
>--
>ImageJ mailing list: http://imagej.nih.gov/ij/list.html

---

The information in this email, including attachments, may be confidential and is intended solely for the addressee(s). If you believe you received this email by mistake, please notify the sender by return email as soon as possible.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Splitting images & Histograms

Chloe van Oostende
In reply to this post by csadangi
Hi,
1)It is not going to affect the definition of the image
2 and 4) Select Open Files individually. Because of the Memory of your
computer I'm worried that you will not be able to open all 30 series in the
same time. Once you have the second  "Bio-Formats Series Options" window,
select the series you want to open at once.
3)I'm not having this issue with the SP5. In the color mode you might try
"composite" or "colorized". With the composite you can use the "channels
tool" to have one or several channels displayed in the same time.
5)They are just showing a line plot. The two pics correspond to the
Intensity at the two opposite side of the cell. They draw two plot profiles
(can be sequential) and get the value of the peak, then average all 4 peak
values. (1- Draw a line crossing the cell, then go to Analyze/Plot Profile.
On the new window, get the "list" and you can export the intensity values
to Excel.
In Excel find the two highest values per line.

You can obviously create a Macro to automate all these steps.

Hope this will help
Good luck
Best
Chloe


*Chloë van Oostende, PhD*
Chair,* Plant Science* session
Canadian Microscopy and Cytometry Symposium 2017

Facility manager- Senior Microscopy specialist
*Cell Biology and Image Acquisition Core Facility*
Faculty of Medicine
University of Ottawa
RGN 3171
451 Smyth Road
Ottawa, ON K1H 8M5
Office: 613-562-5800 ext: 8376

http://www.chloevanoostende.net
CBIA core facility
<http://www.med.uottawa.ca/research/corelabs/CoreLabs_CBIA/eng/>

2018-02-05 15:42 GMT-05:00 csadangi <[hidden email]>:

> Hi,
>
> I have a few questions:
> 1) I am using a Leica Confocal SP8 and the files are .lif. When I drag the
> experimental file to ImageJ, it opens up a console with warning (attached
> screenshot). Will it affect my images in any way?
> <http://imagej.1557.x6.nabble.com/file/t379887/1.gif>
> 2) I also get a Bio-format option but I just click ok with the default
> settings. Should I change anything? (attached screenshot)
> <http://imagej.1557.x6.nabble.com/file/t379887/2.jpg>
> 3) Once I open a series, it only shows up as blue in color. But while
> imaging, I used blue, green and red channels. How can I view them in their
> original channels?
> 4) Is there a way to extract each image as a separate file using ImageJ? I
> took over 30 images and some z-Stacks, can I save them as individual files?
>
> 5) I want to calculate the fluorescence intensity at the membrane. I found
> a
> paper describing the same but I am unclear as how to calculate the peak
> intensity. I have attached a screenshot for the same
> <http://imagej.1557.x6.nabble.com/file/t379887/3.jpg> .
>
> My specific questions are:
> a) How did they draw two lines in the image. I drew one line and clicked
> draw, but when I tried to draw the second line the first line disappeared.
> b) What do they mean by 2 values/line?
> c) How did they calculate the distance?
> d) Is the distance between peak 1 and peak 2 the fluorescence intensity?
> e) Should I just measure the center of the circle to calculate the
> intensity?
> The link to the complete paper is here:
> https://elifesciences.org/articles/28270/figures
>
> Thank you in advance for helping me.
>
>
>
> -----
> ----
> Chinmaya
> Medical University Innsbruck
> Innsbruck
> Austria
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Splitting images & Histograms

csadangi
Hi,
1)It is not going to affect the definition of the image
2 and 4) Select Open Files individually. Because of the Memory of your
computer I'm worried that you will not be able to open all 30 series in the
same time. Once you have the second  "Bio-Formats Series Options" window,
select the series you want to open at once.
3)I'm not having this issue with the SP5. In the color mode you might try
"composite" or "colorized". With the composite you can use the "channels
tool" to have one or several channels displayed in the same time.
5)They are just showing a line plot. The two pics correspond to the
Intensity at the two opposite side of the cell. They draw two plot profiles
(can be sequential) and get the value of the peak, then average all 4 peak
values. (1- Draw a line crossing the cell, then go to Analyze/Plot Profile.
On the new window, get the "list" and you can export the intensity values
to Excel.
In Excel find the two highest values per line.

You can obviously create a Macro to automate all these steps.
-----------------------------------
When I open the files on Windows computer, I have the problem that it shows
only one colour. But if I open the files in Mac, then I can see the three
different colours.

5) How can I have the lines drawn like in the paper? What should be done
after I find the two highest values?

Thanks.



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Splitting images & Histograms

csadangi
In reply to this post by Jim Peterson
Thank you Jim for the macro. I will try and see if it helps. Could you please
help with question number 5?

Thanks



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Splitting images & Histograms

Chloe van Oostende
In reply to this post by csadangi
Hi,
The two highest values are your plasma membrane fluorescent intensity, so
you average them. Calculate several cells and you can after get
statistically relevant data.
I bet that what they draw in the paper fig 6S1A, is not from Fiji. They
just made a nice figure, didactic.
What you care about are the data from the "Plot profile" tool in Fiji.
To make as nice as Fig 6S1A, use Powerpoint or Illustrator in order to
explain what you are doing.

Best,
Chloe

*Chloë van Oostende, PhD*
Chair,* Plant Science* session
Canadian Microscopy and Cytometry Symposium 2017

Facility manager- Senior Microscopy specialist
*Cell Biology and Image Acquisition Core Facility*
Faculty of Medicine
University of Ottawa
RGN 3171
451 Smyth Road
Ottawa, ON K1H 8M5
Office: 613-562-5800 ext: 8376

http://www.chloevanoostende.net
CBIA core facility
<http://www.med.uottawa.ca/research/corelabs/CoreLabs_CBIA/eng/>

2018-02-06 12:43 GMT-05:00 csadangi <[hidden email]>:

> Hi,
> 1)It is not going to affect the definition of the image
> 2 and 4) Select Open Files individually. Because of the Memory of your
> computer I'm worried that you will not be able to open all 30 series in the
> same time. Once you have the second  "Bio-Formats Series Options" window,
> select the series you want to open at once.
> 3)I'm not having this issue with the SP5. In the color mode you might try
> "composite" or "colorized". With the composite you can use the "channels
> tool" to have one or several channels displayed in the same time.
> 5)They are just showing a line plot. The two pics correspond to the
> Intensity at the two opposite side of the cell. They draw two plot profiles
> (can be sequential) and get the value of the peak, then average all 4 peak
> values. (1- Draw a line crossing the cell, then go to Analyze/Plot Profile.
> On the new window, get the "list" and you can export the intensity values
> to Excel.
> In Excel find the two highest values per line.
>
> You can obviously create a Macro to automate all these steps.
> -----------------------------------
> When I open the files on Windows computer, I have the problem that it shows
> only one colour. But if I open the files in Mac, then I can see the three
> different colours.
>
> 5) How can I have the lines drawn like in the paper? What should be done
> after I find the two highest values?
>
> Thanks.
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Splitting images & Histograms

Chloe van Oostende
In reply to this post by csadangi
Also to clarify,   the two lines are drawn separately. The graph in the
paper shows only one of the two line plot, not a combination of the two...
It says Peak 1 and Peak 2, corresponding to point 1 and 2 in the figure
beside.

Best,
Chloe

*Chloë van Oostende, PhD*
Chair,* Plant Science* session
Canadian Microscopy and Cytometry Symposium 2017

Facility manager- Senior Microscopy specialist
*Cell Biology and Image Acquisition Core Facility*
Faculty of Medicine
University of Ottawa
RGN 3171
451 Smyth Road
Ottawa, ON K1H 8M5
Office: 613-562-5800 ext: 8376

http://www.chloevanoostende.net
CBIA core facility
<http://www.med.uottawa.ca/research/corelabs/CoreLabs_CBIA/eng/>

2018-02-06 12:45 GMT-05:00 csadangi <[hidden email]>:

> Thank you Jim for the macro. I will try and see if it helps. Could you
> please
> help with question number 5?
>
> Thanks
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Splitting images & Histograms

csadangi
In reply to this post by Chloe van Oostende
Thank you for the explanation.

Can you suggest another way to calculate the fluorescence intensity other
than the method described?



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Splitting images & Histograms

csadangi
In reply to this post by Chloe van Oostende
I tried what you suggested. First I drew a Vertical line and measured the
plot profile. I exported it to an excel sheet and looked for the two highest
values:
X = 0.848; y = 141.41 - vertical
X = 3.39; y = 106.44

I repeated the same step by drawing a horizontal line
X = 1.13; Y = 60,77 - Horizontal
X = 3.10; Y = 106.14

I averaged all the Y values and got 103.69. Can I mention this value as an
arbitrary unit (A.U.) as they do it in the paper? How can I define an
arbitrary unit? Also, do you suggest doing similar calculations for a number
of other cells and then doing statistics? In the paper they say "The peak
values of each line (2 values/line) were used to calculate peak fluorescent
intensity of KCC2 at the membrane". So, can I say the peak fluorescent
intensity of the membrane is 103.69 au

Another doubt I have is that I cannot change the X-axis to log value as they
show it in the paper. I changed the X-axis from Set Range option to display
as log value, but it didn't change and it still shows in microns.



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Splitting images & Histograms

Chloe van Oostende
Hi,
First, you need to make sure you are in focus, or the best is to do a sum
projection of a z-stack to properly quantify the membrane localisation.
I find weird you get a 60.77 AU for one value. Did you draw the line in a
region where there is no proteins at the plasma membrane?
Otherwise, yes, 103.69 is your A.U, and yes, you need to have several cells
to measure...Usually 20 to 50 cells should be used.

For the distance, you can see that they wrote on the top of the graph. you
can calculate the natural logarithm from your x values if you want, but you
can also leave it in um as well ;)

Best,
Chloe

*Chloë van Oostende, PhD*
Chair,* Plant Science* session
Canadian Microscopy and Cytometry Symposium 2017

Facility manager- Senior Microscopy specialist
*Cell Biology and Image Acquisition Core Facility*
Faculty of Medicine
University of Ottawa
RGN 3171
451 Smyth Road
Ottawa, ON K1H 8M5
Office: 613-562-5800 ext: 8376

http://www.chloevanoostende.net
CBIA core facility
<http://www.med.uottawa.ca/research/corelabs/CoreLabs_CBIA/eng/>

2018-02-07 20:03 GMT-05:00 csadangi <[hidden email]>:

> I tried what you suggested. First I drew a Vertical line and measured the
> plot profile. I exported it to an excel sheet and looked for the two
> highest
> values:
> X = 0.848; y = 141.41 - vertical
> X = 3.39; y = 106.44
>
> I repeated the same step by drawing a horizontal line
> X = 1.13; Y = 60,77 - Horizontal
> X = 3.10; Y = 106.14
>
> I averaged all the Y values and got 103.69. Can I mention this value as an
> arbitrary unit (A.U.) as they do it in the paper? How can I define an
> arbitrary unit? Also, do you suggest doing similar calculations for a
> number
> of other cells and then doing statistics? In the paper they say "The peak
> values of each line (2 values/line) were used to calculate peak fluorescent
> intensity of KCC2 at the membrane". So, can I say the peak fluorescent
> intensity of the membrane is 103.69 au
>
> Another doubt I have is that I cannot change the X-axis to log value as
> they
> show it in the paper. I changed the X-axis from Set Range option to display
> as log value, but it didn't change and it still shows in microns.
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html