LabVIEW C++ MM wrapper for Nikon Ti2 microscope development

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

LabVIEW C++ MM wrapper for Nikon Ti2 microscope development

Micro-Manager mailing list
Hi, folks,

I have a project need to control the Nikon Ti2 microscope via LabVIEW
software, and integrated with our lab-made program. Now, I can control the
Ti2 microscope with Micro-Manager (as Fig. 1), and try to write a C++
wrapper program as DLL file to control the Ti2 microscope. I  have already
do some survey and study the information form the Micro-Manager website
(https://micro-manager.org/), and try to figure out how to start. I also
download the latest "micromanager2" and "3rdpartypublic" Micro-Manager
Source Code (https://micro-manager.org/wiki/Micro-Manager_Source_Code).
However, still have some questions want to confirm before I start. I have
list questions as following and want to know are these concept correct or
not, thanks.

*Q1: *
I'm try to write a C++ wrapper program as DLL file to control the Ti2 stage
as the flow chart (*LabVIEW → my dll → mmgr_dal_NikonTi2.dll(Ti2 adapter for
micro-manager) → Ti2_Mic_Driver.dll → Ti2 microscope hardware*). Is this
concept right?

*Q2: *
As shown in Fig. 2, can I write the C++ wrapper project only base on  these
two folders, "MMCore" and "MMDevice", in micromanager2 source code, thanks?

*Q3: *
Based on last question, I only found this website
"https://valelab4.ucsf.edu/~MM/doc/MMCore/html/annotated.html" to illustrate
the above ".cpp" and ".h" files. Is there have any way can find more
information, thanks?

*Q4: *
As shown in Fig. 3. I also can load the "mmgr_dal_NikonTi2.dll(Ti2 adapter
for micro-manager, I guess)" into LabVIEW. Is these means it's feasible to
control the Ti2 directly.

Above are some questions just want to be make sure, thanks.

Fig. 1
<http://micro-manager.3463995.n2.nabble.com/file/t397284/%E5%9C%96%E7%89%872.png>

Fig. 2
<http://micro-manager.3463995.n2.nabble.com/file/t397284/fig2.png>

Fig.3
<http://micro-manager.3463995.n2.nabble.com/file/t397284/fig3.png>



Best,
Yong




--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
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: LabVIEW C++ MM wrapper for Nikon Ti2 microscope development

Micro-Manager mailing list
Hi,

I have already successfully build the MMCore.lib files as *Fig.1*. Now I'm
writing C++ wrapper as DLL. I also have mmgr)dal_NikonTi2.dll(I guess this
is the adapter, from the installation of micromanager) and
Ti2_Mic_Driver.dll(from installation of Ti2 control software) as Fig. 2.
However, there is no NikonTi2 project .cpp file opensource code open yet in
the micromanager2
(https://valelab4.ucsf.edu/svn/micromanager2/trunk/DeviceAdapters/) website.
To load the Nikon Ti2 device via loadDevice function, I need to know the
device name in the adapter. Is there anyone has the Nikon Ti2 adapter source
code? Or, please update on the source code website
(https://valelab4.ucsf.edu/svn/micromanager2/trunk/DeviceAdapters/), thanks.


Fig. 1:
<http://micro-manager.3463995.n2.nabble.com/file/t397284/mm1.png>
Fig. 2:
<http://micro-manager.3463995.n2.nabble.com/file/t397284/mm2.png>

Best,
Yong




--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
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: LabVIEW C++ MM wrapper for Nikon Ti2 microscope development

Micro-Manager mailing list
In reply to this post by Micro-Manager mailing list

Hi, Micro-Manager,

I'm writing C++ DLL wrapper for the micromanager of Nikon Ti2 microscope. So
far, I can build the MMCore.lib as Fig. 1, find the Nikon Ti2 adapter and
driver as Fig. 2. However, there is no Ti2 open source yet
(https://valelab4.ucsf.edu/svn/micromanager2/trunk/DeviceAdapters/). Is
there anyone have Ti2 project source code can share? I need to know the
device name in the adapter to load the device properly. Thanks.


Fig. 1
<http://micro-manager.3463995.n2.nabble.com/file/t397284/mm1.png>

Fig. 2
<http://micro-manager.3463995.n2.nabble.com/file/t397284/mm2.png>

Best,
Yong



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
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: LabVIEW C++ MM wrapper for Nikon Ti2 microscope development

Stuurman, Nico
On 12/23/2018 7:35 PM, YDSie via micro-manager-general wrote:
> I'm writing C++ DLL wrapper for the micromanager of Nikon Ti2 microscope. So
> far, I can build the MMCore.lib as Fig. 1, find the Nikon Ti2 adapter and
> driver as Fig. 2. However, there is no Ti2 open source yet
> (https://valelab4.ucsf.edu/svn/micromanager2/trunk/DeviceAdapters/). Is
> there anyone have Ti2 project source code can share? I need to know the
> device name in the adapter to load the device properly. Thanks.

Nikon does not allow the source code for the Ti2 adapter to be made
available.  However, you can use Micro-Manager itself to find the name
of the device (just go to the Hardware Configuration Wizard). If, for
one reason or another, you do not want to do that  you can use the core
functions getDeviceAdapterNames(), and getAvailableDevices(const char*
library) to get the name(s) of the devices in the Ti2 device adapter.

Best,

Nico



_______________________________________________
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: LabVIEW C++ MM wrapper for Nikon Ti2 microscope development

Micro-Manager mailing list
Hi, Nico,

Thanks for your information. I will try these two methods.

Best,
Yong



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
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: LabVIEW C++ MM wrapper for Nikon Ti2 microscope development

Micro-Manager mailing list
In reply to this post by Stuurman, Nico
Hi, Nico,

Sorry. I have a basic question. Do you know how to transfer the
"CMMCore::getDeviceAdapterNames" value to another variable? e.g. In my code,
that is "input_string" or 'x', thanks.

Follow is my code of C++:

#include <windows.h>
#include "stdafx.h"
#include <stdio.h>
#include <MMCore.h>
#include <MMDevice.h>
#include <Spectra.h>
#include <Error.h>
#include <vector>
#include <iostream>

using namespace std;

#define EXPORT __declspec (dllexport)

EXPORT void getDevice_dll(const char* input_string) //const char*
input_string
{
        const char* x;
        &CMMCore::getDeviceAdapterNames;
}

I'm sure that already link to the MMCore library as following figure.
<http://micro-manager.3463995.n2.nabble.com/file/t397284/fig1.png>

Best,
Yong



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general