Skip to main content

inv2dcm

inv2dcm is a Python package and CLI for converting InVivo .inv files into Enhanced CT DICOM (.dcm).

It is built for dental CBCT / cone beam CT data associated with InVivoDentalViewer, CliniView, and Anatomage workflows, including scans from systems such as Instrumentarium Dental ORTHOPANTOMOGRAPH OP 3D Pro.

The .inv files handled here use the INVFile XML container format, with an AppendedData payload containing JPEG 2000-compressed voxel data.

If you are searching for an INV to DICOM converter, InVivo INV file reader, dental CBCT to DICOM tool, cone beam CT to pydicom, or a way to convert .inv to 3D Slicer / VolView compatible DICOM, this package is intended for that use case.

Features

  • Converts proprietary .inv volume files to Enhanced CT DICOM
  • Outputs a single multi-frame DICOM file
  • Reads scan metadata from the INV XML header
  • Decodes embedded JPEG 2000 codestreams in pure Python via imagecodecs
  • Produces output readable by:
    • pydicom
    • 3D Slicer
    • VolView
    • other DICOM-capable medical imaging tools
  • Includes both a Python library API and a CLI command: inv2dcm

Installation

From source

pip install .

Development install

pip install -e .

CLI usage

After installation, the console script is available as:

inv2dcm

Convert a file

inv2dcm scan.inv

This writes <input-stem>.dcm next to the source file.

Convert to a specific output path

inv2dcm scan.inv output/scan.dcm

Control DICOM window metadata

inv2dcm scan.inv output/scan.dcm --window auto

Available modes:

  • auto — derive a sane window center/width from the volume data
  • source — preserve the source INV window metadata
  • none — omit DICOM window center/width metadata

Python library usage

inv2dcm is importable as a normal Python library, so it is suitable for publishing on PyPI and embedding in larger imaging workflows.

Simple conversion

from pathlib import Path
from inv2dcm import convert_inv_to_dicom

convert_inv_to_dicom(Path("scan.inv"), Path("scan.dcm"), window_mode="auto")

Inspect decoded metadata and volume data

from pathlib import Path
from inv2dcm import load_inv

inv = load_inv(Path("scan.inv"))
print(inv.metadata)
print(inv.volume.shape)

Build the pydicom dataset yourself

from pathlib import Path
from inv2dcm import build_enhanced_ct, load_inv

inv = load_inv(Path("scan.inv"))
ds = build_enhanced_ct(inv, Path("scan.dcm"))
print(ds.SOPClassUID)
print(ds.NumberOfFrames)

Public API

  • load_inv(path)
  • build_enhanced_ct(inv, output_path, window_mode="auto")
  • convert_inv_to_dicom(input_path, output_path, window_mode="auto")

Verify with pydicom

import pydicom

ds = pydicom.dcmread("scan.dcm")
print(ds.NumberOfFrames)
print(ds.Rows, ds.Columns)
print(ds.pixel_array.shape)

View the converted DICOM in the browser

You can drag the generated .dcm file directly into VolView:

This is a convenient way to inspect the converted dental CBCT volume in the browser without installing a desktop viewer.

What kind of INV files are supported?

This project targets InVivo dental CBCT .inv files using the INVFile container format.

In practice, that means files with:

  • an XML document rooted at INVFile
  • bytes that begin with <INVFile
  • an AppendedData block
  • JPEG 2000 codestream containers storing the voxel data

That matches the structure documented by reverse-engineering work on InVivo / CliniView / Anatomage-related CBCT archives.

Reverse-engineering references

This package was informed by prior work on the InVivo / CliniView .inv format and related dental CBCT tooling:

Output format

The generated DICOM file uses:

  • SOP Class: Enhanced CT Image Storage
  • Transfer Syntax: Explicit VR Little Endian
  • Photometric Interpretation: MONOCHROME2
  • Multi-frame volume storage for easy loading in Python and modern viewers

Why this package exists

The .inv format is awkward to use in standard Python medical imaging workflows. inv2dcm converts proprietary InVivo CBCT data into standard DICOM so it can be opened with pydicom, reviewed in 3D Slicer, or inspected in VolView.

Development

The CLI entry point is:

  • inv2dcm → inv2dcm.py

You can also run it directly during development:

python inv2dcm.py scan.inv scan.dcm

Keywords

INV to DICOM, InVivo INV converter, INVFile parser, dental CBCT DICOM converter, cone beam CT DICOM, JPEG 2000 medical imaging, pydicom INV import, InVivoDentalViewer export, CliniView INV parser, Anatomage InVivo, VolView DICOM viewer.

Metadata

Release files for inv2dcm 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inv2dcm 1.0.0
File Size Uploaded Provenance Actions
inv2dcm-1.0.0.tar.gz 10.9 kB Without provenance Details for inv2dcm-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inv2dcm 1.0.0
File Interpreter ABI Platform Actions
inv2dcm-1.0.0-py3-none-any.whl Python 3 none any Details for inv2dcm-1.0.0-py3-none-any.whl

Total release size: 21.5 kB

Release files / inv2dcm-1.0.0.tar.gz

Download URL inv2dcm-1.0.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5d1c494ebc571055ef787ba904d28e38b4829a8ee6a83404bd619962379a3abd
BLAKE2b-256 checksum
How to use checksums
b91a5fdf431acda82d6eada4946259e556bedcc83bb328d050e8fc33253bf924
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.17

Release files / inv2dcm-1.0.0-py3-none-any.whl

Download URL inv2dcm-1.0.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe5cb95531c3aa5718b2448c577ae9b11f5175371871fc933bb40dc6a5cf8299
BLAKE2b-256 checksum
How to use checksums
d89da580fb50414fd4455505e10d5c844f11f8383c32f596416c9157de345f55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.17

Security for inv2dcm 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page