Skip to content

Can we do away with acquireImageFxn? Or generalize it. #8

Description

@adeldaoud

@cjerzak I am fiddling around with the acquireImageFxn to adapt it to my simulated image data, where the bands and dimensions are different from how acquireImageFxn is defined in your simulated data.

This is the code in your simulated data

  # Define acquireImageFxn
  acquireImageFxn <- function(keys) {
    m_ <- FullImageArray[match(keys, KeysOfImages),,,]
    if(length(keys) == 1) {
      m_ <- array(m_, dim = c(1L, dim(m_)[1], dim(m_)[2], dim(m_)[3]))
    }
    return(m_)
  }

These function that feeds WriteTFRecord.

if(reSaveTFRecord) {
  causalimages::WriteTfRecord(
    file = TFRecordName_im,
    uniqueImageKeys = unique(KeysOfObservations),
    acquireImageFxn = acquireImageFxn
  )
}

But how do we handle varying image classes dynamically?

I will see if I can help improving this part of the code if you do not have a readily available piece of general code already,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions