Skip to main content

PyC3Dserver

Python interface of C3Dserver software for reading and editing C3D motion capture files.

Description

PyC3Dserver is a python inteface of C3Dserver using PyWin32.

Installation

PyC3Dserver can be installed from PyPI using pip on Python>=3.7.

pip install pyc3dserver

Prerequisites

C3Dserver x64 edition (for Windows x64 platforms) installation: https://www.c3dserver.com/

Usage

Most of numerical inputs and outputs for PyC3Dserver will be in the form of NumPy arrays. So let's import NumPy module.

import numpy as np

After the installation of PyC3Dserver, you can import it as follows:

import pyc3dserver as c3d

You can get the COM object of C3Dserver like this. You need to use this COM object while you are working with PyC3Dserver module.

# Get the COM object of C3Dserver
itf = c3d.c3dserver()

Then, you can open a C3D file.

# Open a C3D file
ret = c3d.open_c3d(itf, "sample_file.c3d")

Following functions are the most useful ones to extract the information from a C3D file. All the outputs are python dictionary types.

# For the information of header
dict_header = c3d.get_dict_header(itf)
# For the information of all groups
dict_groups = c3d.get_dict_groups(itf)
# For the information of all markers(points)
dict_markers = c3d.get_dict_markers(itf)
# For the information of all forces/moments
dict_forces = c3d.get_dict_forces(itf)
# For the information of all analogs(excluding or including forces/moments)
dict_analogs = c3d.get_dict_analogs(itf)

If you made any modification in the C3Dserver and want to save it, you need to use the following function explicitly.

# Save the C3D file from C3Dserver
ret = c3d.save_c3d(itf, "new_file.c3d")

After all your processes, it is recommended to close the C3D file from C3Dserver.

# Close the C3D file from C3Dserver
ret = c3d.close_c3d(itf)

Examples

There are more functions to get the information of individual markers and analogs. Also there are other functions for editing C3D files. You can find some examples here.

Limitations

PyC3Dserver tries to implement some useful functions using C3Dserver internally, but it does not cover full potential features of C3Dserver. You can develop your own functions using the COM object of C3Dserver in Python.

And PyC3Dserver is under heavy development so that many things may change during this period.

Dependencies

References

Python IDE recommendation

Acknowledgement

This work was funded by the European Union's Horizon 2020 research and innovation programme (Project EXTEND - Bidirectional Hyper-Connected Neural System) under grant agreement No 779982.

How to cite this work

DOI

License

MIT

Release files for pyc3dserver 0.3.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 pyc3dserver 0.3.0
File Size Uploaded
pyc3dserver-0.3.0.tar.gz 28.7 kB Details

Built distribution (wheel)

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

Total release size: 56.9 kB

Release files / pyc3dserver-0.3.0.tar.gz

Download URL pyc3dserver-0.3.0.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ded10663c2bff2c35e17354b657da85cd72e7dbff7dd276632306e0889d10b36
BLAKE2b-256 checksum
How to use checksums
2f4a006feabf271ec5cedca0e637217ac7b20dbc290e966112b9cd9c0171d7e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release files / pyc3dserver-0.3.0-py3-none-any.whl

Download URL pyc3dserver-0.3.0-py3-none-any.whl
Size 28.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ba9e84a395968ecc2461958045633b4a878c0a04b2376c95259c29b93df2cd5
BLAKE2b-256 checksum
How to use checksums
5fa775102098b492ba47d2f4d69dd7a9de5f7c6668b28dfe18c421e367ba0b03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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