Skip to content

Commit

Permalink
WIP: sort-dicom-series pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex authored and PaulHax committed Mar 5, 2024
1 parent 51a93b5 commit 0b00b5e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/compare-images/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
"type": "git",
"url": "https://github.com/InsightSoftwareConsortium/itk-wasm"
}
}
}
12 changes: 11 additions & 1 deletion packages/dicom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@ project(itkwasm-dicom)
set(CMAKE_CXX_STANDARD 17)

add_subdirectory(gdcm)
add_subdirectory(dcmtk)
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})
35 changes: 35 additions & 0 deletions packages/dicom/sort-dicom-series.cxx
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 0b00b5e

Please sign in to comment.