Importing an image into Micromanager 2.0?

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

Importing an image into Micromanager 2.0?

Karl Bellve-3


Trying to import a synthetic image data set into Micromanager 2.0 to test KNIME detecting nuclei in images from Micromanager.

Creating a OME Tiff in FIJI and importing that doesn't work but it could be an incorrect setting.

Any tricks?


Cheers Karl

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Nico Stuurman-2
Hi Karl,

On 10/12/17 7:39 AM, Karl Bellve wrote:
> Trying to import a synthetic image data set into Micromanager 2.0 to
> test KNIME detecting nuclei in images from Micromanager.
>
> Creating a OME Tiff in FIJI and importing that doesn't work but it
> could be an incorrect setting.
>
> Any tricks?

That is a great question, and unfortunately, I have no good answers.  MM
is indeed very picky about Metadata, and it is not easily convinced to
read in other TIFF files.  It would be nice to make something less
picky, but if I would need to deal with your issue right now, I may look
into creating a device adapter that reads TIFFs from disk and behaves as
a camera (in fact, such a thing may already exist).

Best,


Nico


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Importing an image into Micromanager 2.0?

Karl Bellve-3
Forgot to reply all...


On Mon, Oct 16, 2017, 5:34 PM Nico Stuurman <[hidden email]> wrote:
Hi Karl,

On 10/12/17 7:39 AM, Karl Bellve wrote:
> Trying to import a synthetic image data set into Micromanager 2.0 to
> test KNIME detecting nuclei in images from Micromanager.
>
> Creating a OME Tiff in FIJI and importing that doesn't work but it
> could be an incorrect setting.
>
> Any tricks?

That is a great question, and unfortunately, I have no good answers.  MM
is indeed very picky about Metadata, and it is not easily convinced to
read in other TIFF files.  It would be nice to make something less
picky, but if I would need to deal with your issue right now, I may look
into creating a device adapter that reads TIFFs from disk and behaves as
a camera (in fact, such a thing may already exist).

Best,


Nico

Hi Nico,

What I think I might do is modify the demo camera to include a 4th option to load an image from file, and every time the camera is snapped, the next image is loaded. I took a look at the demo camera code today and I think it is a fesiable approach. 


Cheers Karl


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Kyle Douglass

Hi Karl,


What I think I might do is modify the demo camera to include a 4th option to load an image from file, and every time the camera is snapped, the next image is loaded. I took a look at the demo camera code today and I think it is a fesiable approach. 



Marcel Stefko, a masters student from our lab, developed a MM 2.0 plugin that reads images from a .tif stack and feeds them through the Live window, effectively simulating an acquisition. It's a bit of a dirty hack since it's implemented at the level of the processing pipeline, i.e. not a device adapter, but you may still find it useful.

https://github.com/LEB-EPFL/ImageInjector

I'm still moving Marcel's work into a consolidated place on Github; until I do, the .jar file is in the Releases section of the original repo: https://github.com/MStefko/ImageInjectorPlugin

A brief description on how to use it may be found in the README and here: http://alica.readthedocs.io/en/latest/simulation.html

We decided against directly modifying the demo camera since it runs on a pretty large code base...

Cheers,
Kyle

-- 
Kyle M. Douglass, PhD
Post-doctoral researcher
The Laboratory of Experimental Biophysics
EPFL, Lausanne, Switzerland
http://kmdouglass.github.io
http://leb.epfl.ch

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Christian Carsten Sachs
In reply to this post by Karl Bellve-3
Hello,

concerning this I'd like to hint to a thread I've started last year:
http://micro-manager.3463995.n2.nabble.com/SimulatingCamera-DeviceAdapter-td7586968.html
  (screenshot link in there expired, here's the new one:
https://fz-juelich.sciebo.de/index.php/s/0pfY1N0vGz5efku )

Similar to Kyle Douglass, I've addressed the question of getting images
into MM for debugging/processing test purposes.

As I'm not using the GUI but merely CMMCore, I've created a
CameraAdapter (based upon the DemoCamera) which fetches images from a
(special) HTTP server process; we're using this to replay time-lapse
experiments and to feed large stitched images (together with coordinates
from the virtual stage) for in silico platform integration tests.

I've opted for the decoupled approach, as implementing all these
different scenarios in C++ would've been somewhat burdensome.

The screenshot shows a dynamically calculated mandelbrot set.

I'm currently investigating the embedding of a Python interpreter within
a DeviceAdapter, to allow for image loading, image generation or image
processing via NumPy+associated ecosystem (tho' it's not ready yet, as
some threading/heap corrupting errors seem to persist).

If there is interest in the current (HTTP retrieving) camera adapter, I
could push the branch to my github.

Best regards,
Christian
  17.10.2017 01:36, Karl Bellve wrote:

> Forgot to reply all...
>
>
> On Mon, Oct 16, 2017, 5:34 PM Nico Stuurman <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Karl,
>
>     On 10/12/17 7:39 AM, Karl Bellve wrote:
>      > Trying to import a synthetic image data set into Micromanager 2.0 to
>      > test KNIME detecting nuclei in images from Micromanager.
>      >
>      > Creating a OME Tiff in FIJI and importing that doesn't work but it
>      > could be an incorrect setting.
>      >
>      > Any tricks?
>
>     That is a great question, and unfortunately, I have no good answers.  MM
>     is indeed very picky about Metadata, and it is not easily convinced to
>     read in other TIFF files.  It would be nice to make something less
>     picky, but if I would need to deal with your issue right now, I may look
>     into creating a device adapter that reads TIFFs from disk and behaves as
>     a camera (in fact, such a thing may already exist).
>
>     Best,
>
>
>     Nico
>
>
> Hi Nico,
>
> What I think I might do is modify the demo camera to include a 4th
> option to load an image from file, and every time the camera is snapped,
> the next image is loaded. I took a look at the demo camera code today
> and I think it is a fesiable approach.
>
>
> Cheers Karl
>
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Karl Bellve-3
In reply to this post by Kyle Douglass


On Tue, Oct 17, 2017 at 2:14 AM Kyle Douglass <[hidden email]> wrote:

Hi Karl,


What I think I might do is modify the demo camera to include a 4th option to load an image from file, and every time the camera is snapped, the next image is loaded. I took a look at the demo camera code today and I think it is a fesiable approach. 



Marcel Stefko, a masters student from our lab, developed a MM 2.0 plugin that reads images from a .tif stack and feeds them through the Live window, effectively simulating an acquisition. It's a bit of a dirty hack since it's implemented at the level of the processing pipeline, i.e. not a device adapter, but you may still find it useful.

https://github.com/LEB-EPFL/ImageInjector

I'm still moving Marcel's work into a consolidated place on Github; until I do, the .jar file is in the Releases section of the original repo: https://github.com/MStefko/ImageInjectorPlugin

A brief description on how to use it may be found in the README and here: http://alica.readthedocs.io/en/latest/simulation.html

We decided against directly modifying the demo camera since it runs on a pretty large code base...

Cheers,
Kyle


Didn't work as expected. I was hoping to snap 1 image, insert 1 image from a tiff file, until end, and then repeat from the beginning. Something odd is happening when I snap a single image where 199 blank images are added, followed by 1 expected image. I have to check the code. I assume it is supposed to be 1:1? 

My version of µManager (2.0 latest on github) seems to be messed up. I can't do Live mode with the demo camera. It sucks up all the memory on my computer....causing it to freeze...

Cheers Karl

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School




 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Karl Bellve-3
In reply to this post by Christian Carsten Sachs


On Tue, Oct 17, 2017 at 6:14 AM Christian Carsten Sachs <[hidden email]> wrote:
Hello,

concerning this I'd like to hint to a thread I've started last year:
http://micro-manager.3463995.n2.nabble.com/SimulatingCamera-DeviceAdapter-td7586968.html

Thanks for the thread. I must have missed it..and I agree with everyone on the thread that we need a way to insert images into µManager for testing purposes...
 

  (screenshot link in there expired, here's the new one:
https://fz-juelich.sciebo.de/index.php/s/0pfY1N0vGz5efku )

Similar to Kyle Douglass, I've addressed the question of getting images
into MM for debugging/processing test purposes.

As I'm not using the GUI but merely CMMCore,

hmmm...I need to run my plugin µmWeb from within µManager, which is how I will be pulling the synthetic images from µManager and giving instructions to µManager. So, I don't think I can get away with just access to CMMCore. 

I could probably push images to µManager via µmWeb (I would write the code for this but easy) and then pull them back out again...but that is circular testing..... :D  I rather it be independent of µmWeb and KNIME.

 
I've created a
CameraAdapter (based upon the DemoCamera) which fetches images from a
(special) HTTP server process; we're using this to replay time-lapse
experiments and to feed large stitched images (together with coordinates
from the virtual stage) for in silico platform integration tests.

I've opted for the decoupled approach, as implementing all these
different scenarios in C++ would've been somewhat burdensome.

The screenshot shows a dynamically calculated mandelbrot set.

I'm currently investigating the embedding of a Python interpreter within
a DeviceAdapter, to allow for image loading, image generation or image
processing via NumPy+associated ecosystem (tho' it's not ready yet, as
some threading/heap corrupting errors seem to persist).

If there is interest in the current (HTTP retrieving) camera adapter, I
could push the branch to my github.

Very interesting work. Very close to what I need. :(


Cheers Karl

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School
 


 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Kyle Douglass
In reply to this post by Karl Bellve-3

Hi Karl,


On 10/17/2017 08:46 PM, Karl Bellve wrote:


On Tue, Oct 17, 2017 at 2:14 AM Kyle Douglass <[hidden email]> wrote:

Hi Karl,


What I think I might do is modify the demo camera to include a 4th option to load an image from file, and every time the camera is snapped, the next image is loaded. I took a look at the demo camera code today and I think it is a fesiable approach. 



Marcel Stefko, a masters student from our lab, developed a MM 2.0 plugin that reads images from a .tif stack and feeds them through the Live window, effectively simulating an acquisition. It's a bit of a dirty hack since it's implemented at the level of the processing pipeline, i.e. not a device adapter, but you may still find it useful.

https://github.com/LEB-EPFL/ImageInjector

I'm still moving Marcel's work into a consolidated place on Github; until I do, the .jar file is in the Releases section of the original repo: https://github.com/MStefko/ImageInjectorPlugin

A brief description on how to use it may be found in the README and here: http://alica.readthedocs.io/en/latest/simulation.html

We decided against directly modifying the demo camera since it runs on a pretty large code base...

Cheers,
Kyle


Didn't work as expected. I was hoping to snap 1 image, insert 1 image from a tiff file, until end, and then repeat from the beginning. Something odd is happening when I snap a single image where 199 blank images are added, followed by 1 expected image. I have to check the code. I assume it is supposed to be 1:1? 


Indeed it should be 1:1. Yours is a slightly different use-case than ours, so I'm not surprised if there's some strange behavior. I must admit that we did not code this for any general purpose since it was more of a means to an end of a different project. If there is significant interest in making it more general, I can have a look at overhauling the code, but I unfortunately cannot make any promises that this could be done quickly :/

I agree with everyone else that a general feature like this would be desirable.

Kyle
-- 
Kyle M. Douglass, PhD
Post-doctoral researcher
The Laboratory of Experimental Biophysics
EPFL, Lausanne, Switzerland
http://kmdouglass.github.io
http://leb.epfl.ch

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Christian Carsten Sachs
In reply to this post by Karl Bellve-3
Hello,

if you want to take a look, I've just pushed my SimulatingCamera branch
onto my github.

https://github.com/csachs/micro-manager/tree/SimulatingCamera

With the mandelbrot feeder in
https://gist.github.com/csachs/027b353a96f4a82e5cadf906b2ec73a4 .

(I have some more image feeders, they are just very hackish and highly
specialized for certain purposes, I'd rather rewrite them cleanly some
time … but then again the DeviceAdapter probably needs some more
polishment before those feeders get them. Furthermore, if I succeed in
embedding Python completely, I guess I'd rather abandon the HTTP approach).

Please be warned that this is not well tested code!

Best regards,
Christian

On 17.10.2017 21:48, Karl Bellve wrote:

>
>
> On Tue, Oct 17, 2017 at 6:14 AM Christian Carsten Sachs
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hello,
>
>     concerning this I'd like to hint to a thread I've started last year:
>     http://micro-manager.3463995.n2.nabble.com/SimulatingCamera-DeviceAdapter-td7586968.html
>
>
> Thanks for the thread. I must have missed it..and I agree with everyone
> on the thread that we need a way to insert images into µManager for
> testing purposes...
>
>
>        (screenshot link in there expired, here's the new one:
>     https://fz-juelich.sciebo.de/index.php/s/0pfY1N0vGz5efku )
>
>     Similar to Kyle Douglass, I've addressed the question of getting images
>     into MM for debugging/processing test purposes.
>
>     As I'm not using the GUI but merely CMMCore,
>
>
> hmmm...I need to run my plugin µmWeb from within µManager, which is how
> I will be pulling the synthetic images from µManager and giving
> instructions to µManager. So, I don't think I can get away with just
> access to CMMCore.
>
> I could probably push images to µManager via µmWeb (I would write the
> code for this but easy) and then pull them back out again...but that is
> circular testing..... :D  I rather it be independent of µmWeb and KNIME.
>
>     I've created a
>     CameraAdapter (based upon the DemoCamera) which fetches images from a
>     (special) HTTP server process; we're using this to replay time-lapse
>     experiments and to feed large stitched images (together with coordinates
>     from the virtual stage) for in silico platform integration tests.
>
>
>     I've opted for the decoupled approach, as implementing all these
>     different scenarios in C++ would've been somewhat burdensome.
>
>     The screenshot shows a dynamically calculated mandelbrot set.
>
>     I'm currently investigating the embedding of a Python interpreter within
>     a DeviceAdapter, to allow for image loading, image generation or image
>     processing via NumPy+associated ecosystem (tho' it's not ready yet, as
>     some threading/heap corrupting errors seem to persist).
>
>
>     If there is interest in the current (HTTP retrieving) camera adapter, I
>     could push the branch to my github.
>
>
> Very interesting work. Very close to what I need. :(
>
>
> Cheers Karl
>
> Karl Bellvé
> Biomedical Imaging Group
> Molecular Medicine
> University of Massachusetts Medical School
>
>
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Christian Carsten Sachs
In reply to this post by Karl Bellve-3
Hello again,

I just see that I've misread your last email. Concerning CMMCore / MM
GUI: CMMCore is obviously the core of Micro-Manager; that's why I focus
on implementing stuff there on the C++ level as I don't use
Micro-Manager's GUI. But as it's a normal camera adapter, it's obviously
available transparently as a 'normal camera' within Micro-Manager (on
all levels including the GUI).

Best regards,
Christian

On 17.10.2017 21:48, Karl Bellve wrote:

>
>
> On Tue, Oct 17, 2017 at 6:14 AM Christian Carsten Sachs
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hello,
>
>     concerning this I'd like to hint to a thread I've started last year:
>     http://micro-manager.3463995.n2.nabble.com/SimulatingCamera-DeviceAdapter-td7586968.html
>
>
> Thanks for the thread. I must have missed it..and I agree with everyone
> on the thread that we need a way to insert images into µManager for
> testing purposes...
>
>
>        (screenshot link in there expired, here's the new one:
>     https://fz-juelich.sciebo.de/index.php/s/0pfY1N0vGz5efku )
>
>     Similar to Kyle Douglass, I've addressed the question of getting images
>     into MM for debugging/processing test purposes.
>
>     As I'm not using the GUI but merely CMMCore,
>
>
> hmmm...I need to run my plugin µmWeb from within µManager, which is how
> I will be pulling the synthetic images from µManager and giving
> instructions to µManager. So, I don't think I can get away with just
> access to CMMCore.
>
> I could probably push images to µManager via µmWeb (I would write the
> code for this but easy) and then pull them back out again...but that is
> circular testing..... :D  I rather it be independent of µmWeb and KNIME.
>
>     I've created a
>     CameraAdapter (based upon the DemoCamera) which fetches images from a
>     (special) HTTP server process; we're using this to replay time-lapse
>     experiments and to feed large stitched images (together with coordinates
>     from the virtual stage) for in silico platform integration tests.
>
>
>     I've opted for the decoupled approach, as implementing all these
>     different scenarios in C++ would've been somewhat burdensome.
>
>     The screenshot shows a dynamically calculated mandelbrot set.
>
>     I'm currently investigating the embedding of a Python interpreter within
>     a DeviceAdapter, to allow for image loading, image generation or image
>     processing via NumPy+associated ecosystem (tho' it's not ready yet, as
>     some threading/heap corrupting errors seem to persist).
>
>
>     If there is interest in the current (HTTP retrieving) camera adapter, I
>     could push the branch to my github.
>
>
> Very interesting work. Very close to what I need. :(
>
>
> Cheers Karl
>
> Karl Bellvé
> Biomedical Imaging Group
> Molecular Medicine
> University of Massachusetts Medical School
>
>
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Karl Bellve-3


On Wed, Oct 18, 2017 at 5:17 AM Christian Carsten Sachs <[hidden email]> wrote:
Hello again,

I just see that I've misread your last email. Concerning CMMCore / MM
GUI: CMMCore is obviously the core of Micro-Manager; that's why I focus
on implementing stuff there on the C++ level as I don't use
Micro-Manager's GUI. But as it's a normal camera adapter, it's obviously
available transparently as a 'normal camera' within Micro-Manager (on
all levels including the GUI).

I am trying your version. As far as I can tell, I think your code is just looking at raw binary data, with the appropriate X,Y and bit depth? Big Endian? Unsigned 8/16/32 bit? Anything I am missing?



Cheers Karl

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School



 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Christian Carsten Sachs
Hi,

yes. Just the raw data as it should end up in the camera buffer.

width, height and depth are the relevant query parameters to the URL, so
the serving script can know for each particular request what's needed.

Depth would be 1 or 2 depending on 8 bit or 16 bit images, handled as MM
supports them (I think only unsigned data is handled by MM, and 32 bit
data is if I'm not mistaken a very recent addition, I've personally not
used/tested it so far). Little endian. Color images (i.e. multichannel)
would need some code changes afaik.

The x, y, z and channel parameters are taken from the XY and Z Stages,
and the channel parameter from a statedevice (so that filter switches
e.g. fluorescence acquisition can be simulated seamlessly).

If you're familiar with Python, I'd suggest to just take my script
snippet, remove the mandelbrot call and just put in the desired image
fetching code.

Best regards,
Christian

On 18.10.2017 21:41, Karl Bellve wrote:

>
>
> On Wed, Oct 18, 2017 at 5:17 AM Christian Carsten Sachs
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hello again,
>
>     I just see that I've misread your last email. Concerning CMMCore / MM
>     GUI: CMMCore is obviously the core of Micro-Manager; that's why I focus
>     on implementing stuff there on the C++ level as I don't use
>     Micro-Manager's GUI. But as it's a normal camera adapter, it's obviously
>     available transparently as a 'normal camera' within Micro-Manager (on
>     all levels including the GUI).
>
>
> I am trying your version. As far as I can tell, I think your code is
> just looking at raw binary data, with the appropriate X,Y and bit depth?
> Big Endian? Unsigned 8/16/32 bit? Anything I am missing?
>
>
>
> Cheers Karl
>
> Karl Bellvé
> Biomedical Imaging Group
> Molecular Medicine
> University of Massachusetts Medical School
>
>
>
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Karl Bellve-3


On Thu, Oct 19, 2017 at 4:28 AM Christian Carsten Sachs <[hidden email]> wrote:
Hi,

yes. Just the raw data as it should end up in the camera buffer.

width, height and depth are the relevant query parameters to the URL, so
the serving script can know for each particular request what's needed.


<snip>

Just to conclude this thread. I was able to use Christian's code to load images into µManager for testing purposes. I only had to slightly modify two lines in his camera adapter to transverse an image file every time the "snap" image was used. Perfect for me. I would actually need to write more code to make it useable for others, which I don't have time at the moment. Sorry.

Thanks Christian, Kyle, and Nico for helping me get it done...

Cheers Karl


Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

SaralaT

Hi Karl and Christian,


I just went through the thread and would like to try out  Christian's code to load images into µManager for testing purposes. I would like to load a set of tiff images to display as the image at each "snap" of the demo camera (so that the next tiff in the stack will be displayed at the next "snap"). I use MM1.4 currently.


Could you help me get this activated on my system? It would be great if you could direct me as to how I can implement this camera adapter. I have not implemented adapters before and would much appreciate some explanations on how to do this. Would be great if you could share the relevant files and instructions on this.


Thanks a lot!! 


Best Regards,

Sarala


From: Karl Bellve <[hidden email]>
Sent: Friday, October 20, 2017 4:18:37 AM
To: Micro-Manager General
Subject: Re: [micro-manager-general] Importing an image into Micromanager 2.0?
 


On Thu, Oct 19, 2017 at 4:28 AM Christian Carsten Sachs <[hidden email]> wrote:
Hi,

yes. Just the raw data as it should end up in the camera buffer.

width, height and depth are the relevant query parameters to the URL, so
the serving script can know for each particular request what's needed.


<snip>

Just to conclude this thread. I was able to use Christian's code to load images into µManager for testing purposes. I only had to slightly modify two lines in his camera adapter to transverse an image file every time the "snap" image was used. Perfect for me. I would actually need to write more code to make it useable for others, which I don't have time at the moment. Sorry.

Thanks Christian, Kyle, and Nico for helping me get it done...

Cheers Karl


Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Christian Carsten Sachs
Hi Sarala,

using my approach you don't really have to implement/change anything at
the camera adapter. Just compile the branch of my micro-manager fork (
https://github.com/csachs/micro-manager/tree/SimulatingCamera )
(possibly fitting the MM version you're using.)

Once the adapter is compiled, you can load it from within MM.

Additionally, you need to serve the TIFF's content via HTTP.
I've quickly assembled a Python script to do that:

https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325

(Try Python 3; you might need to install flask and tifffile [pip install
--user flask tifffile])

This script will cycle through the frames of a tiff stack, as written
e.g. by ImageJ, if you have more complex access patterns in mind, the
script might serve as base.

@ MM Team: Given some people voiced interest in such functionality, is
there interest in adding such an adapter (or adding the functionality to
the DemoCamera adapter) to MM? If so, I can prepare a patch/PR.

Best regards,
Christian


On 26.10.2017 09:54, Sarala Neomi Tantirimudalige wrote:

> Hi Karl and Christian,
>
>
> I just went through the thread and would like to try out Christian's
> code to load images into µManager for testing purposes. I would like to
> load a set of tiff images to display as the image at each "snap" of the
> demo camera (so that the next tiff in the stack will be displayed at the
> next "snap"). I use MM1.4 currently.
>
>
> Could you help me get this activated on my system? It would be great if
> you could direct me as to how I can implement this camera adapter. I
> have not implemented adapters before and would much appreciate some
> explanations on how to do this. Would be great if you could share the
> relevant files and instructions on this.
>
>
> Thanks a lot!!
>
>
> Best Regards,
>
> Sarala
>
> ------------------------------------------------------------------------
> *From:* Karl Bellve <[hidden email]>
> *Sent:* Friday, October 20, 2017 4:18:37 AM
> *To:* Micro-Manager General
> *Subject:* Re: [micro-manager-general] Importing an image into
> Micromanager 2.0?
>
>
> On Thu, Oct 19, 2017 at 4:28 AM Christian Carsten Sachs
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     yes. Just the raw data as it should end up in the camera buffer.
>
>     width, height and depth are the relevant query parameters to the URL, so
>     the serving script can know for each particular request what's needed.
>
>
>
> <snip>
>
> Just to conclude this thread. I was able to use Christian's code to load
> images into µManager for testing purposes. I only had to slightly modify
> two lines in his camera adapter to transverse an image file every time
> the "snap" image was used. Perfect for me. I would actually need to
> write more code to make it useable for others, which I don't have time
> at the moment. Sorry.
>
> Thanks Christian, Kyle, and Nico for helping me get it done...
>
> Cheers Karl
>
>
> Karl Bellvé
> Biomedical Imaging Group
> Molecular Medicine
> University of Massachusetts Medical School
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

SaralaT


Hi Christian,


Thanks for your response! I have some very basic questions regarding the process. What do u mean by the "branch of my micro-manager fork"? in that link (https://github.com/csachs/micro-manager/tree/SimulatingCamera )  I can see many folders. Which one should I download? 


I was taking a look at the MM adapter related topic here https://micro-manager.org/wiki/ThorlabsAPTStage#Compilation_notes.2C_64-bit_device_adaptor. It states to "Drop the content of File:APT x64.zip into the device adapter micromanager-upstream\DeviceAdapters\ThorlabsAPTStage folder and then compile compile the adapter as a x64 / release dll". What is the folder to which I must place the downloaded item? and how must I go about compiling this? Should I be using something like Netbeans or is it possible to be done on Micromanager itself? 


So the objective of compiling the adapter is to develop the .dll, which then will be placed into the micromanager folder? Then I can just start the micromanager and the adapter will be functional?


I'm not too familiar with adapters (First time I am exploring the topic) But I noticed inside MM1.4, there are two .dll files (java_crw_demo.dll and mmgr_dal_DemoCamera.dll). Are these the .dll files responsible for the function of the democamera on MM?


So sorry about the very very basic questions! Would be great if you could help me understand the process a bit more. Thanks a lot!


Best Regards,

Sarala


From: Christian Carsten Sachs <[hidden email]>
Sent: Thursday, October 26, 2017 7:04:10 PM
To: [hidden email]
Subject: Re: [micro-manager-general] Importing an image into Micromanager 2.0?
 
Hi Sarala,

using my approach you don't really have to implement/change anything at
the camera adapter. Just compile the branch of my micro-manager fork (
https://github.com/csachs/micro-manager/tree/SimulatingCamera )


(possibly fitting the MM version you're using.)

Once the adapter is compiled, you can load it from within MM.

Additionally, you need to serve the TIFF's content via HTTP.
I've quickly assembled a Python script to do that:

https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325



(Try Python 3; you might need to install flask and tifffile [pip install
--user flask tifffile])

This script will cycle through the frames of a tiff stack, as written
e.g. by ImageJ, if you have more complex access patterns in mind, the
script might serve as base.

@ MM Team: Given some people voiced interest in such functionality, is
there interest in adding such an adapter (or adding the functionality to
the DemoCamera adapter) to MM? If so, I can prepare a patch/PR.

Best regards,
Christian


On 26.10.2017 09:54, Sarala Neomi Tantirimudalige wrote:
> Hi Karl and Christian,
>
>
> I just went through the thread and would like to try out Christian's
> code to load images into µManager for testing purposes. I would like to
> load a set of tiff images to display as the image at each "snap" of the
> demo camera (so that the next tiff in the stack will be displayed at the
> next "snap"). I use MM1.4 currently.
>
>
> Could you help me get this activated on my system? It would be great if
> you could direct me as to how I can implement this camera adapter. I
> have not implemented adapters before and would much appreciate some
> explanations on how to do this. Would be great if you could share the
> relevant files and instructions on this.
>
>
> Thanks a lot!!
>
>
> Best Regards,
>
> Sarala
>
> ------------------------------------------------------------------------
> *From:* Karl Bellve <[hidden email]>
> *Sent:* Friday, October 20, 2017 4:18:37 AM
> *To:* Micro-Manager General
> *Subject:* Re: [micro-manager-general] Importing an image into
> Micromanager 2.0?
>
>
> On Thu, Oct 19, 2017 at 4:28 AM Christian Carsten Sachs
> <[hidden email] <[hidden email]>> wrote:
>
>     Hi,
>
>     yes. Just the raw data as it should end up in the camera buffer.
>
>     width, height and depth are the relevant query parameters to the URL, so
>     the serving script can know for each particular request what's needed.
>
>
>
> <snip>
>
> Just to conclude this thread. I was able to use Christian's code to load
> images into µManager for testing purposes. I only had to slightly modify
> two lines in his camera adapter to transverse an image file every time
> the "snap" image was used. Perfect for me. I would actually need to
> write more code to make it useable for others, which I don't have time
> at the moment. Sorry.
>
> Thanks Christian, Kyle, and Nico for helping me get it done...
>
> Cheers Karl
>
>
> Karl Bellvé
> Biomedical Imaging Group
> Molecular Medicine
> University of Massachusetts Medical School
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Christian Carsten Sachs
Hi Sarala,

if you don't have the appropriate development environment ready
(Microsoft Visual Studio), and are accustomed to compiling device
adapters yourself, the steps necessary can pose quite a hurdle,
especially if you just want to use one adapter.

I've therefore set up automated builds using AppVeyor for the device
adapter, you can download it from:

https://ci.appveyor.com/project/csachs/micro-manager/build/1.0.7/job/s6dry2b7dab9eles/artifacts 
( 32 bit )
https://ci.appveyor.com/project/csachs/micro-manager/build/job/v7anjp65iowbrtfb/artifacts 
( 64 bit )

[I've found that the code was not 100% ready for Windows, that is fixed now]

They should work with MM 1.4 (I just tried it with MM 1.4 64 bit version).

You'll need the Python script as well, serving up the contents of some
TIFF file (and within the device adapter's configuration values, the
path set correctly to the address the Python script is serving up image
data).

Best regards,
Christian


On 27.10.2017 06:38, Sarala Neomi Tantirimudalige wrote:

>
> Hi Christian,
>
>
> Thanks for your response! I have some very basic questions regarding the
> process. What do u mean by the "branch of my micro-manager fork"? in
> that link
> (https://github.com/csachs/micro-manager/tree/SimulatingCamera ) I can
> see many folders. Which one should I download?
>
>
> I was taking a look at the MM adapter related topic here
> https://micro-manager.org/wiki/ThorlabsAPTStage#Compilation_notes.2C_64-bit_device_adaptor.
> It states to "Drop the content of File:APT x64.zip into the device
> adapter micromanager-upstream\DeviceAdapters\ThorlabsAPTStage folder and
> then compile compile the adapter as a x64 / release dll". What is the
> folder to which I must place the downloaded item? and how must I go
> about compiling this? Should I be using something like Netbeans or is it
> possible to be done on Micromanager itself?
>
>
> So the objective of compiling the adapter is to develop the .dll, which
> then will be placed into the micromanager folder? Then I can just start
> the micromanager and the adapter will be functional?
>
>
> I'm not too familiar with adapters (First time I am exploring the topic)
> But I noticed inside MM1.4, there are two .dll files (java_crw_demo.dll
> and mmgr_dal_DemoCamera.dll). Are these the .dll files responsible for
> the function of the democamera on MM?
>
>
> So sorry about the very very basic questions! Would be great if you
> could help me understand the process a bit more. Thanks a lot!
>
>
> Best Regards,
>
> Sarala
>
> ------------------------------------------------------------------------
> *From:* Christian Carsten Sachs <[hidden email]>
> *Sent:* Thursday, October 26, 2017 7:04:10 PM
> *To:* [hidden email]
> *Subject:* Re: [micro-manager-general] Importing an image into
> Micromanager 2.0?
> Hi Sarala,
>
> using my approach you don't really have to implement/change anything at
> the camera adapter. Just compile the branch of my micro-manager fork (
> https://github.com/csachs/micro-manager/tree/SimulatingCamera )
> <https://github.com/csachs/micro-manager/tree/SimulatingCamera>
>
> csachs/micro-manager
> <https://github.com/csachs/micro-manager/tree/SimulatingCamera>
> github.com
> micro-manager - Microscope control and image acquisition integrated with
> ImageJ.
>
>
>
> (possibly fitting the MM version you're using.)
>
> Once the adapter is compiled, you can load it from within MM.
>
> Additionally, you need to serve the TIFF's content via HTTP.
> I've quickly assembled a Python script to do that:
>
> https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325
> <https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325>
>
> tiff file feeder
> <https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325>
> gist.github.com
> tiff file feeder
>
>
>
>
> (Try Python 3; you might need to install flask and tifffile [pip install
> --user flask tifffile])
>
> This script will cycle through the frames of a tiff stack, as written
> e.g. by ImageJ, if you have more complex access patterns in mind, the
> script might serve as base.
>
> @ MM Team: Given some people voiced interest in such functionality, is
> there interest in adding such an adapter (or adding the functionality to
> the DemoCamera adapter) to MM? If so, I can prepare a patch/PR.
>
> Best regards,
> Christian
>
>
> On 26.10.2017 09:54, Sarala Neomi Tantirimudalige wrote:
>> Hi Karl and Christian,
>>
>>
>> I just went through the thread and would like to try out Christian's
>> code to load images into µManager for testing purposes. I would like to
>> load a set of tiff images to display as the image at each "snap" of the
>> demo camera (so that the next tiff in the stack will be displayed at the
>> next "snap"). I use MM1.4 currently.
>>
>>
>> Could you help me get this activated on my system? It would be great if
>> you could direct me as to how I can implement this camera adapter. I
>> have not implemented adapters before and would much appreciate some
>> explanations on how to do this. Would be great if you could share the
>> relevant files and instructions on this.
>>
>>
>> Thanks a lot!!
>>
>>
>> Best Regards,
>>
>> Sarala
>>
>> ------------------------------------------------------------------------
>> *From:* Karl Bellve <[hidden email]>
>> *Sent:* Friday, October 20, 2017 4:18:37 AM
>> *To:* Micro-Manager General
>> *Subject:* Re: [micro-manager-general] Importing an image into
>> Micromanager 2.0?
>>
>>
>> On Thu, Oct 19, 2017 at 4:28 AM Christian Carsten Sachs
>> <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>     Hi,
>>
>>     yes. Just the raw data as it should end up in the camera buffer.
>>
>>     width, height and depth are the relevant query parameters to the URL, so
>>     the serving script can know for each particular request what's needed.
>>
>>
>>
>> <snip>
>>
>> Just to conclude this thread. I was able to use Christian's code to load
>> images into µManager for testing purposes. I only had to slightly modify
>> two lines in his camera adapter to transverse an image file every time
>> the "snap" image was used. Perfect for me. I would actually need to
>> write more code to make it useable for others, which I don't have time
>> at the moment. Sorry.
>>
>> Thanks Christian, Kyle, and Nico for helping me get it done...
>>
>> Cheers Karl
>>
>>
>> Karl Bellvé
>> Biomedical Imaging Group
>> Molecular Medicine
>> University of Massachusetts Medical School
>>
>>
>> This body part will be downloaded on demand.
>>
>>
>>
>> This body part will be downloaded on demand.
>>
>
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

SaralaT

Hi Christian,


Thank you very much for the help with the device adapter! 😊  I will attempt the rest of the procedure with the Python 3 and get back to you


Thanks a again!


Best Regards,

Sarala


From: Christian Carsten Sachs <[hidden email]>
Sent: Friday, October 27, 2017 6:47:20 PM
To: [hidden email]
Subject: Re: [micro-manager-general] Importing an image into Micromanager 2.0?
 
Hi Sarala,

if you don't have the appropriate development environment ready
(Microsoft Visual Studio), and are accustomed to compiling device
adapters yourself, the steps necessary can pose quite a hurdle,
especially if you just want to use one adapter.

I've therefore set up automated builds using AppVeyor for the device
adapter, you can download it from:

https://ci.appveyor.com/project/csachs/micro-manager/build/1.0.7/job/s6dry2b7dab9eles/artifacts
( 32 bit )
https://ci.appveyor.com/project/csachs/micro-manager/build/job/v7anjp65iowbrtfb/artifacts
( 64 bit )

[I've found that the code was not 100% ready for Windows, that is fixed now]

They should work with MM 1.4 (I just tried it with MM 1.4 64 bit version).

You'll need the Python script as well, serving up the contents of some
TIFF file (and within the device adapter's configuration values, the
path set correctly to the address the Python script is serving up image
data).

Best regards,
Christian


On 27.10.2017 06:38, Sarala Neomi Tantirimudalige wrote:
>
> Hi Christian,
>
>
> Thanks for your response! I have some very basic questions regarding the
> process. What do u mean by the "branch of my micro-manager fork"? in
> that link
> (https://github.com/csachs/micro-manager/tree/SimulatingCamera ) I can
> see many folders. Which one should I download?
>
>
> I was taking a look at the MM adapter related topic here
> https://micro-manager.org/wiki/ThorlabsAPTStage#Compilation_notes.2C_64-bit_device_adaptor.
> It states to "Drop the content of File:APT x64.zip into the device
> adapter micromanager-upstream\DeviceAdapters\ThorlabsAPTStage folder and
> then compile compile the adapter as a x64 / release dll". What is the
> folder to which I must place the downloaded item? and how must I go
> about compiling this? Should I be using something like Netbeans or is it
> possible to be done on Micromanager itself?
>
>
> So the objective of compiling the adapter is to develop the .dll, which
> then will be placed into the micromanager folder? Then I can just start
> the micromanager and the adapter will be functional?
>
>
> I'm not too familiar with adapters (First time I am exploring the topic)
> But I noticed inside MM1.4, there are two .dll files (java_crw_demo.dll
> and mmgr_dal_DemoCamera.dll). Are these the .dll files responsible for
> the function of the democamera on MM?
>
>
> So sorry about the very very basic questions! Would be great if you
> could help me understand the process a bit more. Thanks a lot!
>
>
> Best Regards,
>
> Sarala
>
> ------------------------------------------------------------------------
> *From:* Christian Carsten Sachs <[hidden email]>
> *Sent:* Thursday, October 26, 2017 7:04:10 PM
> *To:* [hidden email]
> *Subject:* Re: [micro-manager-general] Importing an image into
> Micromanager 2.0?
> Hi Sarala,
>
> using my approach you don't really have to implement/change anything at
> the camera adapter. Just compile the branch of my micro-manager fork (
> https://github.com/csachs/micro-manager/tree/SimulatingCamera )
> <https://github.com/csachs/micro-manager/tree/SimulatingCamera>
>       
> csachs/micro-manager
> <https://github.com/csachs/micro-manager/tree/SimulatingCamera>
> github.com
> micro-manager - Microscope control and image acquisition integrated with
> ImageJ.
>
>
>
> (possibly fitting the MM version you're using.)
>
> Once the adapter is compiled, you can load it from within MM.
>
> Additionally, you need to serve the TIFF's content via HTTP.
> I've quickly assembled a Python script to do that:
>
> https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325
> <https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325>
>       
> tiff file feeder
> <https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325>
> gist.github.com
> tiff file feeder
>
>
>
>
> (Try Python 3; you might need to install flask and tifffile [pip install
> --user flask tifffile])
>
> This script will cycle through the frames of a tiff stack, as written
> e.g. by ImageJ, if you have more complex access patterns in mind, the
> script might serve as base.
>
> @ MM Team: Given some people voiced interest in such functionality, is
> there interest in adding such an adapter (or adding the functionality to
> the DemoCamera adapter) to MM? If so, I can prepare a patch/PR.
>
> Best regards,
> Christian
>
>
> On 26.10.2017 09:54, Sarala Neomi Tantirimudalige wrote:
>> Hi Karl and Christian,
>>
>>
>> I just went through the thread and would like to try out Christian's
>> code to load images into µManager for testing purposes. I would like to
>> load a set of tiff images to display as the image at each "snap" of the
>> demo camera (so that the next tiff in the stack will be displayed at the
>> next "snap"). I use MM1.4 currently.
>>
>>
>> Could you help me get this activated on my system? It would be great if
>> you could direct me as to how I can implement this camera adapter. I
>> have not implemented adapters before and would much appreciate some
>> explanations on how to do this. Would be great if you could share the
>> relevant files and instructions on this.
>>
>>
>> Thanks a lot!!
>>
>>
>> Best Regards,
>>
>> Sarala
>>
>> ------------------------------------------------------------------------
>> *From:* Karl Bellve <[hidden email]>
>> *Sent:* Friday, October 20, 2017 4:18:37 AM
>> *To:* Micro-Manager General
>> *Subject:* Re: [micro-manager-general] Importing an image into
>> Micromanager 2.0?
>>
>>
>> On Thu, Oct 19, 2017 at 4:28 AM Christian Carsten Sachs
>> <[hidden email] <[hidden email]>> wrote:
>>
>>     Hi,
>>
>>     yes. Just the raw data as it should end up in the camera buffer.
>>
>>     width, height and depth are the relevant query parameters to the URL, so
>>     the serving script can know for each particular request what's needed.
>>
>>
>>
>> <snip>
>>
>> Just to conclude this thread. I was able to use Christian's code to load
>> images into µManager for testing purposes. I only had to slightly modify
>> two lines in his camera adapter to transverse an image file every time
>> the "snap" image was used. Perfect for me. I would actually need to
>> write more code to make it useable for others, which I don't have time
>> at the moment. Sorry.
>>
>> Thanks Christian, Kyle, and Nico for helping me get it done...
>>
>> Cheers Karl
>>
>>
>> Karl Bellvé
>> Biomedical Imaging Group
>> Molecular Medicine
>> University of Massachusetts Medical School
>>
>>
>> This body part will be downloaded on demand.
>>
>>
>>
>> This body part will be downloaded on demand.
>>
>
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

SaralaT


Hi Christian,


So I have downloaded Python 3 and installed the flask and tifffile. When run I get the attached screen shot. 


I do not know how to proceed from here... How do I next get the micromanager democam to actually show the C1.tif set as the "snap" images?  


I have kept the mmgr_dal_SimulatingCamera.dll inside the micromanager folder. 


But I seem to not be able to get the democamera to show the C1.tif as the output... Am I missing something? (do I need to run Python simultaneously with the Micromanager everytime I want to do this type of tiff image feed?


Thanks a lot!


Best Regards,

Sarala


From: Sarala Neomi Tantirimudalige
Sent: Monday, October 30, 2017 12:55:29 PM
To: [hidden email]
Subject: Re: [micro-manager-general] Importing an image into Micromanager 2.0?
 

Hi Christian,


Thank you very much for the help with the device adapter! 😊  I will attempt the rest of the procedure with the Python 3 and get back to you


Thanks a again!


Best Regards,

Sarala


From: Christian Carsten Sachs <[hidden email]>
Sent: Friday, October 27, 2017 6:47:20 PM
To: [hidden email]
Subject: Re: [micro-manager-general] Importing an image into Micromanager 2.0?
 
Hi Sarala,

if you don't have the appropriate development environment ready
(Microsoft Visual Studio), and are accustomed to compiling device
adapters yourself, the steps necessary can pose quite a hurdle,
especially if you just want to use one adapter.

I've therefore set up automated builds using AppVeyor for the device
adapter, you can download it from:

https://ci.appveyor.com/project/csachs/micro-manager/build/1.0.7/job/s6dry2b7dab9eles/artifacts
( 32 bit )
https://ci.appveyor.com/project/csachs/micro-manager/build/job/v7anjp65iowbrtfb/artifacts
( 64 bit )

[I've found that the code was not 100% ready for Windows, that is fixed now]

They should work with MM 1.4 (I just tried it with MM 1.4 64 bit version).

You'll need the Python script as well, serving up the contents of some
TIFF file (and within the device adapter's configuration values, the
path set correctly to the address the Python script is serving up image
data).

Best regards,
Christian


On 27.10.2017 06:38, Sarala Neomi Tantirimudalige wrote:
>
> Hi Christian,
>
>
> Thanks for your response! I have some very basic questions regarding the
> process. What do u mean by the "branch of my micro-manager fork"? in
> that link
> (https://github.com/csachs/micro-manager/tree/SimulatingCamera ) I can
> see many folders. Which one should I download?
>
>
> I was taking a look at the MM adapter related topic here
> https://micro-manager.org/wiki/ThorlabsAPTStage#Compilation_notes.2C_64-bit_device_adaptor.
> It states to "Drop the content of File:APT x64.zip into the device
> adapter micromanager-upstream\DeviceAdapters\ThorlabsAPTStage folder and
> then compile compile the adapter as a x64 / release dll". What is the
> folder to which I must place the downloaded item? and how must I go
> about compiling this? Should I be using something like Netbeans or is it
> possible to be done on Micromanager itself?
>
>
> So the objective of compiling the adapter is to develop the .dll, which
> then will be placed into the micromanager folder? Then I can just start
> the micromanager and the adapter will be functional?
>
>
> I'm not too familiar with adapters (First time I am exploring the topic)
> But I noticed inside MM1.4, there are two .dll files (java_crw_demo.dll
> and mmgr_dal_DemoCamera.dll). Are these the .dll files responsible for
> the function of the democamera on MM?
>
>
> So sorry about the very very basic questions! Would be great if you
> could help me understand the process a bit more. Thanks a lot!
>
>
> Best Regards,
>
> Sarala
>
> ------------------------------------------------------------------------
> *From:* Christian Carsten Sachs <[hidden email]>
> *Sent:* Thursday, October 26, 2017 7:04:10 PM
> *To:* [hidden email]
> *Subject:* Re: [micro-manager-general] Importing an image into
> Micromanager 2.0?
> Hi Sarala,
>
> using my approach you don't really have to implement/change anything at
> the camera adapter. Just compile the branch of my micro-manager fork (
> https://github.com/csachs/micro-manager/tree/SimulatingCamera )
> <https://github.com/csachs/micro-manager/tree/SimulatingCamera>
>       
> csachs/micro-manager
> <https://github.com/csachs/micro-manager/tree/SimulatingCamera>
> github.com
> micro-manager - Microscope control and image acquisition integrated with
> ImageJ.
>
>
>
> (possibly fitting the MM version you're using.)
>
> Once the adapter is compiled, you can load it from within MM.
>
> Additionally, you need to serve the TIFF's content via HTTP.
> I've quickly assembled a Python script to do that:
>
> https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325
> <https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325>
>       
> tiff file feeder
> <https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325>
> gist.github.com
> tiff file feeder
>
>
>
>
> (Try Python 3; you might need to install flask and tifffile [pip install
> --user flask tifffile])
>
> This script will cycle through the frames of a tiff stack, as written
> e.g. by ImageJ, if you have more complex access patterns in mind, the
> script might serve as base.
>
> @ MM Team: Given some people voiced interest in such functionality, is
> there interest in adding such an adapter (or adding the functionality to
> the DemoCamera adapter) to MM? If so, I can prepare a patch/PR.
>
> Best regards,
> Christian
>
>
> On 26.10.2017 09:54, Sarala Neomi Tantirimudalige wrote:
>> Hi Karl and Christian,
>>
>>
>> I just went through the thread and would like to try out Christian's
>> code to load images into µManager for testing purposes. I would like to
>> load a set of tiff images to display as the image at each "snap" of the
>> demo camera (so that the next tiff in the stack will be displayed at the
>> next "snap"). I use MM1.4 currently.
>>
>>
>> Could you help me get this activated on my system? It would be great if
>> you could direct me as to how I can implement this camera adapter. I
>> have not implemented adapters before and would much appreciate some
>> explanations on how to do this. Would be great if you could share the
>> relevant files and instructions on this.
>>
>>
>> Thanks a lot!!
>>
>>
>> Best Regards,
>>
>> Sarala
>>
>> ------------------------------------------------------------------------
>> *From:* Karl Bellve <[hidden email]>
>> *Sent:* Friday, October 20, 2017 4:18:37 AM
>> *To:* Micro-Manager General
>> *Subject:* Re: [micro-manager-general] Importing an image into
>> Micromanager 2.0?
>>
>>
>> On Thu, Oct 19, 2017 at 4:28 AM Christian Carsten Sachs
>> <[hidden email] <[hidden email]>> wrote:
>>
>>     Hi,
>>
>>     yes. Just the raw data as it should end up in the camera buffer.
>>
>>     width, height and depth are the relevant query parameters to the URL, so
>>     the serving script can know for each particular request what's needed.
>>
>>
>>
>> <snip>
>>
>> Just to conclude this thread. I was able to use Christian's code to load
>> images into µManager for testing purposes. I only had to slightly modify
>> two lines in his camera adapter to transverse an image file every time
>> the "snap" image was used. Perfect for me. I would actually need to
>> write more code to make it useable for others, which I don't have time
>> at the moment. Sorry.
>>
>> Thanks Christian, Kyle, and Nico for helping me get it done...
>>
>> Cheers Karl
>>
>>
>> Karl Bellvé
>> Biomedical Imaging Group
>> Molecular Medicine
>> University of Massachusetts Medical School
>>
>>
>> This body part will be downloaded on demand.
>>
>>
>>
>> This body part will be downloaded on demand.
>>
>
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Importing an image into Micromanager 2.0?

Lang  Lukas
In reply to this post by SaralaT
Hi everyone,

I just thought I'd mention that I made a PR for my take on this matter here. For now, the device adapter dll can also be found here. I tested it with MM 2.0 and MM 1.4.23, both seem to be working. This version has the advantage that you don't need a web server to serve the images, instead they are directly loaded from disk (you can still provide different images depending on the stage positions). Of course, this is not as flexible as Christians approach, but should be easier to set up :)

Best regards,
Lukas Lang


Von: Sarala Neomi Tantirimudalige [[hidden email]]
Gesendet: Montag, 30. Oktober 2017 05:55
An: [hidden email]
Betreff: Re: [micro-manager-general] Importing an image into Micromanager 2.0?

Hi Christian,


Thank you very much for the help with the device adapter! 😊  I will attempt the rest of the procedure with the Python 3 and get back to you


Thanks a again!


Best Regards,

Sarala


From: Christian Carsten Sachs <[hidden email]>
Sent: Friday, October 27, 2017 6:47:20 PM
To: [hidden email]
Subject: Re: [micro-manager-general] Importing an image into Micromanager 2.0?
 
Hi Sarala,

if you don't have the appropriate development environment ready
(Microsoft Visual Studio), and are accustomed to compiling device
adapters yourself, the steps necessary can pose quite a hurdle,
especially if you just want to use one adapter.

I've therefore set up automated builds using AppVeyor for the device
adapter, you can download it from:

https://ci.appveyor.com/project/csachs/micro-manager/build/1.0.7/job/s6dry2b7dab9eles/artifacts
( 32 bit )
https://ci.appveyor.com/project/csachs/micro-manager/build/job/v7anjp65iowbrtfb/artifacts
( 64 bit )

[I've found that the code was not 100% ready for Windows, that is fixed now]

They should work with MM 1.4 (I just tried it with MM 1.4 64 bit version).

You'll need the Python script as well, serving up the contents of some
TIFF file (and within the device adapter's configuration values, the
path set correctly to the address the Python script is serving up image
data).

Best regards,
Christian


On 27.10.2017 06:38, Sarala Neomi Tantirimudalige wrote:
>
> Hi Christian,
>
>
> Thanks for your response! I have some very basic questions regarding the
> process. What do u mean by the "branch of my micro-manager fork"? in
> that link
> (https://github.com/csachs/micro-manager/tree/SimulatingCamera ) I can
> see many folders. Which one should I download?
>
>
> I was taking a look at the MM adapter related topic here
> https://micro-manager.org/wiki/ThorlabsAPTStage#Compilation_notes.2C_64-bit_device_adaptor.
> It states to "Drop the content of File:APT x64.zip into the device
> adapter micromanager-upstream\DeviceAdapters\ThorlabsAPTStage folder and
> then compile compile the adapter as a x64 / release dll". What is the
> folder to which I must place the downloaded item? and how must I go
> about compiling this? Should I be using something like Netbeans or is it
> possible to be done on Micromanager itself?
>
>
> So the objective of compiling the adapter is to develop the .dll, which
> then will be placed into the micromanager folder? Then I can just start
> the micromanager and the adapter will be functional?
>
>
> I'm not too familiar with adapters (First time I am exploring the topic)
> But I noticed inside MM1.4, there are two .dll files (java_crw_demo.dll
> and mmgr_dal_DemoCamera.dll). Are these the .dll files responsible for
> the function of the democamera on MM?
>
>
> So sorry about the very very basic questions! Would be great if you
> could help me understand the process a bit more. Thanks a lot!
>
>
> Best Regards,
>
> Sarala
>
> ------------------------------------------------------------------------
> *From:* Christian Carsten Sachs <[hidden email]>
> *Sent:* Thursday, October 26, 2017 7:04:10 PM
> *To:* [hidden email]
> *Subject:* Re: [micro-manager-general] Importing an image into
> Micromanager 2.0?
> Hi Sarala,
>
> using my approach you don't really have to implement/change anything at
> the camera adapter. Just compile the branch of my micro-manager fork (
> https://github.com/csachs/micro-manager/tree/SimulatingCamera )
> <https://github.com/csachs/micro-manager/tree/SimulatingCamera>
>       
> csachs/micro-manager
> <https://github.com/csachs/micro-manager/tree/SimulatingCamera>
> github.com
> micro-manager - Microscope control and image acquisition integrated with
> ImageJ.
>
>
>
> (possibly fitting the MM version you're using.)
>
> Once the adapter is compiled, you can load it from within MM.
>
> Additionally, you need to serve the TIFF's content via HTTP.
> I've quickly assembled a Python script to do that:
>
> https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325
> <https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325>
>       
> tiff file feeder
> <https://gist.github.com/csachs/a1ba66cd24dff06d9dc261a60a961325>
> gist.github.com
> tiff file feeder
>
>
>
>
> (Try Python 3; you might need to install flask and tifffile [pip install
> --user flask tifffile])
>
> This script will cycle through the frames of a tiff stack, as written
> e.g. by ImageJ, if you have more complex access patterns in mind, the
> script might serve as base.
>
> @ MM Team: Given some people voiced interest in such functionality, is
> there interest in adding such an adapter (or adding the functionality to
> the DemoCamera adapter) to MM? If so, I can prepare a patch/PR.
>
> Best regards,
> Christian
>
>
> On 26.10.2017 09:54, Sarala Neomi Tantirimudalige wrote:
>> Hi Karl and Christian,
>>
>>
>> I just went through the thread and would like to try out Christian's
>> code to load images into µManager for testing purposes. I would like to
>> load a set of tiff images to display as the image at each "snap" of the
>> demo camera (so that the next tiff in the stack will be displayed at the
>> next "snap"). I use MM1.4 currently.
>>
>>
>> Could you help me get this activated on my system? It would be great if
>> you could direct me as to how I can implement this camera adapter. I
>> have not implemented adapters before and would much appreciate some
>> explanations on how to do this. Would be great if you could share the
>> relevant files and instructions on this.
>>
>>
>> Thanks a lot!!
>>
>>
>> Best Regards,
>>
>> Sarala
>>
>> ------------------------------------------------------------------------
>> *From:* Karl Bellve <[hidden email]>
>> *Sent:* Friday, October 20, 2017 4:18:37 AM
>> *To:* Micro-Manager General
>> *Subject:* Re: [micro-manager-general] Importing an image into
>> Micromanager 2.0?
>>
>>
>> On Thu, Oct 19, 2017 at 4:28 AM Christian Carsten Sachs
>> <[hidden email] <[hidden email]>> wrote:
>>
>>     Hi,
>>
>>     yes. Just the raw data as it should end up in the camera buffer.
>>
>>     width, height and depth are the relevant query parameters to the URL, so
>>     the serving script can know for each particular request what's needed.
>>
>>
>>
>> <snip>
>>
>> Just to conclude this thread. I was able to use Christian's code to load
>> images into µManager for testing purposes. I only had to slightly modify
>> two lines in his camera adapter to transverse an image file every time
>> the "snap" image was used. Perfect for me. I would actually need to
>> write more code to make it useable for others, which I don't have time
>> at the moment. Sorry.
>>
>> Thanks Christian, Kyle, and Nico for helping me get it done...
>>
>> Cheers Karl
>>
>>
>> Karl Bellvé
>> Biomedical Imaging Group
>> Molecular Medicine
>> University of Massachusetts Medical School
>>
>>
>> This body part will be downloaded on demand.
>>
>>
>>
>> This body part will be downloaded on demand.
>>
>
>
>
> This body part will be downloaded on demand.
>
>
>
> This body part will be downloaded on demand.
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
123