Skip to content

STYLE: Factor out itkOMEZarrNGFFCommon.h - #65

Closed
thewtex wants to merge 2 commits into
InsightSoftwareConsortium:mainfrom
thewtex:transforms
Closed

thewtex wants to merge 2 commits into
InsightSoftwareConsortium:mainfrom
thewtex:transforms

Conversation

@thewtex

@thewtex thewtex commented Jul 28, 2024

Copy link
Copy Markdown
Member

For re-use across ImageIO and TransformIO.

OMEZarrNGFFAxis is renamed to OMEZarrAxis for brevity. Also, what was
previously ambigiously ome-zarr-ngff is now OME-Zarr.

thewtex added 2 commits July 28, 2024 14:09
For re-use across ImageIO and TransformIO.

OMEZarrNGFFAxis is renamed to OMEZarrAxis for brevity. Also, what was
previously ambigiously ome-zarr-ngff is now OME-Zarr.
*
* \ingroup IOOMEZarrNGFF
*/
struct IOOMEZarrNGFF_EXPORT OMEZarrNGFFAxis

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rebase gone wrong? This was moved to common header in previous commit.

* the "file name", using pattern address.memory, where address is a
* decimal representation of BufferInfo's address.
* Sample filename: "12341234.memory". */
using BufferInfo = struct

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This feels like it should be part of the common class for imageIO and transformIO.


/** Construct a "magic" file name from the provided bufferInfo. */
static std::string
MakeMemoryFileName(const BufferInfo & bufferInfo)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also should be common for imageIO and transformIO.

ReadArrayMetadata(std::string path, std::string driver);

private:
// An empty zip file consists of 22 bytes of "end of central directory" record. More:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also common for imageIO and transformIO

bool
OMEZarrNGFFTransformIO::CanReadFile(const char * filename)
{
try

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe have this function in common class for imageIO and transformIO, and then just inherit it, or at least invoke it, instead of duplicate it?

Comment thread CMakeLists.txt
Comment on lines -15 to +14
find_package(ITK 5.0 REQUIRED)
find_package(ITK 5.4 REQUIRED)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The upgrade of ITK seems unrelated to/independent of the rest of the commit ("Factor out itkOMEZarrNGFFCommon.h"). If so, preferably make it a separate commit.

@hjmjohnson

Copy link
Copy Markdown
Member

@thewtex thank you for this. I took over the first commit, the shared itkOMEZarrNGFFCommon.h, in #82, keeping your authorship, with a small doc fixup and #78 underneath. I left the WIP: TransformIO skeleton commit out so that PR can be reviewed on its own; it is still here on this PR. I have left this PR open.

@thewtex

thewtex commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

@hjmjohnson thanks. Closing since #82 supercedes

@thewtex thewtex closed this Nov 11, 2026
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.

4 participants