-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build a dll with fictrac, to be called from LabView #4
Comments
Hi Wenbin, the FicTrac software is actually already a library (fictrac_core). The FicTrac executable is just a lightweight wrapper for this library. You'll find the library at fictrac\lib\Release\fictrac_core.lib if you built on a Windows machine. At the moment this library is build as a static library (.lib). You can convert a .lib to shared library (.dll) by writing a def file, or - more simply - by adding some code to each function you would like to call externally and recompiling as a dll. See, e.g. this page for details. When I get a chance I can see exactly which steps are needed to build the dll and provide you with some specific instructions - but you're welcome to follow above link and try your self in the meantime :-) |
Will just add that Trackball.cpp/.h contains the implementation/interface for the fictrac_core library. Which functionalities would you want to have access to from Labview? Currently, there is really only one function to call: the Trackball constructor which takes the config file as a parameter, FicTrac will run automatically after that until the image stream ends or until terminate() is called. Do you, for example, want to receive the output data via the API (instead of via sockets, etc), or be able to pause/restart tracking, or something else? |
Thank you very much for your response. It's really helpful. |
Ok, currently there is no way to receive the output data each frame via the api - but it won't be hard for me to add a function that you can call to receive the current data. Then you will just have to call that function as often as you want data. Alternatively, I can allow you to register a callback. Not sure how familiar you are with c++ but would either of these approaches work? |
Yeah. I prefer the first approach. I'm okay with c++. I managed to write a C++ program called BLITZ which allows a projector, cameras, relay, and online image processing talking with each other. However, I have to confess compilation is always a headache to me, I'm heavily relying on what MSVS can provide me. |
Hi Dr. Richard Moore, my name is Wenbin. I'm now working with Ashwin Miriyala from Scott Waddell's Lab. Ashwin might have talked with you about what we are doing now. Basically, we want to incorporate your excellent tracking program into another labview program. So that we can make a close control loop between odor release and fly behaviors.
My idea is to build a dll with your Fictrac, then call it from "Call library function node" from LabView. I have walked through basic tutorials about Creating a dll (c++) with VS and Configuring call library function node.
Any guidelines/suggestions for building a dll with your Fictrac? since I noticed that there seem to be several differences between console programs and dll programs.
Thank you in advance and your great Fictrac.
The text was updated successfully, but these errors were encountered: