[nifti2dicom/f18] nifti2dicom 0.4.5

Daniel Vrátil dvratil at fedoraproject.org
Tue May 28 15:44:44 UTC 2013


commit 53fd06f7436f8dfa0a43128a52ed927927d05fb1
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Tue May 28 17:40:04 2013 +0200

    nifti2dicom 0.4.5

 .gitignore                              |    1 +
 nifti2dicom-fix-itk-cmake-linking.patch |   32 ++++++++++
 nifti2dicom.spec                        |   97 +++++++++++++++++++++++++++++++
 sources                                 |    1 +
 4 files changed, 131 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..b02cac8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/nifti2dicom-0.4.5.tar.gz
diff --git a/nifti2dicom-fix-itk-cmake-linking.patch b/nifti2dicom-fix-itk-cmake-linking.patch
new file mode 100644
index 0000000..d19871c
--- /dev/null
+++ b/nifti2dicom-fix-itk-cmake-linking.patch
@@ -0,0 +1,32 @@
+commit 286729f653f09b77bb857372750606081fc5d2f0
+Author: Gabriele Arnulfo <gabriele.arnulfo at gmail.com>
+Date:   Sat Feb 9 09:55:54 2013 +0100
+
+    Temporarily modified CMake Linking for ITK to make compliant with ITK4 style
+
+diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
+index 317afed..708bf5f 100644
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -61,5 +61,5 @@ set(nifti2dicom_NO_INSTALL_HEADERS ${CMAKE_BINARY_DIR}/Nifti2DicomConfig.h
+ 
+ # nifti2dicom target
+ add_executable(nifti2dicom ${nifti2dicom_SOURCES})
+-target_link_libraries(nifti2dicom ITKIO ITKCommon)
++target_link_libraries(nifti2dicom ${ITK_LIBRARIES})
+ install(TARGETS nifti2dicom RUNTIME DESTINATION bin)
+diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
+index 7c1899d..9c9b79d 100644
+--- a/src/gui/CMakeLists.txt
++++ b/src/gui/CMakeLists.txt
+@@ -126,9 +126,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}
+ endif( APPLE )
+ 
+ # nifti2dicom target
+-target_link_libraries(qnifti2dicom ITKBasicFilters
+-                                   ITKIO
+-                                   ITKCommon
++target_link_libraries(qnifti2dicom ${ITK_LIBRARIES} 
+                                    ${QT_QTCORE_LIBRARY}
+                                    ${QT_QTGUI_LIBRARY}
+                                    QVTK
diff --git a/nifti2dicom.spec b/nifti2dicom.spec
new file mode 100644
index 0000000..f2d9424
--- /dev/null
+++ b/nifti2dicom.spec
@@ -0,0 +1,97 @@
+Name:           nifti2dicom
+Version:        0.4.5
+Release:        4%{?dist}
+Summary:        Converts 3D medical images to DICOM 2D series
+
+License:        GPLv3+
+URL:            https://github.com/biolab-unige/nifti2dicom
+Source0:        https://github.com/biolab-unige/nifti2dicom/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+
+# Use ${ITK_LIBRARIES} instead of hardcode library names.
+# This has been fixed in upstream git master and should be
+# available in next release
+Patch0:         %{name}-fix-itk-cmake-linking.patch
+
+ExcludeArch:    ppc ppc64
+
+BuildRequires:  cmake
+BuildRequires:  gdcm-devel
+BuildRequires:  desktop-file-utils
+BuildRequires:  qt4-devel
+BuildRequires:  qt4-webkit-devel
+BuildRequires:  vtk-devel
+BuildRequires:  vxl-devel
+BuildRequires:  hdf5-devel
+BuildRequires:  InsightToolkit-devel
+BuildRequires:  tclap-devel
+BuildRequires:  doxygen
+
+%description
+Nifti2Dicom is a conversion tool that converts 3D NIfTI files (and other
+formats supported by ITK, including Analyze, MetaImage Nrrd and VTK)
+to DICOM.
+
+Unlike other conversion tools, it can import a DICOM file that is used
+to import the patient and study DICOM tags, and allows you to edit the
+accession number and other DICOM tags, in order to create a valid DICOM
+that can be imported in a PACS.
+
+
+%prep
+%setup -q
+
+%patch0 -p1 -b .itk-linking
+
+
+%build
+mkdir -p %{_target_platform}
+pushd %{_target_platform}
+%{cmake} ..
+popd
+
+make %{?_smp_mflags} -C %{_target_platform}
+
+%install
+%make_install -C %{_target_platform}
+desktop-file-validate %{buildroot}%{_datadir}/applications/qnifti2dicom.desktop
+
+%post
+/bin/touch --no-create %{_datadir}/icons/{hicolor,locolor,mono} &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/{hicolor,locolor,mono} &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/{hicolor,locolor,mono} &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+        
+%files
+%{_bindir}/nifti2dicom
+%{_bindir}/qnifti2dicom
+%{_datadir}/icons/*/*/apps/qnifti2dicom.png
+%{_datadir}/applications/qnifti2dicom.desktop
+
+%doc AUTHORS NEWS COPYING
+%{_mandir}/man1/*.1.*
+
+
+%changelog
+* Thu May 02 2013 Daniel Vrátil <dvratil at redhat.com> 0.4.5-4
+ - added AUTHORS, NEWS and COPYING to doc
+ - removed graphviz from BR
+ - exclude ppc and ppc64 until InsightToolkit's available there
+
+* Sat Apr 27 2013 Daniel Vrátil <dvratil at redhat.com> 0.4.5-3
+ - added qt4-webkit-devel to BR
+
+* Fri Apr 26 2013 Daniel Vrátil <dvratil at redhat.com> 0.4.5-2
+ - updated license to GPLv3+
+ - added cmake to BR
+ - added desktop-file-validate
+ - added gtk-update-icon-cache
+ - fixed %doc instal file
+
+* Wed Apr 24 2013 Daniel Vrátil <dvratil at redhat.com> 0.4.5-1
+ - Initial SPEC
diff --git a/sources b/sources
index e69de29..a166f4d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a00434bce991303a49b7b4143209acb8  nifti2dicom-0.4.5.tar.gz


More information about the scm-commits mailing list