-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1201 from thewtex/native-pixi
native pixi
- Loading branch information
Showing
13 changed files
with
3,459 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# GitHub syntax highlighting | ||
pixi.lock linguist-language=YAML linguist-generated=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
function die() { | ||
echo "$1" | ||
exit 1 | ||
} | ||
|
||
if [$OSTYPE == "cygwin"] || [$OSTYPE == "msys"] || [$OSTYPE =="win32"]; then | ||
echo "Windows platform detected ... adding \"/Zc:__cplusplus /DNOMINMAX\" to \$CXXFLAGS" | ||
export CXXFLAGS="/Zc:__cplusplus /DNOMINMAX" | ||
fi | ||
|
||
export ITK_WASM_DCMTK_REPOSITORY=${ITK_WASM_DCMTK_REPOSITORY:-"https://github.com/InsightSoftwareConsortium/DCMTK"} | ||
export ITK_WASM_DCMTK_GIT_TAG=${ITK_WASM_DCMTK_GIT_TAG:-"fe7cff5de40b67ae0490d476ddf17689c06bcaf4"} | ||
|
||
export ITK_WASM_ITK_REPOSITORY=${ITK_WASM_ITK_REPOSITORY:-"https://github.com/KitwareMedical/ITK"} | ||
export ITK_WASM_ITK_BRANCH=${ITK_WASM_ITK_BRANCH:-"itkwasm-2024-05-20-5db055d7ad3b-1"} | ||
|
||
export ITK_WASM_NATIVE_WORKSPACE=${ITK_WASM_NATIVE_WORKSPACE:-$(pwd)/native} | ||
|
||
export ITK_WASM_ITK_SOURCE_DIR=${ITK_WASM_ITK_SOURCE_DIR:-${ITK_WASM_NATIVE_WORKSPACE}/ITK} | ||
export ITK_WASM_ITK_BUILD_DIR=${ITK_WASM_ITK_BUILD_DIR:-${ITK_WASM_NATIVE_WORKSPACE}/ITK-build} | ||
mkdir -p ${ITK_WASM_ITK_BUILD_DIR} || die "Could not create ITK build directory" | ||
|
||
|
||
export ITK_WASM_DICOM_TEST_DATA_HASH=${ITK_WASM_DICOM_TEST_DATA_HASH:-$(cat packages/dicom/package.json | jq -e -r '."itk-wasm"."test-data-hash"')} | ||
export ITK_WASM_DICOM_TEST_DATA_URLS=${ITK_WASM_DICOM_TEST_DATA_URLS:-$(cat packages/dicom/package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')} | ||
|
||
export ITK_WASM_MESH_IO_TEST_DATA_HASH=${ITK_WASM_MESH_IO_TEST_DATA_HASH:-$(cat packages/mesh-io/package.json | jq -e -r '."itk-wasm"."test-data-hash"')} | ||
export ITK_WASM_MESH_IO_TEST_DATA_URLS=${ITK_WASM_MESH_IO_TEST_DATA_URLS:-$(cat packages/mesh-io/package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/* | ||
* | ||
* Copyright (C) 2002-2023, OFFIS e.V. | ||
* All rights reserved. See COPYRIGHT file for details. | ||
* | ||
* This software and supporting documentation were developed by | ||
* | ||
* OFFIS e.V. | ||
* R&D Division Health | ||
* Escherweg 2 | ||
* D-26121 Oldenburg, Germany | ||
* | ||
* | ||
* Module: dcmdata | ||
* | ||
* Author: Marco Eichelberg | ||
* | ||
* Purpose: DcmOutputBufferStream and related classes, | ||
* implements output to blocks of memory as needed in the dcmnet module. | ||
* | ||
*/ | ||
|
||
#include "dcmtk/config/osconfig.h" | ||
#include "dcmtk/dcmdata/dcostrmb.h" | ||
#include "dcmtk/dcmdata/dcerror.h" | ||
|
||
|
||
DcmBufferConsumer::DcmBufferConsumer(void *buf, offile_off_t bufLen) | ||
: DcmConsumer() | ||
, buffer_(OFstatic_cast(unsigned char *, buf)) | ||
, bufSize_(bufLen) | ||
, filled_(0) | ||
, status_(EC_Normal) | ||
{ | ||
if (buffer_ == NULL) status_ = EC_IllegalCall; | ||
} | ||
|
||
DcmBufferConsumer::~DcmBufferConsumer() | ||
{ | ||
} | ||
|
||
OFBool DcmBufferConsumer::good() const | ||
{ | ||
return status_.good(); | ||
} | ||
|
||
OFCondition DcmBufferConsumer::status() const | ||
{ | ||
return status_; | ||
} | ||
|
||
OFBool DcmBufferConsumer::isFlushed() const | ||
{ | ||
return (filled_ == 0); | ||
} | ||
|
||
offile_off_t DcmBufferConsumer::avail() const | ||
{ | ||
return bufSize_ - filled_; | ||
} | ||
|
||
offile_off_t DcmBufferConsumer::write(const void *buf, offile_off_t buflen) | ||
{ | ||
offile_off_t result = 0; | ||
if (buflen && buf && status_.good()) | ||
{ | ||
result = bufSize_ - filled_; | ||
if (result > buflen) result = buflen; | ||
memcpy(buffer_+ filled_, buf, OFstatic_cast(size_t, result)); | ||
filled_ += result; | ||
} | ||
return result; | ||
} | ||
|
||
void DcmBufferConsumer::flush() | ||
{ | ||
// nothing to flush | ||
} | ||
|
||
void DcmBufferConsumer::flushBuffer(void *& buffer, offile_off_t& length) | ||
{ | ||
buffer = buffer_; | ||
length = filled_; | ||
filled_ = 0; | ||
} | ||
|
||
offile_off_t DcmBufferConsumer::filled() | ||
{ | ||
return filled_; | ||
} | ||
|
||
/* ======================================================================= */ | ||
|
||
DcmOutputBufferStream::DcmOutputBufferStream(void *buf, offile_off_t bufLen) | ||
: DcmOutputStream(&consumer_) // safe because DcmOutputStream only stores pointer | ||
, consumer_(buf, bufLen) | ||
{ | ||
} | ||
|
||
DcmOutputBufferStream::~DcmOutputBufferStream() | ||
{ | ||
#ifdef DEBUG | ||
if (! isFlushed()) | ||
{ | ||
DCMDATA_WARN("DcmOutputBufferStream: Closing unflushed DcmOutputBufferStream, loss of data!"); | ||
} | ||
#endif | ||
} | ||
|
||
void DcmOutputBufferStream::flushBuffer(void *& buffer, offile_off_t& length) | ||
{ | ||
consumer_.flushBuffer(buffer, length); | ||
} | ||
|
||
offile_off_t DcmOutputBufferStream::filled() | ||
{ | ||
return consumer_.filled(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.