Login  Register

Re: Conversion OIB into TIFF: bug

Posted by ctrueden on Mar 23, 2016; 4:47pm
URL: http://imagej.273.s1.nabble.com/Conversion-OIB-into-TIFF-bug-tp5015973p5015991.html

Hi Alex,

It looks like your macro is missing the equals sign in the "Merge
Channels..." command after the "yellow" key.

I also see different behavior in my ImageJ when I record a macro that uses
Merge Channels: red is recorded as "c1" and yellow as "c7". So you could
try either or both of those tweaks. I.e.:

    run("Merge Channels...", "c1=[" + red = "] c7=[" + yellow + "] create
ignore");

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - http://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Wed, Mar 23, 2016 at 2:43 AM, Alexander Stephan <
[hidden email]> wrote:

> Hi Curtis,
> Thanks for the help! It partially explains my problem. However, i also
> have the same problem when I use a macro that converts OIB files to TIFF
> files and adjusts the colours. The macro is as follows:
>
> dir1 = getDirectory("Choose Source Directory ");
>   dir2 = getDirectory("Choose Destination Directory ");
>   list = getFileList(dir1);
>   setBatchMode(true);
>   for (i=0; i<list.length; i++) {
>      showProgress(i+1, list.length);
>      name=dir1+list[i];
> run("Bio-Formats Importer", "open=["+name+"] autoscale=false
> color_mode=Grayscale view=Hyperstack stack_order=XYCZT");
> run("Split Channels");
> selectWindow("C2-"+list[i]);
> red=getTitle();
> selectWindow("C1-"+list[i]);
> yellow=getTitle();
> run("Merge Channels...", "red=["+red+"]  yellow["+yellow+"]  create
> ignore");
> saveAs("TIFF", dir2+list[i]);
> }
>
>
> Can you or anyone else help?
>
> Best,
> Alex
> ________________________________________
> Von: ImageJ Interest Group [[hidden email]]&quot; im Auftrag von
> &quot;Curtis Rueden [[hidden email]]
> Gesendet: Dienstag, 22. März 2016 19:26
> An: [hidden email]
> Betreff: Re: Conversion OIB into TIFF: bug
>
> Hi Alexander,
>
> Bio-Formats will adjust the brightness/contrast if (and only if) the
> "Autoscale" option is checked. Otherwise, it will use the default scaling
> for your image's bit depth (which might result in an all-black-looking or
> very dim image; see
>
> http://imagej.net/Troubleshooting#The_image_I_loaded_is_displayed_all_black.21_But_it_is_not_black.21
> ).
>
> When you inspect the pixel values (mouse over a pixel and look at the
> ImageJ main window status bar) of the original OIB file, and the converted
> TIFF file, do they match?
>
> Regards,
> Curtis
>
> --
> Curtis Rueden
> LOCI software architect - http://loci.wisc.edu/software
> ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden
> Did you know ImageJ has a forum? http://forum.imagej.net/
>
>
> On Tue, Mar 22, 2016 at 3:28 AM, Alexander Stephan <
> [hidden email]> wrote:
>
> > Dear ImageJ community,
> >
> > I have some trouble converting OIB files into TIFF files. When using the
> > bio-format plugin in ImageJ or FIJI, the program adjusts brightness
> and/or
> > contrast once I open the images. Sometimes, the problem also occurs when
> > adjusting colors of individual channels via macros. The problem does not
> > always occur, I just can not find out how and under what circumstances.
> Has
> > anyone experienced similar problems?
> > Thanks for the help in advance!
> >
> > Best,
> > Alexander Stephan
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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