Skip to content
Commits on Source (9)
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2013 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://www.cognitive-antics.net/bsd3.txt for details.
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2013 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://www.cognitive-antics.net/bsd3.txt for details.
......
......@@ -4,11 +4,6 @@ project(DICOM)
# CMake version requirements
cmake_minimum_required(VERSION 2.8.7)
# When CMake 3.0.0 is required, remove this block (see CMP0042).
if(NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 0)
endif()
# Allow custom cmake overrides
set(DICOM_CMAKE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/CMake)
set(CMAKE_MODULE_PATH ${DICOM_CMAKE_DIR} ${CMAKE_MODULE_PATH})
......@@ -19,7 +14,7 @@ include(CTest)
# Project version
set(DICOM_MAJOR_VERSION 0)
set(DICOM_MINOR_VERSION 8)
set(DICOM_PATCH_VERSION 8)
set(DICOM_PATCH_VERSION 9)
set(DICOM_SHORT_VERSION "${DICOM_MAJOR_VERSION}.${DICOM_MINOR_VERSION}")
set(DICOM_VERSION "${DICOM_SHORT_VERSION}.${DICOM_PATCH_VERSION}")
......@@ -52,6 +47,11 @@ if(Module_vtkDICOM) # We are being built as a VTK remote module
else() # We are being built as a stand-alone package
# When CMake 3.0.0 is required, remove this block (see CMP0042).
if(NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 0)
endif()
option(BUILD_SHARED_LIBS "Build shared libraries." OFF)
# Which parts of the package to build
......
Copyright (c) 2012-2017 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2015 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2015 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2017 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2017 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......
......@@ -2,7 +2,7 @@
@brief The license for vtk-dicom is the 3-clause BSD license.
Copyright (c) 2012-2017 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
......
## DICOM for VTK {#mainpage}
Copyright (c) 2012-2017, David Gobbi
Copyright (c) 2012-2019, David Gobbi
All rights reserved.
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2015 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......
......@@ -2,6 +2,7 @@
#include "vtkDICOMFileSorter.h"
#include "vtkDICOMReader.h"
#include "vtkCommand.h"
#include "vtkSmartPointer.h"
#include "vtkStringArray.h"
......@@ -20,6 +21,44 @@ if (!(t)) \
rval |= 1; \
}
class ReaderProgress : public vtkCommand
{
public:
vtkTypeMacro(ReaderProgress, vtkCommand);
static ReaderProgress *New() { return new ReaderProgress; }
#ifdef VTK_OVERRIDE
void Execute(vtkObject *object, unsigned long event, void *data)
VTK_OVERRIDE;
#else
void Execute(vtkObject *object, unsigned long event, void *data);
#endif
};
void ReaderProgress::Execute(
vtkObject *object, unsigned long event, void *data)
{
if (event == vtkCommand::ProgressEvent)
{
if (data)
{
double progress = *static_cast<double *>(data);
const char *text = "";
vtkAlgorithm *algorithm = vtkAlgorithm::SafeDownCast(object);
if (algorithm)
{
text = algorithm->GetProgressText();
}
if (text)
{
std::cout << text << ": ";
}
std::cout << static_cast<int>(100.0*progress + 0.5) << std::endl;
}
}
}
int main(int argc, char *argv[])
{
int rval = 0;
......@@ -54,10 +93,13 @@ int main(int argc, char *argv[])
{
cout << " Series " << k << ":\n";
vtkStringArray *a = sorter->GetFileNamesForSeries(k);
vtkDICOMReader *reader = vtkDICOMReader::New();
vtkSmartPointer<ReaderProgress> progressCommand =
vtkSmartPointer<ReaderProgress>::New();
vtkSmartPointer<vtkDICOMReader> reader =
vtkSmartPointer<vtkDICOMReader>::New();
reader->AddObserver(vtkCommand::ProgressEvent, progressCommand);
reader->SetFileNames(a);
reader->Update();
reader->Delete();
}
}
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2015 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2017 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......@@ -42,7 +42,7 @@ void printVersion(FILE *file, const char *cp)
{
fprintf(file, "%s %s\n", cp, DICOM_VERSION);
fprintf(file, "\n"
"Copyright (c) 2012-2017, David Gobbi.\n\n"
"Copyright (c) 2012-2019, David Gobbi.\n\n"
"This software is distributed under an open-source license. See the\n"
"Copyright.txt file that comes with the vtk-dicom source distribution.\n");
}
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2017 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......@@ -52,7 +52,7 @@ void dicomfind_version(FILE *file, const char *cp)
{
fprintf(file, "%s %s\n", cp, DICOM_VERSION);
fprintf(file, "\n"
"Copyright (c) 2012-2017, David Gobbi.\n\n"
"Copyright (c) 2012-2019, David Gobbi.\n\n"
"This software is distributed under an open-source license. See the\n"
"Copyright.txt file that comes with the vtk-dicom source distribution.\n");
}
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2017 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......@@ -46,7 +46,7 @@ void dicompull_version(FILE *file, const char *cp)
{
fprintf(file, "%s %s\n", cp, DICOM_VERSION);
fprintf(file, "\n"
"Copyright (c) 2012-2017, David Gobbi.\n\n"
"Copyright (c) 2012-2019, David Gobbi.\n\n"
"This software is distributed under an open-source license. See the\n"
"Copyright.txt file that comes with the vtk-dicom source distribution.\n");
}
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2017 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......@@ -60,7 +60,7 @@ void dicomtocsv_version(FILE *file, const char *cp)
{
fprintf(file, "%s %s\n", cp, DICOM_VERSION);
fprintf(file, "\n"
"Copyright (c) 2012-2017, David Gobbi.\n\n"
"Copyright (c) 2012-2019, David Gobbi.\n\n"
"This software is distributed under an open-source license. See the\n"
"Copyright.txt file that comes with the vtk-dicom source distribution.\n");
}
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2016 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......@@ -93,7 +93,7 @@ void dicomtodicom_version(FILE *file, const char *command_name, bool verbose)
{
fprintf(file, "%s %s\n", cp, DICOM_VERSION);
fprintf(file, "\n"
"Copyright (c) 2012-2017, David Gobbi.\n\n"
"Copyright (c) 2012-2019, David Gobbi.\n\n"
"This software is distributed under an open-source license. See the\n"
"Copyright.txt file that comes with the vtk-dicom source distribution.\n");
}
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2017 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......@@ -94,7 +94,7 @@ void dicomtonifti_version(FILE *file, const char *command_name, bool verbose)
{
fprintf(file, "%s %s\n", cp, DICOM_VERSION);
fprintf(file, "\n"
"Copyright (c) 2012-2017, David Gobbi.\n\n"
"Copyright (c) 2012-2019, David Gobbi.\n\n"
"This software is distributed under an open-source license. See the\n"
"Copyright.txt file that comes with the vtk-dicom source distribution.\n");
}
......
......@@ -2,7 +2,7 @@
Program: DICOM for VTK
Copyright (c) 2012-2015 David Gobbi
Copyright (c) 2012-2019 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
......