Skip to content

Read Tif files update#1456

Merged
Grantim merged 3 commits intomasterfrom
Read_Tif_files_update
Jul 21, 2023
Merged

Read Tif files update#1456
Grantim merged 3 commits intomasterfrom
Read_Tif_files_update

Conversation

@Grantim
Copy link
Contributor

@Grantim Grantim commented Jul 21, 2023

No description provided.

@Grantim Grantim requested a review from Fedr July 21, 2023 13:59
};

//
VoidOrErrStr readRawTif( const std::filesystem::path& path, RawTifOutput& output );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add some comment

// main output data, should be allocated
float* data{ nullptr };
// parameters to compare if reading series of files
const TifParameters* params{ nullptr };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why const, is it for input?

struct RawTifOutput
{
// main output data, should be allocated
float* data{ nullptr };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the user allocates it, then it is better to pass the size of allocation not to write in not-allocated memory

public:
TifHolder( const std::filesystem::path& path, const char* mode )
{
tifPtr_ = TIFFOpen( utf8string( path ).c_str(), mode );
Copy link
Contributor

@Fedr Fedr Jul 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we write tif with one F, while the library writes it with 2 Fs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work with not-ASCII symbols in pathname?

Uint,
Int,
Float,
Unknown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be put Unknown first in the list (no give it value 0)?

@Grantim Grantim merged commit 8b92351 into master Jul 21, 2023
@Grantim Grantim deleted the Read_Tif_files_update branch July 21, 2023 15:49
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

Successfully merging this pull request may close these issues.

2 participants