Skip to main content

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

Project description

PyC3Dserver

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

Description

PyC3Dserver is a python interace 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 using PyC3Dserver will be in the form of NumPy arrays. So it is recommended to import NumPy as well.

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.c3d")

Following functions are most useful in order 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)

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

# Close the open 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.

Dependencies

References

How to cite this work (all versions)

  • Please check the lastet version on the link: DOI

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyc3dserver-0.0.3.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

pyc3dserver-0.0.3-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file pyc3dserver-0.0.3.tar.gz.

File metadata

  • Download URL: pyc3dserver-0.0.3.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for pyc3dserver-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e750a3d71b2fdf83d36ba215e647d7b276cd9b3a4c84b91b928413088d308e72
MD5 b8fb20a3316526cbedf5ec6d8c7a2925
BLAKE2b-256 806e1d8e7fe5bdf18b5df9904792facbdcae86d069285ac811c31a8fa24da508

See more details on using hashes here.

File details

Details for the file pyc3dserver-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pyc3dserver-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for pyc3dserver-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 350c6f16b7f7b90f501524cb5c06d2c703fcf353f644d8ba5860f4532fba4611
MD5 fc4655d61e92587400594cad1db95ec2
BLAKE2b-256 6ce00b4cd4a0296486aac71f5fb8b79009511584304f90d8e093c4b2a167609e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page