Dear TrakEM2 users,
I am starting large volume reconstruction of serial sections. We are acquiring the images using multiple image alignment and so far, I have been very successful stitching the images using the "Grid/collection stitching" plug-in. But I couldn't find the path to it through TrakEM2. My pictures were acquired in a snake like order. So when I use the "Importing a sequence as a grid or montage", they are not arranged properly, and the stitching algorithm fails to create the global picture. So I currently create the stitch with the "Grid/collection stitching" plug-in, save them as a tiff and then import the tiffs in TrakEM2. Is there a better way that I couldn't figure out on the wiki ? Thanks in advance for all your help Best Xavier -- Xavier Heiligenstein, PhD Computer Configuration: Intel Core i7-2860QM CPU @ 2.50Ghz RAM: 16,0 GB NVIDIA Quadro 2000M / Intel HD Graphics Family Windows 7-64bits, SP1 Institut Curie, France -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
2012/6/26 Xavier Heiligenstein <[hidden email]>:
> Dear TrakEM2 users, > > I am starting large volume reconstruction of serial sections. We are > acquiring the images using multiple image alignment and so far, I have been > very successful stitching the images using the "Grid/collection stitching" > plug-in. But I couldn't find the path to it through TrakEM2. > My pictures were acquired in a snake like order. So when I use the > "Importing a sequence as a grid or montage", they are not arranged properly, > and the stitching algorithm fails to create the global picture. > So I currently create the stitch with the "Grid/collection stitching" > plug-in, save them as a tiff and then import the tiffs in TrakEM2. > Is there a better way that I couldn't figure out on the wiki ? > > Thanks in advance for all your help > > Best > > Xavier Dear Xavier, TrakEM2 has an "Import - Import from text file", in which every file to import is detailed in one row as follows: /path/to/the/file.tif 0 1 2 ... where the first column is the file path, the second column is the X coordinate, the third column the Y coordinate, and the Z column the Z index. All coordinates in pixels. In this way, any ordering of tiles is supported. In your case, I would output the text file so that the X,Y coordinates are such that tiles overlap a little bit (at least 1 pixel). Then, I would choose the "Align - Montage all images in this layer" and check the box that says "Tiles are roughly in place" to avoid doing an all-to-all tile comparisons, limiting the search for possible tile neighbors to those that overlap. The javadoc for the function underlying the "Import from text file command" has more information about optional columns: http://goo.gl/bcLio Albert -- http://albert.rierol.net http://www.ini.uzh.ch/~acardona/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Albert,
Thank you very much for your very precise and very quick answer. I will prepare my text files accordingly and give a look at the javadoc. Cheers, Xav On 26/06/2012 15:12, Albert Cardona wrote: > 2012/6/26 Xavier Heiligenstein<[hidden email]>: >> Dear TrakEM2 users, >> >> I am starting large volume reconstruction of serial sections. We are >> acquiring the images using multiple image alignment and so far, I have been >> very successful stitching the images using the "Grid/collection stitching" >> plug-in. But I couldn't find the path to it through TrakEM2. >> My pictures were acquired in a snake like order. So when I use the >> "Importing a sequence as a grid or montage", they are not arranged properly, >> and the stitching algorithm fails to create the global picture. >> So I currently create the stitch with the "Grid/collection stitching" >> plug-in, save them as a tiff and then import the tiffs in TrakEM2. >> Is there a better way that I couldn't figure out on the wiki ? >> >> Thanks in advance for all your help >> >> Best >> >> Xavier > > Dear Xavier, > > TrakEM2 has an "Import - Import from text file", in which every file > to import is detailed in one row as follows: > > /path/to/the/file.tif 0 1 2 > > ... where the first column is the file path, the second column is the > X coordinate, the third column the Y coordinate, and the Z column the > Z index. All coordinates in pixels. > > In this way, any ordering of tiles is supported. > > In your case, I would output the text file so that the X,Y coordinates > are such that tiles overlap a little bit (at least 1 pixel). Then, I > would choose the "Align - Montage all images in this layer" and check > the box that says "Tiles are roughly in place" to avoid doing an > all-to-all tile comparisons, limiting the search for possible tile > neighbors to those that overlap. > > The javadoc for the function underlying the "Import from text file > command" has more information about optional columns: > http://goo.gl/bcLio > > Albert > -- Xavier Heiligenstein, PhD Computer Configuration: Intel Core i7-2860QM CPU @ 2.50Ghz RAM: 16,0 GB NVIDIA Quadro 2000M / Intel HD Graphics Family Windows 7-64bits, SP1 Institut Curie, France -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Albert Cardona-2
Hi Xavier and Albert,
...when I remember correctly, even the stitching plugin should be able to export the estimated coordinates for each image in text format instead of generating an image---check the documentation: http://fiji.sc/wiki/index.php/Image_Stitching#I_have_a_known_approximate_arrangement_for_the_tiles_but_it_is_not_any_of_the_grids You should be able to import such text file into an Excel/Libre office table and clean up and re-format it for TrakEM2 with a few replace commands. As far as I know, the correlation based stitching in TrakEM2 is a bit outdated currently. What is up-to-date are feature based and elastic alignment that can both be used likewise for montaging with higher degrees of freedom. Since all those methods share a common pot of libraries, the documentation is spilled over various places---check the following pages as start http://fiji.sc/wiki/index.php/Feature_Extraction http://www.ini.uzh.ch/~acardona/howto.html#stitch_images http://fiji.sc/wiki/index.php/Register_Virtual_Stack_Slices http://fiji.sc/wiki/index.php/Elastic_Alignment_and_Montage http://www.youtube.com/watch?v=gSV0R_su90A Good luck, Stephan > Dear Xavier, > > TrakEM2 has an "Import - Import from text file", in which every file > to import is detailed in one row as follows: > > /path/to/the/file.tif 0 1 2 > > ... where the first column is the file path, the second column is the > X coordinate, the third column the Y coordinate, and the Z column the > Z index. All coordinates in pixels. > > In this way, any ordering of tiles is supported. > > In your case, I would output the text file so that the X,Y coordinates > are such that tiles overlap a little bit (at least 1 pixel). Then, I > would choose the "Align - Montage all images in this layer" and check > the box that says "Tiles are roughly in place" to avoid doing an > all-to-all tile comparisons, limiting the search for possible tile > neighbors to those that overlap. > > The javadoc for the function underlying the "Import from text file > command" has more information about optional columns: > http://goo.gl/bcLio > > Albert > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Stephan,
Thanks for this extra tips and the links. I discovered some new things already. Best Xavier On 26/06/2012 15:37, Stephan Saalfeld wrote: > Hi Xavier and Albert, > > ...when I remember correctly, even the stitching plugin should be able > to export the estimated coordinates for each image in text format > instead of generating an image---check the documentation: > > http://fiji.sc/wiki/index.php/Image_Stitching#I_have_a_known_approximate_arrangement_for_the_tiles_but_it_is_not_any_of_the_grids > > You should be able to import such text file into an Excel/Libre office > table and clean up and re-format it for TrakEM2 with a few replace > commands. > > As far as I know, the correlation based stitching in TrakEM2 is a bit > outdated currently. What is up-to-date are feature based and elastic > alignment that can both be used likewise for montaging with higher > degrees of freedom. Since all those methods share a common pot of > libraries, the documentation is spilled over various places---check the > following pages as start > > http://fiji.sc/wiki/index.php/Feature_Extraction > > http://www.ini.uzh.ch/~acardona/howto.html#stitch_images > > http://fiji.sc/wiki/index.php/Register_Virtual_Stack_Slices > > http://fiji.sc/wiki/index.php/Elastic_Alignment_and_Montage > > http://www.youtube.com/watch?v=gSV0R_su90A > > Good luck, > Stephan > >> Dear Xavier, >> >> TrakEM2 has an "Import - Import from text file", in which every file >> to import is detailed in one row as follows: >> >> /path/to/the/file.tif 0 1 2 >> >> ... where the first column is the file path, the second column is the >> X coordinate, the third column the Y coordinate, and the Z column the >> Z index. All coordinates in pixels. >> >> In this way, any ordering of tiles is supported. >> >> In your case, I would output the text file so that the X,Y coordinates >> are such that tiles overlap a little bit (at least 1 pixel). Then, I >> would choose the "Align - Montage all images in this layer" and check >> the box that says "Tiles are roughly in place" to avoid doing an >> all-to-all tile comparisons, limiting the search for possible tile >> neighbors to those that overlap. >> >> The javadoc for the function underlying the "Import from text file >> command" has more information about optional columns: >> http://goo.gl/bcLio >> >> Albert >> > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- Xavier Heiligenstein, PhD Computer Configuration: Intel Core i7-2860QM CPU @ 2.50Ghz RAM: 16,0 GB NVIDIA Quadro 2000M / Intel HD Graphics Family Windows 7-64bits, SP1 Institut Curie, France -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Albert Cardona-2
Hello,
The following macro portion worked for the past 3 months. The technician tried to use it yesterday, after a 3 week hiatus, and it quit working with ImageJ 1.46r (FIJI), it does work with ImageJ 1.45s the desired behavior is drawing an outline, click 'OK' and trace the midline within this outline, with the outline ROI displayed to guide placement of the beginning and end of the midline. I could work around by drawing the outline to the image, but the show all option doesn't alter the image. setTool("polygon"); waitForUser("Outline the papilla, then click 'OK'."); roiManager("add"); bproi = roiManager("count"); roiManager("select", bproi-1); roiManager("rename","Outline"); run("Select None");//Select None (in Edit > Selection) to release the ROI setOption("Show All",true);//enable/disable 'Show All' in ROIManager setTool("polyLine"); waitForUser("Trace the midline, begin at apex, double-click at tip of base, then click 'OK'."); roiManager("add"); Bug? thanks, Glen MacDonald Core for Communication Research Virginia Merrill Bloedel Hearing Research Center Box 357923 University of Washington Seattle, WA 98195-7923 (206) 616-4156 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
On Jun 29, 2012, at 2:55 PM, Glen H MacDonald wrote:
> Hello, > The following macro portion worked for the past 3 months. The technician tried to use it yesterday, after a 3 week hiatus, and it quit working with ImageJ 1.46r (FIJI), it does work with ImageJ 1.45s > the desired behavior is drawing an outline, click 'OK' and trace the midline within this outline, with the outline ROI displayed to guide placement of the beginning and end of the midline. I could work around by drawing the outline to the image, but the show all option doesn't alter the image. > > setTool("polygon"); > waitForUser("Outline the papilla, then click 'OK'."); > roiManager("add"); > bproi = roiManager("count"); > roiManager("select", bproi-1); > roiManager("rename","Outline"); > run("Select None");//Select None (in Edit > Selection) to release the ROI > setOption("Show All",true);//enable/disable 'Show All' in ROIManager > setTool("polyLine"); > waitForUser("Trace the midline, begin at apex, double-click at tip of base, then click 'OK'."); > roiManager("add"); > > Bug? This bug is fixed in the ImageJ 1.47a daily build or you can work around it by replacing setOption("Show All",true); with roiManager("show all"); -wayne -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thanks Wayne.
By the way, nice article. Glen MacDonald Core for Communication Research Virginia Merrill Bloedel Hearing Research Center Box 357923 University of Washington Seattle, WA 98195-7923 (206) 616-4156 On Fri, 29 Jun 2012, Rasband, Wayne (NIH/NIMH) [E] wrote: > On Jun 29, 2012, at 2:55 PM, Glen H MacDonald wrote: > >> Hello, >> The following macro portion worked for the past 3 months. The technician tried to use it yesterday, after a 3 week hiatus, and it quit working with ImageJ 1.46r (FIJI), it does work with ImageJ 1.45s >> the desired behavior is drawing an outline, click 'OK' and trace the midline within this outline, with the outline ROI displayed to guide placement of the beginning and end of the midline. I could work around by drawing the outline to the image, but the show all option doesn't alter the image. >> >> setTool("polygon"); >> waitForUser("Outline the papilla, then click 'OK'."); >> roiManager("add"); >> bproi = roiManager("count"); >> roiManager("select", bproi-1); >> roiManager("rename","Outline"); >> run("Select None");//Select None (in Edit > Selection) to release the ROI >> setOption("Show All",true);//enable/disable 'Show All' in ROIManager >> setTool("polyLine"); >> waitForUser("Trace the midline, begin at apex, double-click at tip of base, then click 'OK'."); >> roiManager("add"); >> >> Bug? > > This bug is fixed in the ImageJ 1.47a daily build or you can work around it by replacing > > setOption("Show All",true); > > with > > roiManager("show all"); > > -wayne > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |