Trakem2- importing sequence as a grid

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Trakem2- importing sequence as a grid

Stoyan Pavlov
Dear friends,
I recently started using TRAKEM2 for the stitching of microscopic mosaics.
The thing I like the most is that it allows to export flattened (stitched
and blended) image of any size. However I hit a bump and I hope someone can
help:
When I import sequence of images the tiles in every other row in the
resulting grid are in reverse order. I guess the reason for this is that
the plugin is importing the tiles in comb-like fashion. Is there a way to
modify this behaviour in order to load the images in meander-like order,
similarly to the sequential-continuous import in the MIST plugin (I like
this plugin very much also, but unfortunately it doesn't allow the export
of images >2 GPx).
In other words TrakEM2 imports sequences now like this:
123
456
789

Is there a way to force it to import them like this:
123
654
789

Thank you in advance

Stoyan
---
Dr. Stoyan P. Pavlov, MD, PhD
Departament of Anatomy, Histology and Embryology
Medical University "Prof. Dr. Paraskev Stoyanov", Varna
Prof. Marin Drinov Str.55
9002 Varna
 Bulgaria
Tel: +359 (0) 52 - 677 - 052
e-mail: [hidden email]
           [hidden email]

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

Re: Trakem2- importing sequence as a grid

Saalfeld, Stephan
Hi,

the easiest way to import custom acquisition patterns is to generate an
import file and use "Import from text file".  It is very easy to
generate such import file with e.g. Excel, OpenOffice Calc, or the
scripting language of your choice if your pattern is moderately
regular.  If it's not, you have to do it anyways.  This question has
been answered multiple times at various mailing lists but Web-Search is
hard if you do not know the terms yet ;)

Here they are: "import text file TrakEM2"

Documentation is here

https://www.ini.uzh.ch/~acardona/trakem2_manual.html#importing_list

Cheers,
Stephan

On Fri, 2016-11-18 at 14:12 +0200, Stoyan Pavlov wrote:

> Dear friends,
> I recently started using TRAKEM2 for the stitching of microscopic
> mosaics.
> The thing I like the most is that it allows to export flattened
> (stitched
> and blended) image of any size. However I hit a bump and I hope
> someone can
> help:
> When I import sequence of images the tiles in every other row in the
> resulting grid are in reverse order. I guess the reason for this is
> that
> the plugin is importing the tiles in comb-like fashion. Is there a
> way to
> modify this behaviour in order to load the images in meander-like
> order,
> similarly to the sequential-continuous import in the MIST plugin (I
> like
> this plugin very much also, but unfortunately it doesn't allow the
> export
> of images >2 GPx).
> In other words TrakEM2 imports sequences now like this:
> 123
> 456
> 789
>
> Is there a way to force it to import them like this:
> 123
> 654
> 789
>
> Thank you in advance
>
> Stoyan
> ---
> Dr. Stoyan P. Pavlov, MD, PhD
> Departament of Anatomy, Histology and Embryology
> Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> Prof. Marin Drinov Str.55
> 9002 Varna
>  Bulgaria
> Tel: +359 (0) 52 - 677 - 052
> e-mail: [hidden email]
>            [hidden email]
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Trakem2- importing sequence as a grid

Stoyan Pavlov
Hi Stephan,
Thank you for your answer. I know about the text file import feature.
The problem is that it is not that easy to generate the list: I am talking
about more than 5000 images here.
The trakem2 manual btw was the first source I consulted.
Best regards
Stoyan

---
Dr. Stoyan P. Pavlov, MD, PhD
Departament of Anatomy, Histology and Embryology
Medical University "Prof. Dr. Paraskev Stoyanov", Varna
Prof. Marin Drinov Str.55
9002 Varna
 Bulgaria
Tel: +359 (0) 52 - 677 - 052
e-mail: [hidden email]
           [hidden email]

2016-11-19 1:24 GMT+02:00 Stoyan Pavlov <[hidden email]>:

> Hi Stephan,
> Thank you for your answer. I know about the text file import feature.
> The problem is that it is not that easy to generate the list: I am talking
> about more than 5000 images here.
> Best regards
> Stoyan
>
> ---
> Dr. Stoyan P. Pavlov, MD, PhD
> Departament of Anatomy, Histology and Embryology
> Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> Prof. Marin Drinov Str.55
> 9002 Varna
>  Bulgaria
> Tel: +359 (0) 52 - 677 - 052
> e-mail: [hidden email]
>            [hidden email]
>
> 2016-11-18 18:07 GMT+02:00 Saalfeld, Stephan <[hidden email]>:
>
>> Hi,
>>
>> the easiest way to import custom acquisition patterns is to generate an
>> import file and use "Import from text file".  It is very easy to
>> generate such import file with e.g. Excel, OpenOffice Calc, or the
>> scripting language of your choice if your pattern is moderately
>> regular.  If it's not, you have to do it anyways.  This question has
>> been answered multiple times at various mailing lists but Web-Search is
>> hard if you do not know the terms yet ;)
>>
>> Here they are: "import text file TrakEM2"
>>
>> Documentation is here
>>
>> https://www.ini.uzh.ch/~acardona/trakem2_manual.html#importing_list
>>
>> Cheers,
>> Stephan
>>
>> On Fri, 2016-11-18 at 14:12 +0200, Stoyan Pavlov wrote:
>> > Dear friends,
>> > I recently started using TRAKEM2 for the stitching of microscopic
>> > mosaics.
>> > The thing I like the most is that it allows to export flattened
>> > (stitched
>> > and blended) image of any size. However I hit a bump and I hope
>> > someone can
>> > help:
>> > When I import sequence of images the tiles in every other row in the
>> > resulting grid are in reverse order. I guess the reason for this is
>> > that
>> > the plugin is importing the tiles in comb-like fashion. Is there a
>> > way to
>> > modify this behaviour in order to load the images in meander-like
>> > order,
>> > similarly to the sequential-continuous import in the MIST plugin (I
>> > like
>> > this plugin very much also, but unfortunately it doesn't allow the
>> > export
>> > of images >2 GPx).
>> > In other words TrakEM2 imports sequences now like this:
>> > 123
>> > 456
>> > 789
>> >
>> > Is there a way to force it to import them like this:
>> > 123
>> > 654
>> > 789
>> >
>> > Thank you in advance
>> >
>> > Stoyan
>> > ---
>> > Dr. Stoyan P. Pavlov, MD, PhD
>> > Departament of Anatomy, Histology and Embryology
>> > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
>> > Prof. Marin Drinov Str.55
>> > 9002 Varna
>> >  Bulgaria
>> > Tel: +359 (0) 52 - 677 - 052
>> > e-mail: [hidden email]
>> >            [hidden email]
>> >
>> > --
>> > 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
Reply | Threaded
Open this post in threaded view
|

Re: Trakem2- importing sequence as a grid

Stoyan Pavlov
I found a way around this:
I feed the images to the MIST plugin (which is great but can't generate
image greater than 2 GPx) and then I parse the global coordinates from the
file generated by it to trakem2 (after editing to fit the trakem2
conventions).

Hopefully this will be solved soon however, because seems like a waste for
processing time.

Best wishes ,
 Stoyan

---
Dr. Stoyan P. Pavlov, MD, PhD
Departament of Anatomy, Histology and Embryology
Medical University "Prof. Dr. Paraskev Stoyanov", Varna
Prof. Marin Drinov Str.55
9002 Varna
 Bulgaria
Tel: +359 (0) 52 - 677 - 052
e-mail: [hidden email]
           [hidden email]

2016-11-19 1:25 GMT+02:00 Stoyan Pavlov <[hidden email]>:

> Hi Stephan,
> Thank you for your answer. I know about the text file import feature.
> The problem is that it is not that easy to generate the list: I am talking
> about more than 5000 images here.
> The trakem2 manual btw was the first source I consulted.
> Best regards
> Stoyan
>
> ---
> Dr. Stoyan P. Pavlov, MD, PhD
> Departament of Anatomy, Histology and Embryology
> Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> Prof. Marin Drinov Str.55
> 9002 Varna
>  Bulgaria
> Tel: +359 (0) 52 - 677 - 052
> e-mail: [hidden email]
>            [hidden email]
>
> 2016-11-19 1:24 GMT+02:00 Stoyan Pavlov <[hidden email]>:
>
>> Hi Stephan,
>> Thank you for your answer. I know about the text file import feature.
>> The problem is that it is not that easy to generate the list: I am
>> talking about more than 5000 images here.
>> Best regards
>> Stoyan
>>
>> ---
>> Dr. Stoyan P. Pavlov, MD, PhD
>> Departament of Anatomy, Histology and Embryology
>> Medical University "Prof. Dr. Paraskev Stoyanov", Varna
>> Prof. Marin Drinov Str.55
>> 9002 Varna
>>  Bulgaria
>> Tel: +359 (0) 52 - 677 - 052
>> e-mail: [hidden email]
>>            [hidden email]
>>
>> 2016-11-18 18:07 GMT+02:00 Saalfeld, Stephan <[hidden email]>
>> :
>>
>>> Hi,
>>>
>>> the easiest way to import custom acquisition patterns is to generate an
>>> import file and use "Import from text file".  It is very easy to
>>> generate such import file with e.g. Excel, OpenOffice Calc, or the
>>> scripting language of your choice if your pattern is moderately
>>> regular.  If it's not, you have to do it anyways.  This question has
>>> been answered multiple times at various mailing lists but Web-Search is
>>> hard if you do not know the terms yet ;)
>>>
>>> Here they are: "import text file TrakEM2"
>>>
>>> Documentation is here
>>>
>>> https://www.ini.uzh.ch/~acardona/trakem2_manual.html#importing_list
>>>
>>> Cheers,
>>> Stephan
>>>
>>> On Fri, 2016-11-18 at 14:12 +0200, Stoyan Pavlov wrote:
>>> > Dear friends,
>>> > I recently started using TRAKEM2 for the stitching of microscopic
>>> > mosaics.
>>> > The thing I like the most is that it allows to export flattened
>>> > (stitched
>>> > and blended) image of any size. However I hit a bump and I hope
>>> > someone can
>>> > help:
>>> > When I import sequence of images the tiles in every other row in the
>>> > resulting grid are in reverse order. I guess the reason for this is
>>> > that
>>> > the plugin is importing the tiles in comb-like fashion. Is there a
>>> > way to
>>> > modify this behaviour in order to load the images in meander-like
>>> > order,
>>> > similarly to the sequential-continuous import in the MIST plugin (I
>>> > like
>>> > this plugin very much also, but unfortunately it doesn't allow the
>>> > export
>>> > of images >2 GPx).
>>> > In other words TrakEM2 imports sequences now like this:
>>> > 123
>>> > 456
>>> > 789
>>> >
>>> > Is there a way to force it to import them like this:
>>> > 123
>>> > 654
>>> > 789
>>> >
>>> > Thank you in advance
>>> >
>>> > Stoyan
>>> > ---
>>> > Dr. Stoyan P. Pavlov, MD, PhD
>>> > Departament of Anatomy, Histology and Embryology
>>> > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
>>> > Prof. Marin Drinov Str.55
>>> > 9002 Varna
>>> >  Bulgaria
>>> > Tel: +359 (0) 52 - 677 - 052
>>> > e-mail: [hidden email]
>>> >            [hidden email]
>>> >
>>> > --
>>> > 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
Reply | Threaded
Open this post in threaded view
|

Re: Trakem2- importing sequence as a grid

Albert Cardona-2
Hi Stoyan,

TrakEM2 offers the text import so that any arbitrary tile layout can be
specified. A small script could do the work for you. If you can't write it,
perhaps a colleague or someone in your institution software services could
do it for you.

Best,

Albert Cardona

2016-11-23 19:29 GMT+00:00 Stoyan Pavlov <[hidden email]>:

