diff --git a/packages/compare-images/typescript/package.json b/packages/compare-images/typescript/package.json index a1d6f4ddb..1ff390261 100644 --- a/packages/compare-images/typescript/package.json +++ b/packages/compare-images/typescript/package.json @@ -62,4 +62,4 @@ "type": "git", "url": "https://github.com/InsightSoftwareConsortium/itk-wasm" } -} +} \ No newline at end of file diff --git a/packages/dicom/CMakeLists.txt b/packages/dicom/CMakeLists.txt index 98f92c8d6..7bc34004c 100644 --- a/packages/dicom/CMakeLists.txt +++ b/packages/dicom/CMakeLists.txt @@ -4,4 +4,14 @@ project(itkwasm-dicom) set(CMAKE_CXX_STANDARD 17) add_subdirectory(gdcm) -add_subdirectory(dcmtk) \ No newline at end of file +add_subdirectory(dcmtk) + +find_package(ITK REQUIRED + COMPONENTS ITKCommon + ITKGDCM + WebAssemblyInterface + ) +include(${ITK_USE_FILE}) + +add_executable(sort-dicom-series sort-dicom-series.cxx) +target_link_libraries(sort-dicom-series PUBLIC ${ITK_LIBRARIES}) diff --git a/packages/dicom/sort-dicom-series.cxx b/packages/dicom/sort-dicom-series.cxx new file mode 100644 index 000000000..b2dce94be --- /dev/null +++ b/packages/dicom/sort-dicom-series.cxx @@ -0,0 +1,35 @@ +/*========================================================================= + * + * Copyright NumFOCUS + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *=========================================================================*/ +#include "itkPipeline.h" +#include "itkInputTextStream.h" +#include "itkOutputTextStream.h" + +int main (int argc, char * argv[]) +{ + itk::wasm::Pipeline pipeline("sort-dicom-series", "Sort a DICOM image series their spatial order and spatial metadata.", argc, argv); + + itk::wasm::InputTextStream dicomSeries; + + itk::wasm::OutputTextStream imageInformation;; + + ITK_WASM_PARSE(pipeline); + + // { order: [1.0, 2.0, 3.0], origin: [0.0, 0.0, 0.0], spacing: [1.0, 1.0, 1.0], direction: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0] } + + return EXIT_SUCCESS; +}