Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with filling nitf_BandInfo **bandInfo in ImageSubheader #610

Open
samrat-boda opened this issue May 16, 2024 · 0 comments
Open

Issue with filling nitf_BandInfo **bandInfo in ImageSubheader #610

samrat-boda opened this issue May 16, 2024 · 0 comments

Comments

@samrat-boda
Copy link

Hello,

I am currently working with the NITRO library for handling NITF files and am encountering an issue when trying to populate the nitf_BandInfo **bandInfo field within ImageSubheader.

Environment:

  • Language: Python
  • Library: NITRO
  • Relevant Files: nitro/modules/c/nitf/include/nitf/ImageSubheader.h and nitro/modules/c/nitf/include/nitf/BandInfo.h

Issue Description:
The ImageSubheader.h file defines most image subheader fields as type nitf_Field, for example:

nitf_Field *numRows;
nitf_Field *numCols;

In Python, I have managed to populate these fields successfully:

segment.subheader['numrows'] = height
segment.subheader['numcols'] = width

I'm struggling with the field nitf_BandInfo **bandInfo. The nitf_BandInfo is a struct defined in nitro/modules/c/nitf/include/nitf/BandInfo.h. I've attempted to fill this field but encountered difficulties.

Questions:

  1. How should I properly instantiate and assign values to nitf_BandInfo **bandInfo from Python?
  2. Is there a specific method or part of the API that facilitates handling pointers to structures in Python?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant