viff-xv
A viff or xv file is from Khoros/VisiQuest packages which has a header of 1024 bytes and is BSQ formated raw raster file. The file is parsed based upon the C struct definition provided in the source section.
Requirements
- Python 3.7
- numpy
Features and I/O
Read
data = viff.read(filename: str)
Write
viff.write(filename: str, data: np.array)
Variable Description
- filenames (str) - Path to the input file to read
- data (np.array) - data to save formated as np.array with dimensions [NumberOfImages,NumberOfBands,NumberOfColumns,NumberOfRows]
Code Example
Read and Display File
Read and display the first image and band of the read in file.
import viff
import matplotlib.pyplot as plt
import argparse
parser = argparse.ArgumentParser(description='viff reader example')
parser.add_argument('--file', type=str, help='filename (default=None)')
parser.add_argument('--save', action='store_true', help='save a copy as testing.xv')
args = parser.parse_args()
""" Read a file """
data = viff.read(args.file)
plt.imshow(data[0,0,:,:])
plt.show()
Write a new file
if args.save:
""" Write a new file """
viff.write('testing.xv',data)
Command line usage
$ python viff.py --file <filename> --save
This generates a plot and a new file 'testing.xv'.
Sources:
File Format
Metadata
Release files for viffIO 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| viffIO-0.0.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| viffIO-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / viffIO-0.0.1.tar.gz
| Download URL | viffIO-0.0.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19c1c8da03291eedab93c9b38efdbeb06da7d98617100d307e74376e4c58a043
|
|
BLAKE2b-256 checksum How to use checksums |
9a7cba983d740ce80fd439a2d7c650d142c64fd004fca0ba7be43a15147d0c12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201103 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9
|
Release files / viffIO-0.0.1-py3-none-any.whl
| Download URL | viffIO-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
555013621b52e7b076b9dc7baf03c0f759093359241b6f884df9d547dce22d8a
|
|
BLAKE2b-256 checksum How to use checksums |
6074dd7477b8ca413eed55f5d646cae74e2c5cf02b9f7a3cbb23eeb256a933a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201103 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9
|