> I found a way around this:
> I feed the images to the MIST plugin (which is great but can't generate
> image greater than 2 GPx) and then I parse the global coordinates from the
> file generated by it to trakem2 (after editing to fit the trakem2
> conventions).
>
> Hopefully this will be solved soon however, because seems like a waste for
> processing time.
>
> Best wishes ,
>  Stoyan
>
> ---
> Dr. Stoyan P. Pavlov, MD, PhD
> Departament of Anatomy, Histology and Embryology
> Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> Prof. Marin Drinov Str.55
> 9002 Varna
>  Bulgaria
> Tel: +359 (0) 52 - 677 - 052
> e-mail: [hidden email]
>            [hidden email]
>
> 2016-11-19 1:25 GMT+02:00 Stoyan Pavlov <[hidden email]>:
>
> > Hi Stephan,
> > Thank you for your answer. I know about the text file import feature.
> > The problem is that it is not that easy to generate the list: I am
> talking
> > about more than 5000 images here.
> > The trakem2 manual btw was the first source I consulted.
> > Best regards
> > Stoyan
> >
> > ---
> > Dr. Stoyan P. Pavlov, MD, PhD
> > Departament of Anatomy, Histology and Embryology
> > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> > Prof. Marin Drinov Str.55
> > 9002 Varna
> >  Bulgaria
> > Tel: +359 (0) 52 - 677 - 052
> > e-mail: [hidden email]
> >            [hidden email]
> >
> > 2016-11-19 1:24 GMT+02:00 Stoyan Pavlov <[hidden email]>:
> >
> >> Hi Stephan,
> >> Thank you for your answer. I know about the text file import feature.
> >> The problem is that it is not that easy to generate the list: I am
> >> talking about more than 5000 images here.
> >> Best regards
> >> Stoyan
> >>
> >> ---
> >> Dr. Stoyan P. Pavlov, MD, PhD
> >> Departament of Anatomy, Histology and Embryology
> >> Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> >> Prof. Marin Drinov Str.55
> >> 9002 Varna
> >>  Bulgaria
> >> Tel: +359 (0) 52 - 677 - 052
> >> e-mail: [hidden email]
> >>            [hidden email]
> >>
> >> 2016-11-18 18:07 GMT+02:00 Saalfeld, Stephan <
> [hidden email]>
> >> :
> >>
> >>> Hi,
> >>>
> >>> the easiest way to import custom acquisition patterns is to generate an
> >>> import file and use "Import from text file".  It is very easy to
> >>> generate such import file with e.g. Excel, OpenOffice Calc, or the
> >>> scripting language of your choice if your pattern is moderately
> >>> regular.  If it's not, you have to do it anyways.  This question has
> >>> been answered multiple times at various mailing lists but Web-Search is
> >>> hard if you do not know the terms yet ;)
> >>>
> >>> Here they are: "import text file TrakEM2"
> >>>
> >>> Documentation is here
> >>>
> >>> https://www.ini.uzh.ch/~acardona/trakem2_manual.html#importing_list
> >>>
> >>> Cheers,
> >>> Stephan
> >>>
> >>> On Fri, 2016-11-18 at 14:12 +0200, Stoyan Pavlov wrote:
> >>> > Dear friends,
> >>> > I recently started using TRAKEM2 for the stitching of microscopic
> >>> > mosaics.
> >>> > The thing I like the most is that it allows to export flattened
> >>> > (stitched
> >>> > and blended) image of any size. However I hit a bump and I hope
> >>> > someone can
> >>> > help:
> >>> > When I import sequence of images the tiles in every other row in the
> >>> > resulting grid are in reverse order. I guess the reason for this is
> >>> > that
> >>> > the plugin is importing the tiles in comb-like fashion. Is there a
> >>> > way to
> >>> > modify this behaviour in order to load the images in meander-like
> >>> > order,
> >>> > similarly to the sequential-continuous import in the MIST plugin (I
> >>> > like
> >>> > this plugin very much also, but unfortunately it doesn't allow the
> >>> > export
> >>> > of images >2 GPx).
> >>> > In other words TrakEM2 imports sequences now like this:
> >>> > 123
> >>> > 456
> >>> > 789
> >>> >
> >>> > Is there a way to force it to import them like this:
> >>> > 123
> >>> > 654
> >>> > 789
> >>> >
> >>> > Thank you in advance
> >>> >
> >>> > Stoyan
> >>> > ---
> >>> > Dr. Stoyan P. Pavlov, MD, PhD
> >>> > Departament of Anatomy, Histology and Embryology
> >>> > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> >>> > Prof. Marin Drinov Str.55
> >>> > 9002 Varna
> >>> >  Bulgaria
> >>> > Tel: +359 (0) 52 - 677 - 052
> >>> > e-mail: [hidden email]
> >>> >            [hidden email]
> >>> >
> >>> > --
> >>> > 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
>



--
http://albert.rierol.net
http://www.janelia.org/lab/cardona-lab
http://www.ini.uzh.ch/~acardona/

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

Re: Trakem2- importing sequence as a grid

