{"id":18265157,"url":"https://github.com/nasa-ammos/vector","last_synced_at":"2025-04-12T00:13:59.833Z","repository":{"id":186802728,"uuid":"667911394","full_name":"NASA-AMMOS/VECTOR","owner":"NASA-AMMOS","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-11T22:24:04.000Z","size":1713,"stargazers_count":21,"open_issues_count":3,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-12T00:13:53.895Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NASA-AMMOS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-18T15:20:14.000Z","updated_at":"2025-04-11T08:51:09.000Z","dependencies_parsed_at":"2024-04-28T21:59:05.901Z","dependency_job_id":null,"html_url":"https://github.com/NASA-AMMOS/VECTOR","commit_stats":null,"previous_names":["nasa-ammos/vector"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2FVECTOR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2FVECTOR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2FVECTOR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2FVECTOR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NASA-AMMOS","download_url":"https://codeload.github.com/NASA-AMMOS/VECTOR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497820,"owners_count":21113984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:17:18.481Z","updated_at":"2025-04-12T00:13:59.808Z","avatar_url":"https://github.com/NASA-AMMOS.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VECTOR\n\nVisualization and Editing of Camera Tiepoints, Orientations, and Residuals\n\n## Development\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nYou will need to install this software beforehand:\n\n```\nNode.js v16.15.1\nnpm v8.11.0\n```\n\nTo install Node.js and npm, you can use [nvm](https://github.com/nvm-sh/nvm):\n\n1. Install nvm from GitHub. Running this command will attempt to add the nvm path to the user profile. This can fail and a warning will be outputted. To resolve the issue, please look at the [GitHub](https://github.com/nvm-sh/nvm#install--update-script).\n\n```bash\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash\n```\n\n2. Install the correct version of Node.js.\n\n```bash\nnvm install 16.15.1\n```\n\n3. Set the default Node.js version.\n\n```bash\nnvm alias default 16.15.1\n```\n\n4. Restart your terminal and confirm your Node.js version.\n\n```bash\nnode --version\n\u003e v16.15.1\n```\n\n### Installation\n\n1. Clone the repository.\n\n```bash\ngit clone git@github.jpl.nasa.gov:vis-program/vector.git\n```\n\n2. Switch to the project directory and install the necessary dependencies.\n\n```bash\ncd vector\nnpm install\n```\n\n3. Run the application.\n\n```bash\nnpm run dev\n```\n\n## File Loaders\n\nVECTOR loads files using the File System Access API available in modern browsers. VECTOR introduces a `Loader` interface that can be implemented to parse a `File` object into XML, PNG, VICAR, etc...\n\n### File Extensions\n\nEach implementation of Loader includes an `EXTENSIONS` property that defines what extensions a `Loader` supports. For example, this is the `XMLLoader`:\n\n```typescript\nexport default class XMLLoader extends Loader {\n    static EXTENSIONS = ['xml', 'tie', 'tpt', 'nav'];\n\n    ...\n}\n```\n\nThis is useful when files have custom extensions that are non-standard. If you need to support a new file extension, you can update the `EXTENSIONS` property.\n\n### Custom Loader\n\nAnyone can implement a new `Loader` by extending the abstract base class `Loader` and satisfying the type constraints. You will also need to update the Landing route to handle your new loader.\n\n```typescript\nexport default class MyLoader extends Loader {\n    static EXTENSIONS: string[] = ['kazi', 'jawad'];\n\n    static async load(...): Promise\u003c...\u003e {\n        ...\n    }\n}\n```\n\nIf a method is not implemented an `Error` will be thrown when that method is called inside VECTOR.\n\nHowever, **not every** method needs an implementation. If you are not exporting to a file type, the `write` method does not need to be implemented.\n\n## File Formats\n\nVECTOR requires camera, track, and image information to be uploaded by the user.\nTo allow for flexibility in the data processing, VECTOR exposes a `Format` interface that can be implemented to translate various formats into VECTOR's data structures.\n\nVECTOR **does not** handle different coordinate systems, so tracks and cameras are expected to be in the same coordinate system.\n\n### VISOR Format\n\nThe VISOR format is currently used at NASA's Jet Propulsion Laboratory for the Mars 2020 mission.\nIt defines a `navigation.xml` and `tiepoints.xml` alongside a directory of images that match against a `unique_id` attribute defined inside the `tiepoints.xml`.\n\n### VECTOR Format\n\nThe VECTOR format is specifically designed for VECTOR. Therefore, it involves less processing time and is structured exactly like VECTOR's internal data structures.\nIt defines a `cameras.xml` and `tracks.xml` alongside a directory of images, where the `cameras.xml` includes the filename for the image each camera maps to.\n\n### Custom Format\n\nAnyone can implement a new `Format` by extending the abstract base class `Format` and satisfying the type constraints. You will also need to update the Landing route to handle your new format.\n\n```typescript\nclass MyFormat extends Format {\n    static async processTracks(...): Promise\u003cTrack[]\u003e {\n        ...\n    }\n\n    static async processCameras(_: unknown): Promise\u003cCamera[]\u003e {\n        ...\n    }\n\n    ...\n}\n```\n\nIf a method is not implemented an `Error` will be thrown when that method is called inside VECTOR.\n\nHowever, **not every** method needs an implementation.\nFor example, the `mapImages` method is only needed if image names are not available when cameras are being processed. This is the case for the VISOR format, but you will notice the VECTOR format does not implement this method.\n\nLikewise, if you are not planning on exporting file information, the export methods do not need to be implemented.\n\n## Camera Models\n\nVECTOR supports a `CameraModel` interface that allows anyone to implement their own geoemtric camera model for their specific use cases. The `CameraModel` interface handles geometric details like frustum visualization or ray-image projection.\n\n### CAHVORE Camera Model\n\nThe CAHVORE camera model is used at NASA's Jet Propulsion Laboratory and is the primary reference implementation.\n\n### Custom Camera Model\n\nAnyone can implement a new `Format` by extending the abstract base class `Format` and satisfying the type constraints.\n\n```typescript\nclass MyCameraModel extends CameraModel {\n    static ID = 'KaziJawad';\n\n    ...\n}\n```\n\nIf a method is not implemented an `Error` will be thrown when that method is called inside VECTOR.\n\nThe `ID` property can be used inside the `Format` interface to validate against different camera models.\nThe VECTOR format specifically has a `model` attribute that matches against the `ID` string.\nThis static property might not always be needed. For example, it is not used in the VISOR format because that always uses the CAHVORE camera model.\n\n## Conversion Tools\n\nAn alternative to using the `Loader` and `Format` interfaces for data processing is converting to VECTOR's format and use that as input into VECTOR.\n\nThis is useful for people inexperienced with JavaScript/TypeScript and are more comfortable writing a script.\n\nWe have provided a reference implemention in Python that converts the VISOR format to the VECTOR format without external dependencies inside the `cmd` folder.\n\n## Reference video\n\nFor further reference, a presentation on VECTOR can be found [here]( https://youtu.be/zjR8CbQ5nPM).\n\n## Contributors\n\nKazi Jawad, Racquel Fygenson, Isabel Li, Mauricio Hess-Flores, François Ayoub, Robert Deen, Scott Davidoff, Santiago Lombeyda, Maggie Hendrie, Hillary Mushkin\n\n## Acknowledgements\n\nThis research was carried out at the Jet Propulsion Laboratory, California Institute of Technology, and was sponsored by the JPL / Caltech / Art Center Data to Discovery Program, and the National Aeronautics and Space Administration (80NM0018D0004).\n\n## License\n\nPlease view the [LICENSE.md](LICENSE.md) file in the repository for more information on how VECTOR is licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-ammos%2Fvector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasa-ammos%2Fvector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-ammos%2Fvector/lists"}