How to export data from another program (C #) to Image-Pro V10
I want to write the data created by another program (C #) to Image-Pro V10.
Image-Pro Analyzer has a function (IpDocPutArea) for writing data from another program to Image-Pro Analyzer. I want to do the same with Image-Pro V10.
I looked in the forum and found the following URL.
URL:
https://forums.mediacy.com/discussion/395/pixel-level-manipulation-too-slow-and-needs-to-work-on-larger-image
How can I do the contents written in the above URL with another program (C #)? .
Image-Pro Analyzer has a function (IpDocPutArea) for writing data from another program to Image-Pro Analyzer. I want to do the same with Image-Pro V10.
I looked in the forum and found the following URL.
URL:
https://forums.mediacy.com/discussion/395/pixel-level-manipulation-too-slow-and-needs-to-work-on-larger-image
How can I do the contents written in the above URL with another program (C #)? .
Thanks in advance
Chono
0
Answers
The build-in programming language of Image-Pro 10 workbench is VB.NET. It would be easier to write your code in VB, so you can use the example in the link you've found. There are online code converters that can convert C# code to VB.NET (http://converter.telerik.com/ )
It is also possible to create external Addins for mage-Pro 10 in any .NET language, including C#. But it's more complicated, and require some additional tools.
Yuri
I am not good at writing English. So I seem to have asked a misleading question.
Let me ask you a question again.
When you installed Image-Pro V10, a sample program folder was created.
(C: \ Program Files \ Media Cybernetics \ Image-Pro 10 \ Automation \ Samples \ C #)
I want to know how to write ushort data to Image-Pro V10 using this sample code.
I think it is wrong, but I wrote the following code.
① Create mciqtGray16 window in Image-Pro v10.
② Draw ushort data ("put Data") in this window.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
object image = null;
{
auto.Application.DocumentCommandClasses.OpenCommand c =
auto.Application.DocumentCommands.Open(_session);
}
{
///How should I write here?--->
auto.Adjust.ImageCommandClasses.NewCommand n = auto.Adjust.ImageCommands.New(_session);
n.DotsPerInchX = 1;
n.DotsPerInchY = 1;
n.Name = "testImage";
n.NumberOfFrames = 1;
n.Value = 0;
n.Type = IQL.Engine.mcImageQuickTypes.mciqtGray16;
n.Height = 1024;
n.Width = 1024;
n.NumberOfFrames = 1;
n.Visible = true;
n.Run(ref image);
IQL.Engine.McImage test_mcimage = null;
ushort[,] putData = new ushort[1024, 1024];
putData[3, 3] = 1000;
//I want to write ushort putData to "test image".
//<---How should I write here?
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
You should use the same code as in the link (you may need to change type to handle 16-bit, e.g. Int16 instead of Byte):
It can be converted to C#, here is automatically converted code (not tested):
If you use VB.NET, you don't need external program, you can do everything in the project workbench.
Yuri