Skip to content

Commit

Permalink
refactor(image-sets-normalization): rename output to image-sets
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHax committed Mar 26, 2024
1 parent 0e5b203 commit 2553931
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions packages/dicom/gdcm/image-sets-normalization.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ int main(int argc, char *argv[])
std::vector<std::string> files;
pipeline.add_option("--files", files, "DICOM files")->required()->check(CLI::ExistingFile)->type_size(1, -1)->type_name("INPUT_BINARY_FILE");

itk::wasm::OutputTextStream imageSetsMetadata;
pipeline.add_option("image-sets-metadata", imageSetsMetadata, "Image sets JSON")->required()->type_name("OUTPUT_JSON");
itk::wasm::OutputTextStream imageSets;
pipeline.add_option("image-sets", imageSets, "Image sets JSON")->required()->type_name("OUTPUT_JSON");

ITK_WASM_PARSE(pipeline);

Expand Down Expand Up @@ -232,7 +232,7 @@ int main(int argc, char *argv[])
rapidjson::StringBuffer stringBuffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(stringBuffer);
imageSetsJson.Accept(writer);
imageSetsMetadata.Get() << stringBuffer.GetString();
imageSets.Get() << stringBuffer.GetString();

return EXIT_SUCCESS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def image_sets_normalization(
args: List[str] = ['--memory-io',]
# Inputs
# Outputs
image_sets_metadata_name = '0'
args.append(image_sets_metadata_name)
image_sets_name = '0'
args.append(image_sets_name)

# Options
input_count = len(pipeline_inputs)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { JsonCompatible } from 'itk-wasm'

interface ImageSetsNormalizationNodeResult {
/** Image sets JSON */
imageSetsMetadata: JsonCompatible
imageSets: JsonCompatible

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ async function imageSetsNormalizationNode(
const args = []
// Inputs
// Outputs
const imageSetsMetadataName = '0'
args.push(imageSetsMetadataName)
const imageSetsName = '0'
args.push(imageSetsName)

// Options
args.push('--memory-io')
Expand Down Expand Up @@ -66,7 +66,7 @@ async function imageSetsNormalizationNode(
}

const result = {
imageSetsMetadata: outputs[0]?.data as JsonCompatible,
imageSets: outputs[0]?.data as JsonCompatible,
}
return result
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { JsonCompatible, WorkerPoolFunctionResult } from 'itk-wasm'

interface ImageSetsNormalizationResult extends WorkerPoolFunctionResult {
/** Image sets JSON */
imageSetsMetadata: JsonCompatible
imageSets: JsonCompatible

}

Expand Down
6 changes: 3 additions & 3 deletions packages/dicom/typescript/src/image-sets-normalization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ async function imageSetsNormalization(
const args = []
// Inputs
// Outputs
const imageSetsMetadataName = '0'
args.push(imageSetsMetadataName)
const imageSetsName = '0'
args.push(imageSetsName)

// Options
args.push('--memory-io')
Expand Down Expand Up @@ -79,7 +79,7 @@ async function imageSetsNormalization(

const result = {
webWorker: usedWebWorker as Worker,
imageSetsMetadata: outputs[0]?.data as JsonCompatible,
imageSets: outputs[0]?.data as JsonCompatible,
}
return result
}
Expand Down
4 changes: 2 additions & 2 deletions packages/dicom/typescript/test/browser/demo-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ <h3>👨‍💻 Live API Demo ✨</h3>
<sl-divider></sl-divider>

<div id="imageSetsNormalizationOutputs">
<sl-details disabled id="imageSetsNormalization-image-sets-metadata-details" summary="imageSetsMetadata: Image sets JSON"></sl-details>
<sl-button variant="neutral" outline name="image-sets-metadata-download" disabled>Download</sl-button>
<sl-details disabled id="imageSetsNormalization-image-sets-details" summary="imageSets: Image sets JSON"></sl-details>
<sl-button variant="neutral" outline name="image-sets-download" disabled>Download</sl-button>
<br /><br />
</div>

Expand Down

0 comments on commit 2553931

Please sign in to comment.