Saalfeld, Stephan
In reply to this post by Stoyan Pavlov
Hi,

please find below a Python script that generates a zig-zag sequence
that can be imported as a text file

stepSizeY = 200
stepSizeZ = 1
nColumns = 10
nRows = 20
nSlices = 1000
fileformat = 'image_z%i_row%i_col%i.png'

for z in range(0, nSlices, stepSizeZ):
  for row in range(0, nRows, 2):
    # zig
    for col in range(0, nRows):
      print((fileformat + " %d %d %d") % (z, row, col, row * stepSizeY, col * stepSizeX, z))
    # zag
    for col in range(nRows - 1, -1, -1):
      print((fileformat + " %d %d %d") % (z, row + 1, col, row * stepSizeY + stepSizeY, col * stepSizeX, z))

Best,
Stephan


On Wed, 2016-11-23 at 21:29 +0200, Stoyan Pavlov wrote:

> I found a way around this:
> I feed the images to the MIST plugin (which is great but can't
> generate
> image greater than 2 GPx) and then I parse the global coordinates
> from the
> file generated by it to trakem2 (after editing to fit the trakem2
> conventions).
>
> Hopefully this will be solved soon however, because seems like a
> waste for
> processing time.
>
> Best wishes ,
>  Stoyan
>
> ---
> Dr. Stoyan P. Pavlov, MD, PhD
> Departament of Anatomy, Histology and Embryology
> Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> Prof. Marin Drinov Str.55
> 9002 Varna
>  Bulgaria
> Tel: +359 (0) 52 - 677 - 052
> e-mail: [hidden email]
>            [hidden email]
>
> 2016-11-19 1:25 GMT+02:00 Stoyan Pavlov <[hidden email]>:
>
> >
> > Hi Stephan,
> > Thank you for your answer. I know about the text file import
> > feature.
> > The problem is that it is not that easy to generate the list: I am
> > talking
> > about more than 5000 images here.
> > The trakem2 manual btw was the first source I consulted.
> > Best regards
> > Stoyan
> >
> > ---
> > Dr. Stoyan P. Pavlov, MD, PhD
> > Departament of Anatomy, Histology and Embryology
> > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> > Prof. Marin Drinov Str.55
> > 9002 Varna
> >  Bulgaria
> > Tel: +359 (0) 52 - 677 - 052
> > e-mail: [hidden email]
> >            [hidden email]
> >
> > 2016-11-19 1:24 GMT+02:00 Stoyan Pavlov <[hidden email]>:
> >
> > >
> > > Hi Stephan,
> > > Thank you for your answer. I know about the text file import
> > > feature.
> > > The problem is that it is not that easy to generate the list: I
> > > am
> > > talking about more than 5000 images here.
> > > Best regards
> > > Stoyan
> > >
> > > ---
> > > Dr. Stoyan P. Pavlov, MD, PhD
> > > Departament of Anatomy, Histology and Embryology
> > > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> > > Prof. Marin Drinov Str.55
> > > 9002 Varna
> > >  Bulgaria
> > > Tel: +359 (0) 52 - 677 - 052
> > > e-mail: [hidden email]
> > >            [hidden email]
> > >
> > > 2016-11-18 18:07 GMT+02:00 Saalfeld, Stephan <[hidden email]
> > > hmi.org>
> > > :
> > >
> > > >
> > > > Hi,
> > > >
> > > > the easiest way to import custom acquisition patterns is to
> > > > generate an
> > > > import file and use "Import from text file".  It is very easy
> > > > to
> > > > generate such import file with e.g. Excel, OpenOffice Calc, or
> > > > the
> > > > scripting language of your choice if your pattern is moderately
> > > > regular.  If it's not, you have to do it anyways.  This
> > > > question has
> > > > been answered multiple times at various mailing lists but Web-
> > > > Search is
> > > > hard if you do not know the terms yet ;)
> > > >
> > > > Here they are: "import text file TrakEM2"
> > > >
> > > > Documentation is here
> > > >
> > > > https://www.ini.uzh.ch/~acardona/trakem2_manual.html#importing_
> > > > list
> > > >
> > > > Cheers,
> > > > Stephan
> > > >
> > > > On Fri, 2016-11-18 at 14:12 +0200, Stoyan Pavlov wrote:
> > > > >
> > > > > Dear friends,
> > > > > I recently started using TRAKEM2 for the stitching of
> > > > > microscopic
> > > > > mosaics.
> > > > > The thing I like the most is that it allows to export
> > > > > flattened
> > > > > (stitched
> > > > > and blended) image of any size. However I hit a bump and I
> > > > > hope
> > > > > someone can
> > > > > help:
> > > > > When I import sequence of images the tiles in every other row
> > > > > in the
> > > > > resulting grid are in reverse order. I guess the reason for
> > > > > this is
> > > > > that
> > > > > the plugin is importing the tiles in comb-like fashion. Is
> > > > > there a
> > > > > way to
> > > > > modify this behaviour in order to load the images in meander-
> > > > > like
> > > > > order,
> > > > > similarly to the sequential-continuous import in the MIST
> > > > > plugin (I
> > > > > like
> > > > > this plugin very much also, but unfortunately it doesn't
> > > > > allow the
> > > > > export
> > > > > of images >2 GPx).
> > > > > In other words TrakEM2 imports sequences now like this:
> > > > > 123
> > > > > 456
> > > > > 789
> > > > >
> > > > > Is there a way to force it to import them like this:
> > > > > 123
> > > > > 654
> > > > > 789
> > > > >
> > > > > Thank you in advance
> > > > >
> > > > > Stoyan
> > > > > ---
> > > > > Dr. Stoyan P. Pavlov, MD, PhD
> > > > > Departament of Anatomy, Histology and Embryology
> > > > > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> > > > > Prof. Marin Drinov Str.55
> > > > > 9002 Varna
> > > > >  Bulgaria
> > > > > Tel: +359 (0) 52 - 677 - 052
> > > > > e-mail: [hidden email]
> > > > >            [hidden email]
> > > > >
> > > > > --
> > > > > 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

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Trakem2- importing sequence as a grid

