Skip to content

Commit 0b00b5e

Browse files
thewtexPaulHax
authored andcommitted
WIP: sort-dicom-series pipeline
1 parent 51a93b5 commit 0b00b5e

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

packages/compare-images/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@
6161
"type": "git",
6262
"url": "https://github.com/InsightSoftwareConsortium/itk-wasm"
6363
}
64-
}
64+
}

packages/dicom/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@ project(itkwasm-dicom)
44
set(CMAKE_CXX_STANDARD 17)
55

66
add_subdirectory(gdcm)
7-
add_subdirectory(dcmtk)
7+
add_subdirectory(dcmtk)
8+
9+
find_package(ITK REQUIRED
10+
COMPONENTS ITKCommon
11+
ITKGDCM
12+
WebAssemblyInterface
13+
)
14+
include(${ITK_USE_FILE})
15+
16+
add_executable(sort-dicom-series sort-dicom-series.cxx)
17+
target_link_libraries(sort-dicom-series PUBLIC ${ITK_LIBRARIES})

packages/dicom/sort-dicom-series.cxx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*=========================================================================
2+
*
3+
* Copyright NumFOCUS
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0.txt
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*=========================================================================*/
18+
#include "itkPipeline.h"
19+
#include "itkInputTextStream.h"
20+
#include "itkOutputTextStream.h"
21+
22+
int main (int argc, char * argv[])
23+
{
24+
itk::wasm::Pipeline pipeline("sort-dicom-series", "Sort a DICOM image series their spatial order and spatial metadata.", argc, argv);
25+
26+
itk::wasm::InputTextStream dicomSeries;
27+
28+
itk::wasm::OutputTextStream imageInformation;;
29+
30+
ITK_WASM_PARSE(pipeline);
31+
32+
// { 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] }
33+
34+
return EXIT_SUCCESS;
35+
}

0 commit comments

Comments
 (0)