MIPAR Python API · REST API
MIPAR on autopilot. Measurements go straight where you need them.
The recipe you built and validated in MIPAR can run from your own code: in a Python script, on a server, beside a camera or inside a production line. Every result goes straight into OriginPro, your SPC chart, your LIMS or your PLC. No exporting, no copy-paste, nobody clicking through folders at 6 a.m.
grain_size_E112.rcp
- Load image
- Detect
- Clean up
- Measure
- OriginPro report
- SPC chart
- LIMS / database
- PLC / MES
Feeds into
- OriginPro
- Python, pandas, Jupyter
- SPC and control charts
- LIMS and SQL databases
- Materials databases
- PLCs and MES
- Your own apps
The eye-opener
The analysis takes seconds. The rest of the job takes the afternoon.
Most labs already automated the measurement. Then a person still moves files, exports tables, pastes them into a spreadsheet and redraws the same chart. The API removes everything around the analysis.
Ten steps, one of them is the analysis
- Copy images from the microscope PC
- Open MIPAR, load the batch
- Run the recipe
- Export results to CSV
- Open the spreadsheet template
- Paste, check the columns lined up
- Update the control chart
- Type the lot result into the LIMS
- Save a PDF for the batch record
- Email the line that the lot is fine (or isn’t)
Typical: an afternoon per batch, and a typo waiting to happen
The image arrives. Everything else happens.
- A new image lands in a folder, or the camera sends it
- Your script or service calls the MIPAR recipe
- Measurements come back as data, not as a file to open
- OriginPro updates the report and the control chart
- The LIMS, database or PLC gets the numbers it needs
Same validated recipe. No exports, no copy-paste, every image measured
Two doors, one engine
Python API or REST API?
Both run the same MIPAR engine and the same recipes. They differ in how your systems talk to them.
Python API
MIPAR’s engine packaged as a Python library. Call a recipe on an image from your script and get the detected layers and measurements back as data.
- Runs on
- A workstation or a network server
- Talks to
- Anything Python reaches: pandas, Jupyter, OriginPro, SQL, your own tools
- Scale
- Process images in parallel for large data sets
- Best when
- Your team already works in Python, or you want results inside an analysis pipeline
REST API
The same engine in a Docker container with a web interface. Anything that can send an HTTP request can send an image and get the measurements back as JSON, with or without the result image.
- Runs on
- A server on your network, or a cloud container service
- Talks to
- C#, Java, LabVIEW, MATLAB, web apps, industrial controllers via a gateway
- Robust
- Docker restarts the service after an error and starts it at boot
- Best when
- Several systems or users share one analysis service, or the client isn’t Python
Build the recipe with the mouse. Run it without one.
Nobody writes image analysis in code here. You design and validate the recipe in the normal MIPAR desktop, the way you always do. The API only runs it. Change the recipe, and every connected system uses the new version.
Four jobs, with the code
What it looks like in practice
Pick a job. Each one is a pattern we set up with customers, shown as short, readable code.
Shortened to show the idea. Exact MIPAR calls and options are in the MIPAR API manual, and we set up the real version with you.
Live demo · simulated data
Catch the drift while the furnace is still hot.
Every image the API measures becomes a point on a control chart, seconds after the picture is taken. Press the button to nudge the process and watch what an automated chart does with it.
ASTM E112 grain size number G per image, X chart with 3-sigma limits and a “7 in a row” run rule. In real life the same chart lives in OriginPro or your SPC system.
Where teams use it
From the research server to the factory floor
Recipes inside a materials database
A web application lets engineers run MIPAR recipes on micrographs already stored in their materials database, and stores the results next to the images.
Defect inspection in an imaging system
MIPAR detection runs inside an industrial imaging system that inspects integrated circuits, flagging defects as parts pass.
Closed-loop particle size control
A device measures grind particles in real time. The PLC feeds the size into a PID controller that adjusts the process to hold the target.
MIPAR + OriginPro
Why OriginPro on the other end?
OriginPro has Python built in, and its originpro package can be driven from outside too. That makes it a natural destination for MIPAR results: one script runs the analysis and builds the finished graphs.
We sell and support both, so the whole chain comes from one partner. See OriginPro at SciSpot.
- 1
Straight into worksheets
A pandas table of MIPAR results becomes an OriginPro worksheet in one line, with units and long names.
- 2
Graph templates, the same every time
Histograms, distributions, box charts and control charts from your saved templates. Publication-ready, not “close enough”.
- 3
Analysis that re-runs itself
Fits, statistics and comparisons between lots, kept as an analysis template that recalculates when new results arrive.
- 4
One project per batch
Each batch saved as its own project with images, data, graphs and statistics together, ready for the batch record.
Honest fit check
Is the API right for you?
It’s a powerful tool, and not always the one you need. Here’s the straight answer.
A great fit when
- You process many images, every day or every shift
- Results should land in another system without anyone touching them
- There is an existing pipeline in Python or another language to plug into
- You build instruments or machines and want MIPAR analysis inside them
- Someone on your team writes Python or calls web services, and we help with the rest
Probably not needed when
- Volumes are modest. MIPAR’s built-in batch and real-time processing already automate the analysis, no code needed.
- You need an answer in under a second per image. The API is not built for hard sub-second timing.
- The recipe uses Spotlight. Spotlight steps can’t run through the API yet; we design an API-ready recipe instead.
- The model is an imported PyTorch file. Deep learning runs through the API with MIPAR’s own model format.
Bring answers to these four questions to our first call:
- What does your image pipeline look like today, from camera to report?
- Where does it waste time, or where do errors creep in?
- Which languages and systems are involved (Python, C#, LIMS, PLC…)?
- Where should the numbers end up, and who looks at them?
How we work
From whiteboard to running pipeline
- Step 1
Map the pipeline
One call: where the images come from, where the numbers go, what has to be traceable.
- Step 2
Recipe first
We build and validate the MIPAR recipe on your images, in the desktop, before any code. See how recipes work.
- Step 3
Connect
Python API or REST API set up on your machine or server, licences activated, first script or service running.
- Step 4
Into your systems
OriginPro reports, SPC, LIMS or PLC. Audit trail where needed: data compliance.
Questions
MIPAR API, answered
Do we need programmers to use the API?
Someone who can write a short Python script or call a web service. The image analysis itself is built in the normal MIPAR desktop without code. We help set up the connection and the first scripts.
Python API or REST API: which one should we choose?
Python API if your pipeline is in Python or you want results inside an analysis script. REST API if the client is another language or device, if several systems share one analysis service, or if you want it running as a managed service on a server.
Can we run the recipes we already have?
Yes, the API runs normal MIPAR recipes. A few things differ: Spotlight steps can’t run through the API yet, deep learning models must be in MIPAR’s own format rather than imported PyTorch files, and steps that wait for user input are skipped. We check your recipes before you start.
How fast is it?
As fast as the recipe, and you can process images in parallel for throughput. It isn’t designed for hard real-time jobs that need an answer in under a second per image.
Where does it run, and where does our data go?
On your own workstation or server, or in a container on your network or your cloud account. Images and results stay inside your infrastructure.
Do we need OriginPro?
No. Results can go to any system. We suggest OriginPro when you want finished graphs, statistics and reports without building them yourself, because it can be driven from Python.
How is the API licensed?
The API is activated with a MIPAR product key, as a local or network licence. We quote it together with the MIPAR licence and support you already have, under your existing agreement.
We only process a few dozen images a week. Do we need this?
Probably not. MIPAR’s batch processing and real-time processing in the desktop already automate that, without code. We’ll tell you honestly which one fits.
MIPAR is a product of MIPAR Software. OriginPro is a product of OriginLab. Code examples are shortened illustrations.
Tell us where your numbers should land.
Half an hour with your pipeline on a whiteboard, and we’ll show you which API fits and what the first script looks like.
