early-access version 2853
This commit is contained in:
42
externals/vcpkg/ports/vtk-dicom/portfile.cmake
vendored
Executable file
42
externals/vcpkg/ports/vtk-dicom/portfile.cmake
vendored
Executable file
@@ -0,0 +1,42 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO dgobbi/vtk-dicom
|
||||
REF 5034c68450de857b70fbe4a4b9f8dddb62badef3 # v0.8.12
|
||||
SHA512 bad1ed6a4a412402a2cd69e5f85b2b73f1ee7ea46a6bbcac31c5f66d07ae006679ffbd9a3c70f9baa1b05b1af0a2d4ca0efc34ec0a85a92f5116b900e81635cd
|
||||
HEAD_REF master
|
||||
PATCHES std.patch # similar patch is already in master
|
||||
)
|
||||
|
||||
if ("gdcm" IN_LIST FEATURES)
|
||||
set(USE_GDCM ON )
|
||||
else()
|
||||
set(USE_GDCM OFF )
|
||||
endif()
|
||||
|
||||
|
||||
if(USE_GDCM)
|
||||
list(APPEND ADDITIONAL_OPTIONS
|
||||
-DUSE_GDCM=ON
|
||||
-DUSE_DCMTK=OFF
|
||||
)
|
||||
endif()
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_PROGRAMS=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
"-DPython3_EXECUTABLE=${PYTHON3}"
|
||||
${ADDITIONAL_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
74
externals/vcpkg/ports/vtk-dicom/std.patch
vendored
Executable file
74
externals/vcpkg/ports/vtk-dicom/std.patch
vendored
Executable file
@@ -0,0 +1,74 @@
|
||||
diff --git a/Source/vtkScancoCTReader.cxx b/Source/vtkScancoCTReader.cxx
|
||||
index a71f2e46e..afe202ffc 100644
|
||||
--- a/Source/vtkScancoCTReader.cxx
|
||||
+++ b/Source/vtkScancoCTReader.cxx
|
||||
@@ -176,7 +176,7 @@ int vtkScancoCTReader::CheckVersion(const char header[16])
|
||||
//----------------------------------------------------------------------------
|
||||
int vtkScancoCTReader::CanReadFile(const char *filename)
|
||||
{
|
||||
- ifstream infile(filename, ios::in | ios::binary);
|
||||
+ std::ifstream infile(filename, ios::in | ios::binary);
|
||||
|
||||
bool canRead = false;
|
||||
if (infile.good())
|
||||
@@ -409,7 +409,7 @@ void vtkScancoCTReader::StripString(char *dest, const char *cp, size_t l)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
-int vtkScancoCTReader::ReadISQHeader(ifstream *file, unsigned long bytesRead)
|
||||
+int vtkScancoCTReader::ReadISQHeader(std::ifstream *file, unsigned long bytesRead)
|
||||
{
|
||||
if (bytesRead < 512)
|
||||
{
|
||||
@@ -620,7 +620,7 @@ int vtkScancoCTReader::ReadISQHeader(ifstream *file, unsigned long bytesRead)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
-int vtkScancoCTReader::ReadAIMHeader(ifstream *file, unsigned long bytesRead)
|
||||
+int vtkScancoCTReader::ReadAIMHeader(std::ifstream *file, unsigned long bytesRead)
|
||||
{
|
||||
if (bytesRead < 160)
|
||||
{
|
||||
@@ -987,7 +987,7 @@ int vtkScancoCTReader::RequestInformation(
|
||||
const char *ufilename = filename;
|
||||
#endif
|
||||
|
||||
- ifstream infile(ufilename, ios::in | ios::binary);
|
||||
+ std::ifstream infile(ufilename, ios::in | ios::binary);
|
||||
if (!infile.good())
|
||||
{
|
||||
vtkErrorMacro("Cannot open file " << filename);
|
||||
@@ -1115,7 +1115,7 @@ int vtkScancoCTReader::RequestData(
|
||||
static_cast<unsigned char *>(data->GetScalarPointer());
|
||||
|
||||
// open the file
|
||||
- ifstream infile(filename, ios::in | ios::binary);
|
||||
+ std::ifstream infile(filename, ios::in | ios::binary);
|
||||
if (!infile.good())
|
||||
{
|
||||
vtkErrorMacro("Cannot open file " << filename);
|
||||
diff --git a/Source/vtkScancoCTReader.h b/Source/vtkScancoCTReader.h
|
||||
index ca31d7572..240d532f2 100644
|
||||
--- a/Source/vtkScancoCTReader.h
|
||||
+++ b/Source/vtkScancoCTReader.h
|
||||
@@ -34,6 +34,7 @@
|
||||
#ifndef vtkScancoCTReader_h
|
||||
#define vtkScancoCTReader_h
|
||||
|
||||
+#include <iosfwd>
|
||||
#include "vtkImageReader2.h"
|
||||
#include "vtkDICOMModule.h" // For export macro
|
||||
#include "vtkDICOMConfig.h" // For configuration details
|
||||
@@ -185,10 +186,10 @@ protected:
|
||||
void InitializeHeader();
|
||||
|
||||
//! Read an ISQ header.
|
||||
- int ReadISQHeader(ifstream *file, unsigned long bytesRead);
|
||||
+ int ReadISQHeader(std::ifstream *file, unsigned long bytesRead);
|
||||
|
||||
//! Read AIM header.
|
||||
- int ReadAIMHeader(ifstream *file, unsigned long bytesRead);
|
||||
+ int ReadAIMHeader(std::ifstream *file, unsigned long bytesRead);
|
||||
|
||||
//! Check the file header to see what type of file it is.
|
||||
/*!
|
||||
22
externals/vcpkg/ports/vtk-dicom/vcpkg.json
vendored
Executable file
22
externals/vcpkg/ports/vtk-dicom/vcpkg.json
vendored
Executable file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "vtk-dicom",
|
||||
"version-string": "0.8.12",
|
||||
"port-version": 2,
|
||||
"description": "DICOM for VTK",
|
||||
"homepage": "https://github.com/dgobbi/vtk-dicom",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vtk",
|
||||
"default-features": false
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"features": {
|
||||
"gdcm": {
|
||||
"description": "Use gdcm for decompressing DICOM files.",
|
||||
"dependencies": [
|
||||
"gdcm"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user