Stoyan Pavlov
Thank you very much, Stefan!
Most appreciated! I owe you one!

On Nov 28, 2016 17:47, "Saalfeld, Stephan" <[hidden email]>
wrote:

> Hi,
>
> please find below a Python script that generates a zig-zag sequence
> that can be imported as a text file
>
> stepSizeY = 200
> stepSizeZ = 1
> nColumns = 10
> nRows = 20
> nSlices = 1000
> fileformat = 'image_z%i_row%i_col%i.png'
>
> for z in range(0, nSlices, stepSizeZ):
>   for row in range(0, nRows, 2):
>     # zig
>     for col in range(0, nRows):
>       print((fileformat + " %d %d %d") % (z, row, col, row * stepSizeY,
> col * stepSizeX, z))
>     # zag
>     for col in range(nRows - 1, -1, -1):
>       print((fileformat + " %d %d %d") % (z, row + 1, col, row * stepSizeY
> + stepSizeY, col * stepSizeX, z))
>
> Best,
> Stephan
>
>
> On Wed, 2016-11-23 at 21:29 +0200, Stoyan Pavlov wrote:
> > I found a way around this:
> > I feed the images to the MIST plugin (which is great but can't
> > generate
> > image greater than 2 GPx) and then I parse the global coordinates
> > from the
> > file generated by it to trakem2 (after editing to fit the trakem2
> > conventions).
> >
> > Hopefully this will be solved soon however, because seems like a
> > waste for
> > processing time.
> >
> > Best wishes ,
> >  Stoyan
> >
> > ---
> > Dr. Stoyan P. Pavlov, MD, PhD
> > Departament of Anatomy, Histology and Embryology
> > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> > Prof. Marin Drinov Str.55
> > 9002 Varna
> >  Bulgaria
> > Tel: +359 (0) 52 - 677 - 052
> > e-mail: [hidden email]
> >            [hidden email]
> >
> > 2016-11-19 1:25 GMT+02:00 Stoyan Pavlov <[hidden email]>:
> >
> > >
> > > Hi Stephan,
> > > Thank you for your answer. I know about the text file import
> > > feature.
> > > The problem is that it is not that easy to generate the list: I am
> > > talking
> > > about more than 5000 images here.
> > > The trakem2 manual btw was the first source I consulted.
> > > Best regards
> > > Stoyan
> > >
> > > ---
> > > Dr. Stoyan P. Pavlov, MD, PhD
> > > Departament of Anatomy, Histology and Embryology
> > > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> > > Prof. Marin Drinov Str.55
> > > 9002 Varna
> > >  Bulgaria
> > > Tel: +359 (0) 52 - 677 - 052
> > > e-mail: [hidden email]
> > >            [hidden email]
> > >
> > > 2016-11-19 1:24 GMT+02:00 Stoyan Pavlov <[hidden email]>:
> > >
> > > >
> > > > Hi Stephan,
> > > > Thank you for your answer. I know about the text file import
> > > > feature.
> > > > The problem is that it is not that easy to generate the list: I
> > > > am
> > > > talking about more than 5000 images here.
> > > > Best regards
> > > > Stoyan
> > > >
> > > > ---
> > > > Dr. Stoyan P. Pavlov, MD, PhD
> > > > Departament of Anatomy, Histology and Embryology
> > > > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> > > > Prof. Marin Drinov Str.55
> > > > 9002 Varna
> > > >  Bulgaria
> > > > Tel: +359 (0) 52 - 677 - 052
> > > > e-mail: [hidden email]
> > > >            [hidden email]
> > > >
> > > > 2016-11-18 18:07 GMT+02:00 Saalfeld, Stephan <[hidden email]
> > > > hmi.org>
> > > > :
> > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > the easiest way to import custom acquisition patterns is to
> > > > > generate an
> > > > > import file and use "Import from text file".  It is very easy
> > > > > to
> > > > > generate such import file with e.g. Excel, OpenOffice Calc, or
> > > > > the
> > > > > scripting language of your choice if your pattern is moderately
> > > > > regular.  If it's not, you have to do it anyways.  This
> > > > > question has
> > > > > been answered multiple times at various mailing lists but Web-
> > > > > Search is
> > > > > hard if you do not know the terms yet ;)
> > > > >
> > > > > Here they are: "import text file TrakEM2"
> > > > >
> > > > > Documentation is here
> > > > >
> > > > > https://www.ini.uzh.ch/~acardona/trakem2_manual.html#importing_
> > > > > list
> > > > >
> > > > > Cheers,
> > > > > Stephan
> > > > >
> > > > > On Fri, 2016-11-18 at 14:12 +0200, Stoyan Pavlov wrote:
> > > > > >
> > > > > > Dear friends,
> > > > > > I recently started using TRAKEM2 for the stitching of
> > > > > > microscopic
> > > > > > mosaics.
> > > > > > The thing I like the most is that it allows to export
> > > > > > flattened
> > > > > > (stitched
> > > > > > and blended) image of any size. However I hit a bump and I
> > > > > > hope
> > > > > > someone can
> > > > > > help:
> > > > > > When I import sequence of images the tiles in every other row
> > > > > > in the
> > > > > > resulting grid are in reverse order. I guess the reason for
> > > > > > this is
> > > > > > that
> > > > > > the plugin is importing the tiles in comb-like fashion. Is
> > > > > > there a
> > > > > > way to
> > > > > > modify this behaviour in order to load the images in meander-
> > > > > > like
> > > > > > order,
> > > > > > similarly to the sequential-continuous import in the MIST
> > > > > > plugin (I
> > > > > > like
> > > > > > this plugin very much also, but unfortunately it doesn't
> > > > > > allow the
> > > > > > export
> > > > > > of images >2 GPx).
> > > > > > In other words TrakEM2 imports sequences now like this:
> > > > > > 123
> > > > > > 456
> > > > > > 789
> > > > > >
> > > > > > Is there a way to force it to import them like this:
> > > > > > 123
> > > > > > 654
> > > > > > 789
> > > > > >
> > > > > > Thank you in advance
> > > > > >
> > > > > > Stoyan
> > > > > > ---
> > > > > > Dr. Stoyan P. Pavlov, MD, PhD
> > > > > > Departament of Anatomy, Histology and Embryology
> > > > > > Medical University "Prof. Dr. Paraskev Stoyanov", Varna
> > > > > > Prof. Marin Drinov Str.55
> > > > > > 9002 Varna
> > > > > >  Bulgaria
> > > > > > Tel: +359 (0) 52 - 677 - 052
> > > > > > e-mail: [hidden email]
> > > > > >            [hidden email]
> > > > > >
> > > > > > --
> > > > > > 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

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