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.

Python APIREST API in DockerSame recipes as the desktopRuns on your own network
mipar-api · line 2running
lot_2417_014.tif
MIPAR recipe grain_size_E112.rcp
  1. Load image
  2. Detect
  3. Clean up
  4. Measure
  • OriginPro report
  • SPC chart
  • LIMS / database
  • PLC / MES
Example data0 images processed

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.

Today, by hand

Ten steps, one of them is the analysis

  1. Copy images from the microscope PC
  2. Open MIPAR, load the batch
  3. Run the recipe
  4. Export results to CSV
  5. Open the spreadsheet template
  6. Paste, check the columns lined up
  7. Update the control chart
  8. Type the lot result into the LIMS
  9. Save a PDF for the batch record
  10. Email the line that the lot is fine (or isn’t)

Typical: an afternoon per batch, and a typo waiting to happen

With the MIPAR API

The image arrives. Everything else happens.

  1. A new image lands in a folder, or the camera sends it
  2. Your script or service calls the MIPAR recipe
  3. Measurements come back as data, not as a file to open
  4. OriginPro updates the report and the control chart
  5. 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.

For Python pipelines

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
For any language, any device

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.

Uses
Good for
batch_to_origin.py

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.

Grain size G · line 2 · per imageIn control
Last G–
Mean (last 20)–
Images0
StatusOK
Waiting for the next image…

What comes back

Numbers your other systems can read

A result is structured data, not a screenshot. Every system downstream takes the fields it needs.

Per featureEach grain, particle or defect with its own size and shape values
SummaryCount, mean, distribution values and standard results such as ASTM G
LayersThe detected regions themselves, for overlays and audit
Result imageOptional with the REST API, so you can skip it when only numbers matter
result.json (example, shortened)
{
  "image": "lot_2417_014.tif",
  "recipe": "grain_size_E112.rcp",
  "summary": {
    "count": 1843,
    "astm_g": 7.12,
    "mean_diameter_um": 31.4,
    "std_diameter_um": 9.8
  },
  "features": [
    { "id": 1, "area_um2": 812.6, "ecd_um": 32.2, "aspect_ratio": 1.31 },
    { "id": 2, "area_um2": 604.1, "ecd_um": 27.7, "aspect_ratio": 1.12 },
    "…"
  ]
}

Where teams use it

From the research server to the factory floor

R&D · materials data

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.

QC · electronics

Defect inspection in an imaging system

MIPAR detection runs inside an industrial imaging system that inspects integrated circuits, flagging defects as parts pass.

Production · grinding

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.

Lab · high volume

Headless batch processing

Thousands of images a week processed overnight on a server, with results labelled by sample and written straight to shared storage.

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:

  1. What does your image pipeline look like today, from camera to report?
  2. Where does it waste time, or where do errors creep in?
  3. Which languages and systems are involved (Python, C#, LIMS, PLC…)?
  4. Where should the numbers end up, and who looks at them?

How we work

From whiteboard to running pipeline

  1. Step 1

    Map the pipeline

    One call: where the images come from, where the numbers go, what has to be traceable.

  2. Step 2

    Recipe first

    We build and validate the MIPAR recipe on your images, in the desktop, before any code. See how recipes work.

  3. Step 3

    Connect

    Python API or REST API set up on your machine or server, licences activated, first script or service running.

  4. 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.