What options are there for interfacing with / controlling ImageJ/Fiji from another program?
I need to use some image filters that are available in Fiji. However, I cannot have Fiji be the centre of my workflow. I am using another system (scripting language) for that. I must manipulate some data in that other system, apply a filter to an image, get the result, then continue manipulating that image.
What are my options? What features does Fiji provide that make this possible?
In particular, is it possible to do this if the system I am using does not have a Java interface? It does have a C interface, and it can invoke command line programs.
For context: I want to interface Fiji with Mathematica. Mathematica does have a Java interface but it appears to lack support for some Java 8 features that ImageJ requires. I also don't know much Java and I am looking for a simple solution that I can set up quickly, rather than a long-term robust solution that requires a high initial investment.
If you can't run the ImageJ filters through Java integration, you may be able to write the necessary operations into an .igm macro and then get ImageJ to run it in headless mode.
Otherwise, it may be simpler to port the Java code for the particular filters that you need into a more convenient environment. ImageJ is primarily set up for GUI use, and Java/CLI/other integration can get messy very quickly.
How do I create a pre-trained standalone application in MATLAB?
I used the workspace to run the code. I will like to create a standalone application so as to share with others without MATLAB to test the neural network.
Thanks
By stand-alone application, I am guessing that you want to create a GUI (Graphical User Interface) that people can use to test images on your network. If this is the case, you can either use the GUIDE or App Designer frameworks that MATLAB offers.
Note, however, if you plan on using MATLAB to develop this UI, the user will need MATLAB Runtime installed because you are coding in MATLAB. Just as if you created a program in python, the user would need python in order to run the program.
I have written Matlab code( musclualr software package), frequently l have seen move application to the cloud service, and now l want to learn cloud computing, l start with my application, but l want to know the aims of converting matlab code to cloud service?
I know that this an old question. Since there could be anyone else looking for answers I will state it here.
I believe what you are trying to achieve is migrating your current matlab application to cloud service.
There are 2 ways that you can do this.
Using Matlab compiler - Matlab compiler lets you create DLL , jar depending on your language. Currently it supports .Net , Java , C/C++ , python etc.However there are limitations for this. As of you can't 100% guarantee that you will be able to rewrite youre entire codebase. and also matlab offers better solution for this scenario.(stated below)
Using Matlab production server - If you are looking to develop web application using your matlab code this is your ultimate solution I believe. matlab production server works like a REST service. you can host your matlab files(.m) inside the production server.
What happens here is matlab compiles your code using matlab compiler and deploy it in their cloud. afterwards you can consume this like a api through their sdk however.
https://in.mathworks.com/help/mps/qs/create-a-deployable-archive-for-matlab-production-server.html
I have attached the link here incase if anyone is interested.
Can I use MATLAB for website development?
I want to embed image processing into C#.net web application.
If any other tool used for website development.
Thanks
Abhishek
One way would be to create CGI files that could be called by a web server. Have a look here and here.
EDIT:
I was thinking about this more and I think that you could also use matlab for web applications through python. Specifically, mlabwrap would give very nice interface to matlab. mlabwrap is very good, i personally use it to access matlab from python. Thus you could build web app using python's pylons or django and access matlab through mlabwrap.
You could have a look at Matlab Builder NE, a Mathworks product for creating .Net components that might be perfect to integrate with your .Net web app:
http://www.mathworks.com/products/netbuilder/
No personal experience with this, but it sounds like something that would suit your needs perfectly.
For learning purposes i'm developing a Class generation application in c# and winforms. I think It could be fine to include a command-line mode that allow to use the application in scripts.
It's a good practice to include a command-line mode in my applications? It would be better to have two different programs, one with GUI in one for the command-line?
Actually having a C# application be both console and GUI is problematic. Console applications (/t:exe) are launched and then the command prompt waits for them to finish. GUI applications (/t:winexe) the command shell launches them and then returns immediately. While you can create and run forms from a 'console' application, it will always have a background console displayed. On the other hand 'Forms' application don't have the stdin, stdout and stderr connected and, while they can behave as command line tools and process command arguments, they have problems when embedded in scripts (because the standard input/output is not hooked up).
If you want to expose the functionality from both GUI driven applications and scriptable/pipe-able batch processing too the best way is to compile your functionality into a class library, then built two separate applications (one GUI one console) that leverage that library.
I'm not a C# programmer, but when I program in C++, I find it most useful to:
1.) Create both a shared library with a C as well as C++ API for performing core app functionality.
2.) Create one or more commandline binaries accessible to the shell interpreter.
3.) Create a GUI application for typical end users, implemented with the library (not by invoking the binaries).
This separates the logic of the application from the interface to the application, and enables thirdparty developers to create alternative interfaces for the same application functionality. It also makes it easy to script, while at the same time catering to typical end users who want a nice, shiny GUI.
Yes. If you think the program will be useful in a scripted environment then include a command line mode (without UI) so it can be used in scripts.
It doesn't have to be a separate application, but it can be. Whether you want to do that or not is entirely up to you. I'd imagine that if you had two applications they'd share the same logic assemblies but the interface (one a GUI the other a command line) would just be different.
I agree with michaelsafyan about creating a library with core functionality.
What I would add is that you should check out powershell cmdlets as well.
Much command line activity will be migrating to powershell and it brings a lot to the table.
http://en.wikipedia.org/wiki/Windows_PowerShell
I very often create such a utility as an API. If I need to use it from a simple command-line utility, that's easy - it just calls the API. If the command-line gets too complex, maybe it's time for a Winforms application - which can also call the API. If I wanted to use it from PowerShell, or from an MSBUILD task, those are still easy - they just call the API.
Creating an application on the windows platform that behaves correctly as a console application can be problematic it's an issue with the windows kernel architecture as they're considered two different types of application (they have a different subsystem that you generally specify in the compiler or linker options). You can still manually redirect the IO and open a console from a win32 application by the win32 function AllocConsole() and friends but this also has some issues. See This Old New Thing post for more information.
If you want your utility/prgram run in scripts you can expose it as COM.
Many script languages for windows had the hability to use COM objects directly.
You should include a command line interface in your application,
if it enhances usability and comfort.
For instance, calling a CLI command might be faster then starting the GUI, navigating through several menu layers to reach the same functionality.
You might ask the users of your application, if they would find it useful to have a CLI mode.
Some words on marrying CLI & GUI on Windows:
A windows application is either a GUI application or a Console application, but not both. This is an OS issue and there is probably nothing one can do about it.
The console subsystem in Windows is horrible and PowerShell didn't change that.
Your implementation options on Windows are:
the two files approach:
Provide two files: one .com with console, one .exe with GUI.
Because of the executable probing on the command line, the com file will get executed before the exe.
the console flickering approach:
Compile your GUI application with console mode on, then immediately after the start of the GUI you might call FreeConsole() to close it.
It's a bit annoying, but works. Bad: now you have a flickering console window. Pro: still one file.
I agree with #Remus Rusanu.
you should create a class library of your core functionality and then build GUI app(wrapper) for that.
and one other benefit of it is you might not even need to create a command line app as you can access your .net dll features using powershell..
you can find one example over here
Another great idea is to embed a scripting language. Then your program can be controlled by a script, and you get all the logic, branching, etc from the scripting language "for free."
There are many choices of what you can embed. Lua is one of the most popular and intended for just that purpose and is an excellent choice.
However, for a general purpose app, I'd take a hard look at embedding Python. Python is so popular, you'd have a larger group of people willing to take the effort to write a script for your app.