]> Creatis software - creaImageIO.git/commitdiff
#3326 bbtk_Transform3Ddicom_PKG
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 8 Dec 2022 15:04:03 +0000 (16:04 +0100)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 8 Dec 2022 15:04:03 +0000 (16:04 +0100)
62 files changed:
CMakeLists.txt
bbtk_Transform3Ddicom_PKG/.DS_Store [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/CMakeLists.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/Configure.cmake [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/PackageConfig.cmake.in [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/README.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/UsePackage.cmake.in [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/.DS_Store [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/CMakeLists.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/appli/.DS_Store [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/appli/README.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/.DS_Store [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/README.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/SliceVectorImageDicom3D.bbg [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/SliceVectorImageDicom3D.bbs [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/ViewerPlaneContourDicom3D.bbg [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/ViewerPlaneContourDicom3D.bbs [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbg [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbs [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbs_EED [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/bbIsoSurfaceExtractorDicom.bbs [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/bbMetaImageDicomInfoReader.bbs [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/bbMetaImageDicomInfoWriter.bbs [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/bbs/boxes/bbSubVolDicom.bbs [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/data/CMakeLists.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/doc/CMakeLists.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/doc/bbdoc/CMakeLists.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/doc/bbdoc/header.html.in [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/doc/doxygen/CMakeLists.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/doc/doxygen/DoxyMainPage.txt.in [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/doc/doxygen/Doxyfile.txt.in [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/.DS_Store [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/CMakeLists.txt [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateAxesTreeData.cxx [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateAxesTreeData.h [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.cxx [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.cxx_eed [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.h [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.h_eed [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomFlipImage.cxx [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomFlipImage.h [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageReader_DicomInfo.cxx [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageReader_DicomInfo.h [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageWriter_DicomInfo.cxx [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageWriter_DicomInfo.h [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomNewDicomImaPosPat.cxx [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomNewDicomImaPosPat.h [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomRotateDICOM.cxx [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomRotateDICOM.h [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomTransformSimple.cxx [new file with mode: 0644]
bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomTransformSimple.h [new file with mode: 0644]
lib/.DS_Store [new file with mode: 0644]
lib/CMakeLists.txt [new file with mode: 0755]
lib/TransformDicom3D/CMakeLists.txt [new file with mode: 0644]
lib/TransformDicom3D/CreaImage.cxx [new file with mode: 0644]
lib/TransformDicom3D/CreaImage.h [new file with mode: 0644]
lib/TransformDicom3D/CreaImageComplement.cxx [new file with mode: 0644]
lib/TransformDicom3D/CreaImageComplement.h [new file with mode: 0644]
lib/TransformDicom3D/creaSystem.h [new file with mode: 0755]
lib/TransformDicom3D/creaSystem.h.in [new file with mode: 0755]
lib/TransformDicom3D/matrixRotation.cxx [new file with mode: 0644]
lib/TransformDicom3D/matrixRotation.h [new file with mode: 0644]

index 4251d0a5f6b3f32b04aa12b52dac153826db3b15..f7108613f9e30b58f462ec1584c10214c86983bc 100644 (file)
@@ -1,7 +1,7 @@
 # ---------------------------------------------------------------------
 #
 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Santé)
+#                        pour la Santé©
 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
@@ -179,6 +179,8 @@ ENDIF(BUILD_CREA_PACS)
 
 ADD_SUBDIRECTORY(appli)
 ADD_SUBDIRECTORY(bbtk)
+ADD_SUBDIRECTORY(lib)
+ADD_SUBDIRECTORY(bbtk_Transform3Ddicom_PKG)
 
 #EED 31/05/2011   not compiling 
 #ADD_SUBDIRECTORY(tests)
diff --git a/bbtk_Transform3Ddicom_PKG/.DS_Store b/bbtk_Transform3Ddicom_PKG/.DS_Store
new file mode 100644 (file)
index 0000000..3374934
Binary files /dev/null and b/bbtk_Transform3Ddicom_PKG/.DS_Store differ
diff --git a/bbtk_Transform3Ddicom_PKG/CMakeLists.txt b/bbtk_Transform3Ddicom_PKG/CMakeLists.txt
new file mode 100644 (file)
index 0000000..618a41c
--- /dev/null
@@ -0,0 +1,187 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+#===========================================================================
+# CMAKE SETTINGS FOR BUILDING A BBTK PACKAGE
+#===========================================================================
+
+#===========================================================================
+# THE NAME OF THE BBTK PACKAGE
+SET(BBTK_PACKAGE_NAME Transform3Ddicom)
+#===========================================================================
+
+
+
+#===========================================================================
+# IF IT IS A STANDALONE PROJECT UNCOMMENT NEXT LINE TO DECLARE YOUR PROJECT
+# PROJECT(bb${BBTK_PACKAGE_NAME})
+#===========================================================================
+
+#===========================================================================
+# PACKAGE AUTHOR
+# !!! NO COMMA ALLOWED !!!
+SET(${BBTK_PACKAGE_NAME}_AUTHOR "Info-Dev")
+#===========================================================================
+
+#===========================================================================
+# PACKAGE DESCRIPTION
+SET(${BBTK_PACKAGE_NAME}_DESCRIPTION "")
+#===========================================================================
+
+#===========================================================================
+# PACKAGE VERSION NUMBER 
+SET(${BBTK_PACKAGE_NAME}_MAJOR_VERSION 1)
+SET(${BBTK_PACKAGE_NAME}_MINOR_VERSION 0)
+SET(${BBTK_PACKAGE_NAME}_BUILD_VERSION 0)
+#===========================================================================
+
+SET(USE_BOOST     ON)
+#===========================================================================
+# UNCOMMENT EACH LIBRARY NEEDED (WILL BE FOUND AND USED AUTOMATICALLY)
+# SET(${BBTK_PACKAGE_NAME}_USE_VTK  ON)
+# SET(${BBTK_PACKAGE_NAME}_USE_ITK  ON)
+# SET(${BBTK_PACKAGE_NAME}_USE_GDCM ON)
+# SET(${BBTK_PACKAGE_NAME}_USE_GDCM_VTK ON)
+# SET(${BBTK_PACKAGE_NAME}_USE_GSMIS ON)
+# SET(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS ON)
+# SET(${BBTK_PACKAGE_NAME}_USE_KWWIDGETS ON)
+#===========================================================================
+
+#===========================================================================
+# LIST HERE THE OTHER bbtk PACKAGES NEEDED
+# (WILL BE FOUND AND USED AUTOMATICALLY)
+SET(${BBTK_PACKAGE_NAME}_USE_PACKAGES 
+  # std
+  # wx
+  # itk
+  # vtk
+  # ...
+  )
+#===========================================================================
+
+#===========================================================================
+# THE SOURCES OF THE PACKAGE
+# EITHER UNCOMMENT NEXT LINE TO COMPILE ALL .cxx OF THE src DIRECTORY :
+SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_CXX ON)
+# ... OR LIST THE FILES TO COMPILE MANUALLY :
+#SET(${BBTK_PACKAGE_NAME}_SOURCES
+# LIST HERE THE FILES TO COMPILE TO BUILD THE LIB
+# E.G. TO COMPILE "toto.cxx" ADD "toto" (NO EXTENSION)
+# THE PATH MUST BE RELATIVE TO THE src FOLDER
+#    )
+#===========================================================================
+
+#===========================================================================
+# THE xml SOURCES OF THE PACKAGE
+# EITHER UNCOMMENT NEXT LINE TO bbfy ALL .xml OF THE src DIRECTORY :
+SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_XML ON)
+# ... OR LIST THE FILES TO COMPILE MANUALLY :
+#SET(${BBTK_PACKAGE_NAME}_XML_SOURCES
+# LIST HERE THE FILES TO bbfy TO BUILD THE LIB
+# E.G. TO bbfy "toto.xml" ADD "toto" (NO EXTENSION)
+# THE PATH MUST BE RELATIVE TO THE src FOLDER
+#    )
+#===========================================================================
+
+#===========================================================================
+# THE SCRIPT-DEFINED BOXES OF THE PACKAGE (bbs)
+# EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/boxes DIRECTORY :
+SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_BOXES ON)
+# ... OR LIST THE FILES TO INCLUDE MANUALLY :
+# SET(${BBTK_PACKAGE_NAME}_BBS_BOXES
+# LIST HERE THE bbs FILES TO INCLUDE 
+# E.G. TO INCLUDE "boxes/bbtoto.bbs" ADD "boxes/bbtoto" (NO EXTENSION)
+# !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !!
+#)
+#===========================================================================
+
+#===========================================================================
+# THE SCRIPT-DEFINED APPLICATIONS OF THE PACKAGE (bbs)
+# EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/appli DIRECTORY :
+SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_APPLI ON)
+# ... OR LIST THE FILES TO INCLUDE MANUALLY :
+# SET(${BBTK_PACKAGE_NAME}_BBS_APPLI
+# LIST HERE THE bbs FILES TO INCLUDE 
+# E.G. TO INCLUDE "appli/testToto.bbs" ADD "appli/testToto" (NO EXTENSION)
+# !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !!
+#)
+#===========================================================================
+
+#===========================================================================
+SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS
+  # LIST HERE YOUR ADDITIONAL INCLUDE DIRECTORIES 
+  # EXCEPT :
+  #  - src
+  #  - bbtk dirs
+  #  - automatically handled libraries or packages : wx, vtk... (see above)
+  #  - the dirs automatically set by other libraries found by FIND_PACKAGE
+
+../lib/TransformDicom3D
+
+  )
+#===========================================================================
+
+#===========================================================================
+SET(${BBTK_PACKAGE_NAME}_LIBS 
+  # LIST HERE THE ADDITIONAL LIBS TO LINK AGAINST
+  # EXCEPT : the same libs than for INCLUDE_DIRS 
+
+TransformDicom3D
+
+  )
+#===========================================================================
+
+
+#===========================================================================
+# IF NEEDED : UNCOMMENT NEXT LINE 
+# AND LIST ADDITIONNAL DIRECTORIES 
+# IN WHICH TO LOOK FOR LIBRARIES TO LINK AGAINST
+# LINK_DIRECTORIES()
+#===========================================================================
+
+#===========================================================================
+# SET TO TRUE TO HAVE INFORMATION ON LIBRARIES FOUND DURING CMAKE CONFIGURE
+SET(FIND_PACKAGE_VERBOSE TRUE)
+#===========================================================================
+
+#===========================================================================
+# END OF USER SECTION
+#===========================================================================
+
+
+
+
+
+#===========================================================================
+# Include configuration script
+INCLUDE(Configure.cmake)
+#===========================================================================
+
+#===========================================================================
+# EOF
+#===========================================================================
+
diff --git a/bbtk_Transform3Ddicom_PKG/Configure.cmake b/bbtk_Transform3Ddicom_PKG/Configure.cmake
new file mode 100644 (file)
index 0000000..95c46b8
--- /dev/null
@@ -0,0 +1,60 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+#===========================================================================
+# DOES THE USER WANT TO BUILD THE PACKAGE ?
+OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME} 
+  "Build the bbtk package ${BBTK_PACKAGE_NAME} ?" OFF)
+#===========================================================================
+
+IF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
+  #===========================================================================
+  # THE USER HAS CHOSEN TO BUILD THE PACKAGE  
+  #===========================================================================
+
+  #===========================================================================
+  # If the package is not a "core" bbtk package (included into the toolkit)
+  # then we have to find and use bbtk 
+  IF(NOT BBTK_CORE_PACKAGE)
+    FIND_PACKAGE(BBTK REQUIRED)
+    INCLUDE(${BBTK_USE_FILE})
+  ENDIF(NOT BBTK_CORE_PACKAGE)
+  #===========================================================================
+  
+  #===========================================================================
+  # Include package configuration cmake script from bbtk cmake dir
+  INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage.cmake)
+  #=========================================================================== 
+  
+ELSE(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
+
+  #===========================================================================
+  # Else if it is a core package we have to reset some things...
+  IF(BBTK_CORE_PACKAGE)
+    INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_BuildOff.cmake)   
+  ENDIF(BBTK_CORE_PACKAGE)
+  #===========================================================================
+
+ENDIF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
diff --git a/bbtk_Transform3Ddicom_PKG/PackageConfig.cmake.in b/bbtk_Transform3Ddicom_PKG/PackageConfig.cmake.in
new file mode 100644 (file)
index 0000000..51f236d
--- /dev/null
@@ -0,0 +1,52 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+#========================================================================
+# BBTK package configuration 
+# ** DO NOT REMOVE **
+SET(BBTK_PACKAGE_NAME                 @BBTK_PACKAGE_NAME@)
+SET(@BBTK_PACKAGE_NAME@_USE_VTK       @BBTK_PACKAGE_USE_VTK@)
+SET(@BBTK_PACKAGE_NAME@_USE_ITK       @BBTK_PACKAGE_USE_ITK@)
+SET(@BBTK_PACKAGE_NAME@_USE_GDCM      @BBTK_PACKAGE_USE_GDCM@)
+SET(@BBTK_PACKAGE_NAME@_USE_GSMIS     @BBTK_PACKAGE_USE_GSMIS@)
+SET(@BBTK_PACKAGE_NAME@_USE_WXWIDGETS @BBTK_PACKAGE_USE_WXWIDGETS@)
+SET(@BBTK_PACKAGE_NAME@_USE_PACKAGES  @BBTK_PACKAGE_USE_PACKAGES@)
+SET(@BBTK_PACKAGE_NAME@_AUTHOR        "@BBTK_PACKAGE_AUTHOR@") 
+SET(@BBTK_PACKAGE_NAME@_DESCRIPTION   "@BBTK_PACKAGE_DESCRIPTION@")
+SET(@BBTK_PACKAGE_NAME@_MAJOR_VERSION @BBTK_PACKAGE_MAJOR_VERSION@)
+SET(@BBTK_PACKAGE_NAME@_MINOR_VERSION @BBTK_PACKAGE_MINOR_VERSION@) 
+SET(@BBTK_PACKAGE_NAME@_BUILD_VERSION @BBTK_PACKAGE_BUILD_VERSION@)
+SET(@BBTK_PACKAGE_NAME@_INCLUDE_DIRS  @BBTK_PACKAGE_INCLUDE_DIRS@)
+SET(@BBTK_PACKAGE_NAME@_LIBS          @BBTK_PACKAGE_LIBS@)
+# A BBTK PACKAGE NEEDS BBTK
+FIND_PACKAGE(BBTK REQUIRED)
+# BBTK Package configuration file inclusion
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_PackageConfig.cmake)
+# End of BBTK package configuration 
+#========================================================================
+
+#========================================================================
+# INSERT YOUR CUSTOM CONFIG HERE 
+#========================================================================
diff --git a/bbtk_Transform3Ddicom_PKG/README.txt b/bbtk_Transform3Ddicom_PKG/README.txt
new file mode 100644 (file)
index 0000000..f869f76
--- /dev/null
@@ -0,0 +1,77 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+This is a void bbtk package structure.
+
+You should have this file tree :
+
+.
+|-- CMakeLists.txt
+|-- Configure.cmake
+|-- PackageConfig.cmake.in
+|-- README.txt
+|-- UsePackage.cmake.in
+|-- bbs
+|   |-- CMakeLists.txt
+|   |-- appli
+|   `-- boxes
+|-- data
+|   `-- CMakeLists.txt
+|-- doc
+|   |-- CMakeLists.txt
+|   |-- bbdoc
+|   |   |-- CMakeLists.txt
+|   |   `-- header.html.in
+|   `-- doxygen
+|       |-- CMakeLists.txt
+|       |-- DoxyMainPage.txt.in
+|       `-- Doxyfile.txt.in
+`-- src
+    `-- CMakeLists.txt
+
+To use it :
+
+* Edit the root CMakeLists.txt file to customize your package build settings
+  (instructions inside the file)
+
+* Put your c++/xml boxes sources in 'src' 
+  Use the convention : If the name of your package is PACK and the name of your box is BOX then name the source files bbPACKBOX.{h|cxx|xml}
+
+* Put your script-defined boxes in 'bbs/boxes'. 
+  Use the convention : If the name of your box is 'Box' then call the file 'bbBox.bbs'
+
+* Put your script-defined applications in 'bbs/appli'. 
+
+* Put your data in 'data'
+
+* You can customize the header of your package html doc by editing the file 'doc/bbdoc/header.html.in'. You must put html code in this file (or edit it with an html editor). You can include images or links to other html pages. The images and pages must be put in the folder 'doc/bbdoc' and will be properly installed. The same way, you can link to these images or pages in your boxes descriptions without giving any path. If you create subdirs for your material then you have to install the materials yourself by editing the CMakeLists.txt and links must use path with are relative to 'doc/bbdoc'.
+
+* You can customize the main page of your doxygen doc by editing the file 'doc/doxygen/DoxyMainPage.txt.in'.
+
+* Advanced settings : you can add custom cmake settings for your package installation process by CMakeCreateFindPackage in the files PackageConfig.cmake.in and UsePackage.cmake.in (see CMakeCreateFindPackage doc).
+
+THAT'S ALL FOLKS !
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/UsePackage.cmake.in b/bbtk_Transform3Ddicom_PKG/UsePackage.cmake.in
new file mode 100644 (file)
index 0000000..a32b248
--- /dev/null
@@ -0,0 +1,29 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+# DO NOT REMOVE :
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_UsePackage.cmake)
+
+# INSERT YOUR CUSTOM USE HERE 
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/.DS_Store b/bbtk_Transform3Ddicom_PKG/bbs/.DS_Store
new file mode 100644 (file)
index 0000000..2c794d9
Binary files /dev/null and b/bbtk_Transform3Ddicom_PKG/bbs/.DS_Store differ
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/CMakeLists.txt b/bbtk_Transform3Ddicom_PKG/bbs/CMakeLists.txt
new file mode 100644 (file)
index 0000000..118cab3
--- /dev/null
@@ -0,0 +1,29 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_bbs.cmake)
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/appli/.DS_Store b/bbtk_Transform3Ddicom_PKG/bbs/appli/.DS_Store
new file mode 100644 (file)
index 0000000..5008ddf
Binary files /dev/null and b/bbtk_Transform3Ddicom_PKG/bbs/appli/.DS_Store differ
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/appli/README.txt b/bbtk_Transform3Ddicom_PKG/bbs/appli/README.txt
new file mode 100644 (file)
index 0000000..0c1ff24
--- /dev/null
@@ -0,0 +1,26 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+bbs files ...
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/.DS_Store b/bbtk_Transform3Ddicom_PKG/bbs/boxes/.DS_Store
new file mode 100644 (file)
index 0000000..f7beed6
Binary files /dev/null and b/bbtk_Transform3Ddicom_PKG/bbs/boxes/.DS_Store differ
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/README.txt b/bbtk_Transform3Ddicom_PKG/bbs/boxes/README.txt
new file mode 100644 (file)
index 0000000..0c1ff24
--- /dev/null
@@ -0,0 +1,26 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+bbs files ...
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/SliceVectorImageDicom3D.bbg b/bbtk_Transform3Ddicom_PKG/bbs/boxes/SliceVectorImageDicom3D.bbg
new file mode 100644 (file)
index 0000000..328673a
--- /dev/null
@@ -0,0 +1,522 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/CreatisWorks/Transform3Ddicom/Transform3Ddicom/bbtk_Transform3Ddicom_PKG/bbs/boxes/SliceVectorImageDicom3D.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:SliceVectorImageDicom3D
+PACKAGENAME:Transform3Ddicom
+COMPLEXOUTPUTS:4
+COMPLEX_PORT
+image
+249.120318:-219.330582:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+_widget
+43.472161:-220.849845:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+OutTransform
+176.310013:-217.844425:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+renderer
+14.698791:-220.972223:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:7
+COMPLEX_PORT
+VecImage
+231.454112:140.145676:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+VecDicomMap
+43.104687:142.291274:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+render
+155.405937:142.780324:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+indexZ
+111.368770:144.554625:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxExecute
+201.690488:140.179960:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+OpacityPlane
+334.807021:136.701557:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+IPP_Correction
+-27.575359:143.578603:-900.000000
+FIN_COMPLEX_PORT
+BOXES:36
+BOX
+creaImageIO:GetDicomAttributesFromMaps:Box02
+ISEXEC:FALSE
+17.036541:47.664847:-900.000000
+72.361541:37.664847:-900.000000
+PORT
+KeyDicom:"D0020_0032"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box04
+ISEXEC:FALSE
+28.847243:16.052421:-900.000000
+78.247243:6.052421:-900.000000
+PORT
+ErrorValue:"1000 1000 1000 "
+FIN_BOX
+BOX
+creaImageIO:GetDicomAttributesFromMaps:Box09
+ISEXEC:FALSE
+102.783991:44.492135:-900.000000
+158.108991:34.492135:-900.000000
+PORT
+KeyDicom:"D0020_0037"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box10
+ISEXEC:FALSE
+116.592585:17.347283:-900.000000
+165.992585:7.347283:-900.000000
+PORT
+ErrorValue:"1 0 0 0 0 1"
+FIN_BOX
+BOX
+vtk:GetVectorVtkImageDataElement:Box12
+ISEXEC:FALSE
+241.642760:46.026468:-900.000000
+299.892760:36.026468:-900.000000
+FIN_BOX
+BOX
+Transform3Ddicom:ImageActorDicom:Box14
+ISEXEC:FALSE
+163.348301:-79.529289:-900.000000
+207.598301:-89.529289:-900.000000
+PORT
+IPP:"-143.58 -59.34 -24.34"
+PORT
+OPP:"0.97 -0.19 -0.11 0.21 0.68 0.69"
+PORT
+PixelSpacing:"1 1 1"
+PORT
+Z:"0"
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box15
+ISEXEC:FALSE
+265.903480:-1.638027:-900.000000
+311.253480:-11.638027:-900.000000
+FIN_BOX
+BOX
+std:ReplaceString:Box16
+ISEXEC:FALSE
+25.102352:-0.546209:-900.000000
+64.827352:-10.546209:-900.000000
+PORT
+Replace:" "
+PORT
+Search:"\"
+FIN_BOX
+BOX
+std:ReplaceString:Box17
+ISEXEC:FALSE
+112.926974:-9.285246:-900.000000
+152.651974:-19.285246:-900.000000
+PORT
+Replace:" "
+PORT
+Search:"\"
+FIN_BOX
+BOX
+std:MagicBox:Box19
+ISEXEC:FALSE
+228.578090:109.632455:-900.000000
+264.653090:99.632455:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box20
+ISEXEC:FALSE
+152.494629:109.349565:-900.000000
+188.569629:99.349565:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box21
+ISEXEC:FALSE
+36.142339:109.278938:-900.000000
+72.217339:99.278938:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box22
+ISEXEC:FALSE
+96.128878:108.397070:-900.000000
+132.203878:98.397070:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:Box23
+ISEXEC:FALSE
+41.682128:-189.532161:-900.000000
+99.242128:-199.532161:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box24
+ISEXEC:FALSE
+-19.604981:-70.005515:-900.000000
+44.115019:-80.005515:-900.000000
+PORT
+nTypeView:"-1"
+FIN_BOX
+BOX
+toolsbbtk:ImageVtkPropertiesWidget:Box25
+ISEXEC:FALSE
+82.917913:-89.092725:-900.000000
+135.067913:-99.092725:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box26
+ISEXEC:FALSE
+94.432010:-168.591424:-900.000000
+151.992010:-178.591424:-900.000000
+PORT
+WinTitle:"DicomInfo"
+FIN_BOX
+BOX
+wx:OutputText:Box28
+ISEXEC:FALSE
+136.878287:-124.038843:-900.000000
+173.653287:-134.038843:-900.000000
+PORT
+Title:"Orientation"
+FIN_BOX
+BOX
+wx:OutputText:Box29
+ISEXEC:FALSE
+192.336835:-122.852062:-900.000000
+229.111835:-132.852062:-900.000000
+PORT
+Title:"Spacing"
+FIN_BOX
+BOX
+std:MagicBox:Box30
+ISEXEC:FALSE
+178.112414:-8.868085:-900.000000
+214.187414:-18.868085:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box31
+ISEXEC:FALSE
+269.332306:-31.960372:-900.000000
+309.057306:-41.960372:-900.000000
+PORT
+In2:" 1.17188"
+FIN_BOX
+BOX
+vtk:RescaleSlopeIntercept:Box35
+ISEXEC:FALSE
+201.556367:-26.680455:-900.000000
+249.681367:-36.680455:-900.000000
+PORT
+A:"1"
+FIN_BOX
+BOX
+creaImageIO:GetDicomAttributesFromMaps:Box36
+ISEXEC:FALSE
+-89.282445:47.883046:-900.000000
+-33.957445:37.883046:-900.000000
+PORT
+KeyDicom:"D0018_1060"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box37
+ISEXEC:FALSE
+-67.730377:15.697598:-900.000000
+-18.330377:5.697598:-900.000000
+PORT
+ErrorValue:"1000 1000 1000 "
+FIN_BOX
+BOX
+wx:OutputText:Box38
+ISEXEC:FALSE
+-24.277914:-120.278509:-900.000000
+12.497086:-130.278509:-900.000000
+PORT
+Title:"Trigger Time"
+FIN_BOX
+BOX
+creaImageIO:GetDicomAttributesFromMaps:Box39
+ISEXEC:FALSE
+-163.121024:47.447089:-900.000000
+-107.796024:37.447089:-900.000000
+PORT
+KeyDicom:"D0020_1041"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box40
+ISEXEC:FALSE
+-148.241922:14.844580:-900.000000
+-98.841922:4.844580:-900.000000
+PORT
+ErrorValue:"-9999"
+FIN_BOX
+BOX
+wx:OutputText:Box41
+ISEXEC:FALSE
+-154.281929:-122.188350:-900.000000
+-117.506929:-132.188350:-900.000000
+PORT
+Title:"Slice Location"
+FIN_BOX
+BOX
+std:MagicBox:Box42
+ISEXEC:FALSE
+335.931963:92.060897:-900.000000
+372.006963:82.060897:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box43
+ISEXEC:FALSE
+15.490400:-159.213039:-900.000000
+73.050400:-169.213039:-900.000000
+PORT
+WinTitle:"Image"
+FIN_BOX
+BOX
+std:MathOperationVector:Box45
+ISEXEC:FALSE
+76.185811:-40.265742:-900.000000
+123.710811:-50.265742:-900.000000
+PORT
+Type:"1"
+FIN_BOX
+BOX
+wx:OutputText:Box46
+ISEXEC:FALSE
+44.517616:-109.343866:-900.000000
+81.292616:-119.343866:-900.000000
+PORT
+Title:"Position"
+FIN_BOX
+BOX
+std:ConcatStrings:Box47
+ISEXEC:FALSE
+-39.212616:103.224036:-900.000000
+0.512384:93.224036:-900.000000
+FIN_BOX
+BOX
+std:MathOperationVector:Box49
+ISEXEC:FALSE
+-82.813370:-70.757278:-900.000000
+-35.288370:-80.757278:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box51
+ISEXEC:FALSE
+53.411499:-17.673116:-900.000000
+93.136499:-27.673116:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box52
+ISEXEC:FALSE
+101.356149:-110.457707:-900.000000
+138.131149:-120.457707:-900.000000
+PORT
+Title:"Position Correction"
+FIN_BOX
+CONNECTIONS:63
+CONNECTION
+Box02:Out:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box10:In
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:Box15:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box16:In
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box17:In
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box14:OPP
+NumberOfControlPoints:0
+CONNECTION
+VecImage:VecImage:Box19:In
+NumberOfControlPoints:0
+CONNECTION
+Box19:Out:Box12:In
+NumberOfControlPoints:0
+CONNECTION
+render:render:Box20:In
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box14:Renderer
+NumberOfControlPoints:0
+CONNECTION
+VecDicomMap:VecDicomMap:Box21:In
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+indexZ:indexZ:Box22:In
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box04:I
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box10:I
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box12:I
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:image:image
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:Box24:In
+NumberOfControlPoints:0
+CONNECTION
+Box25:widget:Box23:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:Box25:in
+NumberOfControlPoints:0
+CONNECTION
+Box23:Widget:_widget:_widget
+NumberOfControlPoints:0
+CONNECTION
+Box26:Widget:Box23:Widget3
+NumberOfControlPoints:0
+CONNECTION
+boxExecute:boxExecute:Box30:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box14:boxexecute
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box28:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box29:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box17:Out:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box15:Spacing:Box31:In1
+NumberOfControlPoints:0
+CONNECTION
+Box31:Out:Box29:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box24:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box12:Out:Box35:In
+NumberOfControlPoints:0
+CONNECTION
+Box35:Out:Box14:Image
+NumberOfControlPoints:0
+CONNECTION
+Box36:Out:Box37:In
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box36:In
+NumberOfControlPoints:0
+CONNECTION
+Box37:Out:Box38:In
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box38:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box37:I
+NumberOfControlPoints:0
+CONNECTION
+Box39:Out:Box40:In
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box39:In
+NumberOfControlPoints:0
+CONNECTION
+Box22:Out:Box40:I
+NumberOfControlPoints:0
+CONNECTION
+Box40:Out:Box41:In
+NumberOfControlPoints:0
+CONNECTION
+Box14:widget:Box23:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box14:outTransform:OutTransform:OutTransform
+NumberOfControlPoints:0
+CONNECTION
+OpacityPlane:OpacityPlane:Box42:In
+NumberOfControlPoints:0
+CONNECTION
+Box42:Out:Box14:opacity
+NumberOfControlPoints:0
+CONNECTION
+Box24:Renderer1:renderer:renderer
+NumberOfControlPoints:0
+CONNECTION
+Box24:Widget:Box43:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box43:Widget:Box23:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box45:Out:Box14:IPP
+NumberOfControlPoints:0
+CONNECTION
+Box16:Out:Box46:In
+NumberOfControlPoints:0
+CONNECTION
+Box46:Widget:Box26:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box46:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+IPP_Correction:IPP_Correction:Box47:In1
+NumberOfControlPoints:0
+CONNECTION
+Box47:Out:Box45:In1
+NumberOfControlPoints:0
+CONNECTION
+Box16:Out:Box51:In1
+NumberOfControlPoints:0
+CONNECTION
+Box51:Out:Box45:In0
+NumberOfControlPoints:0
+CONNECTION
+Box47:Out:Box52:In
+NumberOfControlPoints:0
+CONNECTION
+Box38:Widget:Box26:Widget8
+NumberOfControlPoints:0
+CONNECTION
+Box29:Widget:Box26:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box28:Widget:Box26:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box52:Widget:Box26:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box52:BoxExecute
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/SliceVectorImageDicom3D.bbs b/bbtk_Transform3Ddicom_PKG/bbs/boxes/SliceVectorImageDicom3D.bbs
new file mode 100644 (file)
index 0000000..d83624c
--- /dev/null
@@ -0,0 +1,193 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/CreatisWorks/Transform3Ddicom/Transform3Ddicom/bbtk_Transform3Ddicom_PKG/bbs/boxes/SliceVectorImageDicom3D.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaImageIO
+include std
+include vtk
+include Transform3Ddicom
+include wx
+include creaMaracasVisu
+include toolsbbtk
+
+define SliceVectorImageDicom3D Transform3Ddicom
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new creaImageIO:GetDicomAttributesFromMaps Box02
+  set Box02.KeyDicom "D0020_0032"
+
+new std:GetVectorStringElement Box04
+  set Box04.ErrorValue "1000 1000 1000 "
+
+new creaImageIO:GetDicomAttributesFromMaps Box09
+  set Box09.KeyDicom "D0020_0037"
+
+new std:GetVectorStringElement Box10
+  set Box10.ErrorValue "1 0 0 0 0 1"
+
+new vtk:GetVectorVtkImageDataElement Box12
+
+new Transform3Ddicom:ImageActorDicom Box14
+  set Box14.IPP "-143.58 -59.34 -24.34"
+  set Box14.OPP "0.97 -0.19 -0.11 0.21 0.68 0.69"
+  set Box14.PixelSpacing "1 1 1"
+  set Box14.Z "0"
+
+new vtk:ImageVtkProperties Box15
+
+new std:ReplaceString Box16
+  set Box16.Replace " "
+  set Box16.Search "\"
+
+new std:ReplaceString Box17
+  set Box17.Replace " "
+  set Box17.Search "\"
+
+new std:MagicBox Box19
+
+new std:MagicBox Box20
+
+new std:MagicBox Box21
+
+new std:MagicBox Box22
+
+new wx:LayoutTab Box23
+
+new creaMaracasVisu:ViewerNV Box24
+  set Box24.nTypeView "-1"
+
+new toolsbbtk:ImageVtkPropertiesWidget Box25
+
+new wx:LayoutLine Box26
+  set Box26.WinTitle "DicomInfo"
+
+new wx:OutputText Box28
+  set Box28.Title "Orientation"
+
+new wx:OutputText Box29
+  set Box29.Title "Spacing"
+
+new std:MagicBox Box30
+
+new std:ConcatStrings Box31
+  set Box31.In2 " 1.17188"
+
+new vtk:RescaleSlopeIntercept Box35
+  set Box35.A "1"
+
+new creaImageIO:GetDicomAttributesFromMaps Box36
+  set Box36.KeyDicom "D0018_1060"
+
+new std:GetVectorStringElement Box37
+  set Box37.ErrorValue "1000 1000 1000 "
+
+new wx:OutputText Box38
+  set Box38.Title "Trigger Time"
+
+new creaImageIO:GetDicomAttributesFromMaps Box39
+  set Box39.KeyDicom "D0020_1041"
+
+new std:GetVectorStringElement Box40
+  set Box40.ErrorValue "-9999"
+
+new wx:OutputText Box41
+  set Box41.Title "Slice Location"
+
+new std:MagicBox Box42
+
+new wx:LayoutLine Box43
+  set Box43.WinTitle "Image"
+
+new std:MathOperationVector Box45
+  set Box45.Type "1"
+
+new wx:OutputText Box46
+  set Box46.Title "Position"
+
+new std:ConcatStrings Box47
+
+new std:MathOperationVector Box49
+
+new std:ConcatStrings Box51
+
+new wx:OutputText Box52
+  set Box52.Title "Position Correction"
+
+
+connect Box02.Out Box04.In
+connect Box09.Out Box10.In
+connect Box12.Out Box15.In
+connect Box04.Out Box16.In
+connect Box10.Out Box17.In
+connect Box17.Out Box14.OPP
+connect Box19.Out Box12.In
+connect Box20.Out Box14.Renderer
+connect Box21.Out Box02.In
+connect Box21.Out Box09.In
+connect Box22.Out Box04.I
+connect Box22.Out Box10.I
+connect Box22.Out Box12.I
+connect Box12.Out Box24.In
+connect Box25.widget Box23.Widget2
+connect Box12.Out Box25.in
+connect Box26.Widget Box23.Widget3
+connect Box30.Out Box14.boxexecute
+connect Box30.Out Box28.BoxExecute
+connect Box30.Out Box29.BoxExecute
+connect Box17.Out Box28.In
+connect Box15.Spacing Box31.In1
+connect Box31.Out Box29.In
+connect Box30.Out Box24.BoxExecute
+connect Box12.Out Box35.In
+connect Box35.Out Box14.Image
+connect Box36.Out Box37.In
+connect Box21.Out Box36.In
+connect Box37.Out Box38.In
+connect Box30.Out Box38.BoxExecute
+connect Box22.Out Box37.I
+connect Box39.Out Box40.In
+connect Box21.Out Box39.In
+connect Box22.Out Box40.I
+connect Box40.Out Box41.In
+connect Box14.widget Box23.Widget4
+connect Box42.Out Box14.opacity
+connect Box24.Widget Box43.Widget1
+connect Box43.Widget Box23.Widget1
+connect Box45.Out Box14.IPP
+connect Box16.Out Box46.In
+connect Box46.Widget Box26.Widget1
+connect Box30.Out Box46.BoxExecute
+connect Box47.Out Box45.In1
+connect Box16.Out Box51.In1
+connect Box51.Out Box45.In0
+connect Box47.Out Box52.In
+connect Box38.Widget Box26.Widget8
+connect Box29.Widget Box26.Widget6
+connect Box28.Widget Box26.Widget4
+connect Box52.Widget Box26.Widget2
+connect Box30.Out Box52.BoxExecute
+
+# Complex input ports
+input VecImage Box19.In " "
+input render Box20.In " "
+input VecDicomMap Box21.In " "
+input indexZ Box22.In " "
+input boxExecute Box30.In " "
+input OpacityPlane Box42.In " "
+input IPP_Correction Box47.In1 " "
+
+# Complex output ports
+output image Box12.Out " "
+output _widget Box23.Widget " "
+output OutTransform Box14.outTransform " "
+output renderer Box24.Renderer1 " "
+
+
+endefine
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/ViewerPlaneContourDicom3D.bbg b/bbtk_Transform3Ddicom_PKG/bbs/boxes/ViewerPlaneContourDicom3D.bbg
new file mode 100644 (file)
index 0000000..42f2e92
--- /dev/null
@@ -0,0 +1,784 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/CreatisWorks/Transform3Ddicom/Transform3Ddicom/bbtk_Transform3Ddicom_PKG/bbs/boxes/ViewerPlaneContourDicom3D.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:ViewerPlaneContourDicom3D
+PACKAGENAME:Transform3Ddicom
+COMPLEXOUTPUTS:3
+COMPLEX_PORT
+widgetControls
+880.560868:-1487.624782:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+widget2D
+910.779108:-1487.727651:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxExecuteForRender
+929.882127:-1492.133644:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:9
+COMPLEX_PORT
+lstDirInstans
+530.245559:402.330540:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+StartPlane
+495.941820:397.713853:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+TitleWidget
+451.151864:396.168424:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxchange
+399.554928:396.137528:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+iPlane
+343.180505:390.963644:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+render3D
+318.580742:386.479727:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+surfExternal
+206.526687:373.132905:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+surfInternal
+39.753385:378.551994:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+TransformRefForSurface
+672.234078:409.139966:-900.000000
+FIN_COMPLEX_PORT
+BOXES:52
+BOX
+Transform3Ddicom:SliceVectorImageDicom3D:Box11
+ISEXEC:FALSE
+1249.024243:-711.132592:-900.000000
+1301.549243:-721.132592:-900.000000
+PORT
+OpacityPlane:"0.2"
+FIN_BOX
+BOX
+creaImageIO:ReadImages:Box24
+ISEXEC:FALSE
+1323.608672:-467.607052:-900.000000
+1362.233672:-477.607052:-900.000000
+PORT
+DicomTags:"D0020_0032 D0020_0037 D0018_1060"
+FIN_BOX
+BOX
+std:FilesFromDirectory:Box30
+ISEXEC:FALSE
+1343.890663:-427.894073:-900.000000
+1387.765663:-437.894073:-900.000000
+PORT
+FileEnd:".dcm"
+PORT
+In:"/home/davila/CreatisWorks/tmpSIMR/results/creaSIMR-Visu/Genet/Original_Images_Dicom/test_01/p_0001/condition_01/cine_tfi_retro_p3_SA 9"
+FIN_BOX
+BOX
+std:ReplaceString:Box46
+ISEXEC:FALSE
+1335.375950:-446.557430:-900.000000
+1375.100950:-456.557430:-900.000000
+PORT
+Replace:" "
+PORT
+Search:"\ "
+FIN_BOX
+BOX
+std:GetDoubleVectorSize:Box55
+ISEXEC:FALSE
+1191.685968:-227.569851:-900.000000
+1238.710968:-237.569851:-900.000000
+FIN_BOX
+BOX
+std:Add:Box56
+ISEXEC:FALSE
+1185.372380:-305.923972:-900.000000
+1215.822380:-315.923972:-900.000000
+PORT
+In2:"-1"
+FIN_BOX
+BOX
+vtk:Transform:Box73
+ISEXEC:FALSE
+1558.883814:-169.471572:-900.000000
+1594.458814:-179.471572:-900.000000
+PORT
+Scale:"1  1  1"
+FIN_BOX
+BOX
+creaVtk:ConcatTransform:Box75
+ISEXEC:FALSE
+1521.624065:-192.884127:-900.000000
+1564.424065:-202.884127:-900.000000
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box119
+ISEXEC:FALSE
+1251.292526:-385.082648:-900.000000
+1300.692526:-395.082648:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box120
+ISEXEC:FALSE
+1098.639936:-332.877408:-900.000000
+1130.214936:-342.877408:-900.000000
+PORT
+In:"2"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+FIN_BOX
+BOX
+wx:LayoutLine:Box121
+ISEXEC:FALSE
+1126.670501:-585.522755:-900.000000
+1163.245501:-595.522755:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box122
+ISEXEC:FALSE
+1187.830046:-458.836649:-900.000000
+1224.605046:-468.836649:-900.000000
+FIN_BOX
+BOX
+std:SplitFilePathVector:Box123
+ISEXEC:FALSE
+1196.627234:-415.748355:-900.000000
+1240.777234:-425.748355:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box124
+ISEXEC:FALSE
+1259.835280:-414.494217:-900.000000
+1311.235280:-424.494217:-900.000000
+PORT
+In:"100"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Plane Opacity"
+FIN_BOX
+BOX
+std:Div:Box125
+ISEXEC:FALSE
+1267.741590:-435.300338:-900.000000
+1298.191590:-445.300338:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+wx:LayoutTab:Box126
+ISEXEC:FALSE
+1131.668871:-616.763984:-900.000000
+1167.918871:-626.763984:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box129
+ISEXEC:FALSE
+1168.276363:-673.284914:-900.000000
+1209.101363:-683.284914:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box130
+ISEXEC:FALSE
+1235.628222:-1188.399572:-900.000000
+1278.028222:-1198.399572:-900.000000
+PORT
+Colour:"0 1 1"
+PORT
+LineWidth:"2"
+PORT
+Opacity:"1"
+PORT
+Representation:"1"
+FIN_BOX
+BOX
+creaVtk:Plane:Box131
+ISEXEC:FALSE
+1241.362281:-1036.278279:-900.000000
+1273.087281:-1046.278279:-900.000000
+PORT
+Origin:"0 0 35"
+FIN_BOX
+BOX
+creaVtk:Cutter:Box132
+ISEXEC:FALSE
+1247.059180:-1071.409575:-900.000000
+1279.259180:-1081.409575:-900.000000
+FIN_BOX
+BOX
+vtk:Transform:Box134
+ISEXEC:FALSE
+1672.305477:-198.120335:-900.000000
+1707.880477:-208.120335:-900.000000
+PORT
+Inverse:"true"
+FIN_BOX
+BOX
+creaVtk:ConcatTransform:Box135
+ISEXEC:FALSE
+1524.054069:-910.058453:-900.000000
+1566.854069:-920.058453:-900.000000
+FIN_BOX
+BOX
+creaVtk:ApplyTransformToPoint3D:Box136
+ISEXEC:FALSE
+1266.993928:-1000.913496:-900.000000
+1317.643928:-1010.913496:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box151
+ISEXEC:FALSE
+1188.050161:-1267.911043:-900.000000
+1227.750161:-1277.911043:-900.000000
+FIN_BOX
+BOX
+creaVtk:ConcatTransform:Box152
+ISEXEC:FALSE
+1332.057290:-1157.034252:-900.000000
+1374.857290:-1167.034252:-900.000000
+FIN_BOX
+BOX
+vtk:Transform:Box153
+ISEXEC:FALSE
+1351.149296:-1120.950729:-900.000000
+1386.724296:-1130.950729:-900.000000
+PORT
+Inverse:"true"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box154
+ISEXEC:FALSE
+1293.177122:-1187.217211:-900.000000
+1335.577122:-1197.217211:-900.000000
+PORT
+Colour:"0 1 1"
+PORT
+LineWidth:"2"
+PORT
+Opacity:"1"
+PORT
+Representation:"1"
+FIN_BOX
+BOX
+vtk:Transform:Box155
+ISEXEC:FALSE
+1396.696621:-1121.080259:-900.000000
+1432.271621:-1131.080259:-900.000000
+PORT
+Inverse:"true"
+PORT
+Translate:"0 0 35"
+FIN_BOX
+BOX
+std:MagicBox:Box145
+ISEXEC:FALSE
+606.806199:-54.668374:-900.000000
+642.881199:-64.668374:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box146
+ISEXEC:FALSE
+426.500852:-62.983109:-900.000000
+462.575852:-72.983109:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box147
+ISEXEC:FALSE
+357.447120:-62.740447:-900.000000
+393.522120:-72.740447:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box148
+ISEXEC:FALSE
+64.178811:-72.845620:-900.000000
+100.253811:-82.845620:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box150
+ISEXEC:FALSE
+480.965789:-62.549313:-900.000000
+520.690789:-72.549313:-900.000000
+PORT
+In1:"Plan"
+FIN_BOX
+BOX
+std:ConcatStrings:Box160
+ISEXEC:FALSE
+547.704477:-58.909698:-900.000000
+587.429477:-68.909698:-900.000000
+PORT
+In1:"0"
+FIN_BOX
+BOX
+std:MagicBox:Box161
+ISEXEC:FALSE
+219.630033:-63.158148:-900.000000
+255.705033:-73.158148:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box53
+ISEXEC:FALSE
+146.631508:-70.522669:-900.000000
+182.706508:-80.522669:-900.000000
+FIN_BOX
+BOX
+creaVtk:Cutter:Box54
+ISEXEC:FALSE
+1126.044485:-1071.598456:-900.000000
+1158.244485:-1081.598456:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box57
+ISEXEC:FALSE
+1057.200348:-1193.034798:-900.000000
+1099.600348:-1203.034798:-900.000000
+PORT
+Colour:"1 1 0"
+PORT
+LineWidth:"2"
+PORT
+Opacity:"1"
+PORT
+Representation:"1"
+FIN_BOX
+BOX
+vtk:PolyDataToActor:Box58
+ISEXEC:FALSE
+1121.729913:-1191.111908:-900.000000
+1164.129913:-1201.111908:-900.000000
+PORT
+Colour:"1 1 0"
+PORT
+LineWidth:"2"
+PORT
+Opacity:"1"
+PORT
+Representation:"1"
+FIN_BOX
+BOX
+wx:LayoutLine:Box59
+ISEXEC:FALSE
+1376.140236:-519.187781:-900.000000
+1433.700236:-529.187781:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:Slider:Box60
+ISEXEC:FALSE
+1440.828774:-470.487441:-900.000000
+1472.403774:-480.487441:-900.000000
+PORT
+In:"100"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Int. Cont .Opacity"
+FIN_BOX
+BOX
+std:Div:Box61
+ISEXEC:FALSE
+1438.779446:-495.864472:-900.000000
+1468.104446:-505.864472:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+wx:Slider:Box62
+ISEXEC:FALSE
+1505.578821:-468.088107:-900.000000
+1537.153821:-478.088107:-900.000000
+PORT
+In:"100"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Ext. Cont .Opacity"
+FIN_BOX
+BOX
+std:Div:Box63
+ISEXEC:FALSE
+1489.417269:-497.858804:-900.000000
+1518.742269:-507.858804:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box65
+ISEXEC:FALSE
+1420.488425:-1093.284012:-900.000000
+1460.813425:-1103.284012:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:MultipleInputs:Box66
+ISEXEC:FALSE
+1500.325744:-531.944274:-900.000000
+1540.025744:-541.944274:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box67
+ISEXEC:FALSE
+1509.273717:-118.709664:-900.000000
+1545.348717:-128.709664:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box51
+ISEXEC:FALSE
+1045.396241:-628.096492:-900.000000
+1085.721241:-638.096492:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:MultipleInputs:Box52
+ISEXEC:FALSE
+1055.811014:-588.857362:-900.000000
+1095.511014:-598.857362:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box68
+ISEXEC:FALSE
+1283.704914:-477.766742:-900.000000
+1323.429914:-487.766742:-900.000000
+PORT
+In2:"/translation.txt"
+FIN_BOX
+BOX
+std:ReplaceCleanString:Box69
+ISEXEC:FALSE
+1282.763805:-495.433990:-900.000000
+1328.313805:-505.433990:-900.000000
+PORT
+Replace:"Original_Images_Translations"
+PORT
+Search:"Original_Images_Dicom"
+FIN_BOX
+BOX
+std:ReadLinesString:Box70
+ISEXEC:FALSE
+1284.171679:-516.559563:-900.000000
+1325.571679:-526.559563:-900.000000
+FIN_BOX
+CONNECTIONS:95
+CONNECTION
+Box24:DicomInfo:Box11:VecDicomMap
+NumberOfControlPoints:0
+CONNECTION
+Box24:OutImages:Box11:VecImage
+NumberOfControlPoints:0
+CONNECTION
+Box30:Out:Box46:In
+NumberOfControlPoints:0
+CONNECTION
+Box46:Out:Box24:LstNameImages
+NumberOfControlPoints:0
+CONNECTION
+Box55:VectorSize:Box56:In1
+NumberOfControlPoints:0
+CONNECTION
+Box73:Out:Box75:In1
+NumberOfControlPoints:0
+CONNECTION
+Box120:Out:Box119:I
+NumberOfControlPoints:0
+CONNECTION
+Box120:Widget:Box121:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box119:Out:Box123:In
+NumberOfControlPoints:0
+CONNECTION
+Box123:BaseName:Box122:In
+NumberOfControlPoints:0
+CONNECTION
+Box122:Widget:Box121:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box120:BoxChange:Box122:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box124:Out:Box125:In1
+NumberOfControlPoints:0
+CONNECTION
+Box124:Widget:Box121:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box121:Widget:Box126:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box124:BoxChange:Box129:In3
+NumberOfControlPoints:0
+CONNECTION
+Box120:BoxChange:Box129:In4
+NumberOfControlPoints:0
+CONNECTION
+Box56:Out:Box120:Max
+NumberOfControlPoints:0
+CONNECTION
+Box119:Out:Box30:In
+NumberOfControlPoints:0
+CONNECTION
+Box125:Out:Box11:OpacityPlane
+NumberOfControlPoints:0
+CONNECTION
+Box132:Out:Box130:In
+NumberOfControlPoints:0
+CONNECTION
+Box136:Out:Box131:Origin
+NumberOfControlPoints:0
+CONNECTION
+Box136:OutDirection:Box131:Normal
+NumberOfControlPoints:0
+CONNECTION
+Box131:Out:Box132:ImplicitFunction
+NumberOfControlPoints:0
+CONNECTION
+Box75:Out:Box130:Transform
+NumberOfControlPoints:0
+CONNECTION
+Box134:Out:Box135:In2
+NumberOfControlPoints:0
+CONNECTION
+Box11:OutTransform:Box135:In1
+NumberOfControlPoints:0
+CONNECTION
+Box135:Out:Box136:Transform
+NumberOfControlPoints:0
+CONNECTION
+Box130:BoxChange:Box151:In3
+NumberOfControlPoints:0
+CONNECTION
+Box75:Out:Box152:In1
+NumberOfControlPoints:0
+CONNECTION
+Box153:Out:Box152:In2
+NumberOfControlPoints:0
+CONNECTION
+Box11:OutTransform:Box153:In
+NumberOfControlPoints:0
+CONNECTION
+Box132:Out:Box154:In
+NumberOfControlPoints:0
+CONNECTION
+Box152:Out:Box154:Transform
+NumberOfControlPoints:0
+CONNECTION
+Box154:BoxChange:Box151:In6
+NumberOfControlPoints:0
+CONNECTION
+Box11:renderer:Box154:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box155:Out:Box152:In3
+NumberOfControlPoints:0
+CONNECTION
+Box145:Out:Box55:In
+NumberOfControlPoints:0
+CONNECTION
+Box145:Out:Box119:In
+NumberOfControlPoints:0
+CONNECTION
+Box129:BoxChange:Box11:boxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box146:BoxChange:Box129:In1
+NumberOfControlPoints:0
+CONNECTION
+Box147:Out:Box11:indexZ
+NumberOfControlPoints:0
+CONNECTION
+Box148:Out:Box11:render
+NumberOfControlPoints:0
+CONNECTION
+Box148:Out:Box130:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box150:Out:Box121:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+Box160:Out:Box120:In
+NumberOfControlPoints:0
+CONNECTION
+lstDirInstans:lstDirInstans:Box145:In
+NumberOfControlPoints:0
+CONNECTION
+StartPlane:StartPlane:Box160:In1
+NumberOfControlPoints:0
+CONNECTION
+TitleWidget:TitleWidget:Box150:In1
+NumberOfControlPoints:0
+CONNECTION
+boxchange:boxchange:Box146:In
+NumberOfControlPoints:0
+CONNECTION
+iPlane:iPlane:Box147:In
+NumberOfControlPoints:0
+CONNECTION
+render3D:render3D:Box148:In
+NumberOfControlPoints:0
+CONNECTION
+Box126:Widget:widgetControls:widgetControls
+NumberOfControlPoints:0
+CONNECTION
+Box11:_widget:widget2D:widget2D
+NumberOfControlPoints:0
+CONNECTION
+Box151:BoxChange:boxExecuteForRender:boxExecuteForRender
+NumberOfControlPoints:0
+CONNECTION
+Box161:Out:Box132:In
+NumberOfControlPoints:0
+CONNECTION
+surfExternal:surfExternal:Box161:In
+NumberOfControlPoints:0
+CONNECTION
+surfInternal:surfInternal:Box53:In
+NumberOfControlPoints:0
+CONNECTION
+Box53:Out:Box54:In
+NumberOfControlPoints:0
+CONNECTION
+Box131:Out:Box54:ImplicitFunction
+NumberOfControlPoints:0
+CONNECTION
+Box54:Out:Box57:In
+NumberOfControlPoints:0
+CONNECTION
+Box54:Out:Box58:In
+NumberOfControlPoints:0
+CONNECTION
+Box75:Out:Box57:Transform
+NumberOfControlPoints:0
+CONNECTION
+Box152:Out:Box58:Transform
+NumberOfControlPoints:0
+CONNECTION
+Box148:Out:Box57:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box57:BoxChange:Box151:In1
+NumberOfControlPoints:0
+CONNECTION
+Box58:BoxChange:Box151:In2
+NumberOfControlPoints:0
+CONNECTION
+Box11:renderer:Box58:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box59:Widget:Box121:Widget8
+NumberOfControlPoints:0
+CONNECTION
+Box60:Out:Box61:In1
+NumberOfControlPoints:0
+CONNECTION
+Box60:Widget:Box59:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box62:Out:Box63:In1
+NumberOfControlPoints:0
+CONNECTION
+Box61:Out:Box57:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box61:Out:Box58:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box63:Out:Box130:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box63:Out:Box154:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box62:Widget:Box59:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box11:renderer:Box65:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box66:BoxChange:Box65:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box60:BoxChange:Box66:In1
+NumberOfControlPoints:0
+CONNECTION
+Box62:BoxChange:Box66:In3
+NumberOfControlPoints:0
+CONNECTION
+TransformRefForSurface:TransformRefForSurface:Box67:In
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box134:In
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box75:In2
+NumberOfControlPoints:0
+CONNECTION
+Box73:Out:Box135:In3
+NumberOfControlPoints:0
+CONNECTION
+Box129:BoxChange:Box151:In4
+NumberOfControlPoints:0
+CONNECTION
+Box148:Out:Box51:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box124:BoxChange:Box52:In1
+NumberOfControlPoints:0
+CONNECTION
+Box120:BoxChange:Box52:In3
+NumberOfControlPoints:0
+CONNECTION
+Box52:BoxChange:Box51:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box66:BoxChange:Box52:In4
+NumberOfControlPoints:0
+CONNECTION
+Box119:Out:Box68:In1
+NumberOfControlPoints:0
+CONNECTION
+Box68:Out:Box69:In
+NumberOfControlPoints:0
+CONNECTION
+Box69:Out:Box70:FileName
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out:Box11:IPP_Correction
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/ViewerPlaneContourDicom3D.bbs b/bbtk_Transform3Ddicom_PKG/bbs/boxes/ViewerPlaneContourDicom3D.bbs
new file mode 100644 (file)
index 0000000..03881b7
--- /dev/null
@@ -0,0 +1,289 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/CreatisWorks/Transform3Ddicom/Transform3Ddicom/bbtk_Transform3Ddicom_PKG/bbs/boxes/ViewerPlaneContourDicom3D.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include Transform3Ddicom
+include creaImageIO
+include std
+include vtk
+include creaVtk
+include wx
+
+define ViewerPlaneContourDicom3D Transform3Ddicom
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new Transform3Ddicom:SliceVectorImageDicom3D Box11
+  set Box11.OpacityPlane "0.2"
+
+new creaImageIO:ReadImages Box24
+  set Box24.DicomTags "D0020_0032 D0020_0037 D0018_1060"
+
+new std:FilesFromDirectory Box30
+  set Box30.FileEnd ".dcm"
+  set Box30.In "/home/davila/CreatisWorks/tmpSIMR/results/creaSIMR-Visu/Genet/Original_Images_Dicom/test_01/p_0001/condition_01/cine_tfi_retro_p3_SA 9"
+
+new std:ReplaceString Box46
+  set Box46.Replace " "
+  set Box46.Search "\ "
+
+new std:GetDoubleVectorSize Box55
+
+new std:Add Box56
+  set Box56.In2 "-1"
+
+new vtk:Transform Box73
+  set Box73.Scale "1  1  1"
+
+new creaVtk:ConcatTransform Box75
+
+new std:GetVectorStringElement Box119
+
+new wx:Slider Box120
+  set Box120.In "2"
+  set Box120.Min "0"
+  set Box120.ReactiveOnTrack "true"
+
+new wx:LayoutLine Box121
+
+new wx:OutputText Box122
+
+new std:SplitFilePathVector Box123
+
+new wx:Slider Box124
+  set Box124.In "100"
+  set Box124.Label "true"
+  set Box124.Max "100"
+  set Box124.Min "0"
+  set Box124.ReactiveOnTrack "true"
+  set Box124.Title "Plane Opacity"
+
+new std:Div Box125
+  set Box125.In2 "100"
+
+new wx:LayoutTab Box126
+
+new std:MultipleInputs Box129
+
+new vtk:PolyDataToActor Box130
+  set Box130.Colour "0 1 1"
+  set Box130.LineWidth "2"
+  set Box130.Opacity "1"
+  set Box130.Representation "1"
+
+new creaVtk:Plane Box131
+  set Box131.Origin "0 0 35"
+
+new creaVtk:Cutter Box132
+
+new vtk:Transform Box134
+  set Box134.Inverse "true"
+
+new creaVtk:ConcatTransform Box135
+
+new creaVtk:ApplyTransformToPoint3D Box136
+
+new std:MultipleInputs Box151
+
+new creaVtk:ConcatTransform Box152
+
+new vtk:Transform Box153
+  set Box153.Inverse "true"
+
+new vtk:PolyDataToActor Box154
+  set Box154.Colour "0 1 1"
+  set Box154.LineWidth "2"
+  set Box154.Opacity "1"
+  set Box154.Representation "1"
+
+new vtk:Transform Box155
+  set Box155.Inverse "true"
+  set Box155.Translate "0 0 35"
+
+new std:MagicBox Box145
+
+new std:MagicBox Box146
+
+new std:MagicBox Box147
+
+new std:MagicBox Box148
+
+new std:ConcatStrings Box150
+  set Box150.In1 "Plan"
+
+new std:ConcatStrings Box160
+  set Box160.In1 "0"
+
+new std:MagicBox Box161
+
+new std:MagicBox Box53
+
+new creaVtk:Cutter Box54
+
+new vtk:PolyDataToActor Box57
+  set Box57.Colour "1 1 0"
+  set Box57.LineWidth "2"
+  set Box57.Opacity "1"
+  set Box57.Representation "1"
+
+new vtk:PolyDataToActor Box58
+  set Box58.Colour "1 1 0"
+  set Box58.LineWidth "2"
+  set Box58.Opacity "1"
+  set Box58.Representation "1"
+
+new wx:LayoutLine Box59
+  set Box59.Orientation "H"
+
+new wx:Slider Box60
+  set Box60.In "100"
+  set Box60.Label "true"
+  set Box60.Max "100"
+  set Box60.Min "0"
+  set Box60.ReactiveOnTrack "true"
+  set Box60.Title "Int. Cont .Opacity"
+
+new std:Div Box61
+  set Box61.In2 "100"
+
+new wx:Slider Box62
+  set Box62.In "100"
+  set Box62.Label "true"
+  set Box62.Max "100"
+  set Box62.Min "0"
+  set Box62.ReactiveOnTrack "true"
+  set Box62.Title "Ext. Cont .Opacity"
+
+new std:Div Box63
+  set Box63.In2 "100"
+
+new vtk:UpdateRender Box65
+  set Box65.Active "true"
+
+new std:MultipleInputs Box66
+
+new std:MagicBox Box67
+
+new vtk:UpdateRender Box51
+  set Box51.Active "true"
+
+new std:MultipleInputs Box52
+
+new std:ConcatStrings Box68
+  set Box68.In2 "/translation.txt"
+
+new std:ReplaceCleanString Box69
+  set Box69.Replace "Original_Images_Translations"
+  set Box69.Search "Original_Images_Dicom"
+
+new std:ReadLinesString Box70
+
+
+connect Box24.DicomInfo Box11.VecDicomMap
+connect Box24.OutImages Box11.VecImage
+connect Box30.Out Box46.In
+connect Box46.Out Box24.LstNameImages
+connect Box55.VectorSize Box56.In1
+connect Box73.Out Box75.In1
+connect Box120.Out Box119.I
+connect Box120.Widget Box121.Widget2
+connect Box119.Out Box123.In
+connect Box123.BaseName Box122.In
+connect Box122.Widget Box121.Widget4
+connect Box120.BoxChange Box122.BoxExecute
+connect Box124.Out Box125.In1
+connect Box124.Widget Box121.Widget7
+connect Box121.Widget Box126.Widget1
+connect Box124.BoxChange Box129.In3
+connect Box120.BoxChange Box129.In4
+connect Box56.Out Box120.Max
+connect Box119.Out Box30.In
+connect Box125.Out Box11.OpacityPlane
+connect Box132.Out Box130.In
+connect Box136.Out Box131.Origin
+connect Box136.OutDirection Box131.Normal
+connect Box131.Out Box132.ImplicitFunction
+connect Box75.Out Box130.Transform
+connect Box134.Out Box135.In2
+connect Box11.OutTransform Box135.In1
+connect Box135.Out Box136.Transform
+connect Box130.BoxChange Box151.In3
+connect Box75.Out Box152.In1
+connect Box153.Out Box152.In2
+connect Box11.OutTransform Box153.In
+connect Box132.Out Box154.In
+connect Box152.Out Box154.Transform
+connect Box154.BoxChange Box151.In6
+connect Box11.renderer Box154.Renderer
+connect Box155.Out Box152.In3
+connect Box145.Out Box55.In
+connect Box145.Out Box119.In
+connect Box129.BoxChange Box11.boxExecute
+connect Box146.BoxChange Box129.In1
+connect Box147.Out Box11.indexZ
+connect Box148.Out Box11.render
+connect Box148.Out Box130.Renderer
+connect Box150.Out Box121.WinTitle
+connect Box160.Out Box120.In
+connect Box161.Out Box132.In
+connect Box53.Out Box54.In
+connect Box131.Out Box54.ImplicitFunction
+connect Box54.Out Box57.In
+connect Box54.Out Box58.In
+connect Box75.Out Box57.Transform
+connect Box152.Out Box58.Transform
+connect Box148.Out Box57.Renderer
+connect Box57.BoxChange Box151.In1
+connect Box58.BoxChange Box151.In2
+connect Box11.renderer Box58.Renderer
+connect Box59.Widget Box121.Widget8
+connect Box60.Out Box61.In1
+connect Box60.Widget Box59.Widget1
+connect Box62.Out Box63.In1
+connect Box61.Out Box57.Opacity
+connect Box61.Out Box58.Opacity
+connect Box63.Out Box130.Opacity
+connect Box63.Out Box154.Opacity
+connect Box62.Widget Box59.Widget3
+connect Box11.renderer Box65.Renderer
+connect Box66.BoxChange Box65.BoxExecute
+connect Box60.BoxChange Box66.In1
+connect Box62.BoxChange Box66.In3
+connect Box67.Out Box134.In
+connect Box67.Out Box75.In2
+connect Box73.Out Box135.In3
+connect Box129.BoxChange Box151.In4
+connect Box148.Out Box51.Renderer
+connect Box124.BoxChange Box52.In1
+connect Box120.BoxChange Box52.In3
+connect Box52.BoxChange Box51.BoxExecute
+connect Box66.BoxChange Box52.In4
+connect Box119.Out Box68.In1
+connect Box68.Out Box69.In
+connect Box69.Out Box70.FileName
+connect Box70.Out Box11.IPP_Correction
+
+# Complex input ports
+input lstDirInstans Box145.In " "
+input StartPlane Box160.In1 " "
+input TitleWidget Box150.In1 " "
+input boxchange Box146.In " "
+input iPlane Box147.In " "
+input render3D Box148.In " "
+input surfExternal Box161.In " "
+input surfInternal Box53.In " "
+input TransformRefForSurface Box67.In " "
+
+# Complex output ports
+output widgetControls Box126.Widget " "
+output widget2D Box11._widget " "
+output boxExecuteForRender Box151.BoxChange " "
+
+
+endefine
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbg b/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbg
new file mode 100644 (file)
index 0000000..504f0f0
--- /dev/null
@@ -0,0 +1,370 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/CreatisWorks/Transform3Ddicom/Transform3Ddicom/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:complex box, 3D object creator
+DESCRIPTION:Extract one slice image to a  Viewer IRM univer
+AUTHOR:davila.eduardo@creatis.univ-lyon1.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:ImageActorDicom
+PACKAGENAME:Transform3Ddicom
+COMPLEXOUTPUTS:3
+COMPLEX_PORT
+Out
+-22.580539:-191.276628:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+widget
+-102.458530:-190.978864:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+outTransform
+59.438055:-186.470820:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:8
+COMPLEX_PORT
+IPP
+-97.577691:105.411996:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+OPP
+-51.103223:101.663885:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+PixelSpacing
+0.411126:100.172339:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Z
+77.418921:101.075256:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Image
+146.113088:98.206537:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Renderer
+168.522158:95.627372:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+boxexecute
+-134.102954:101.827186:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+opacity
+-186.491998:105.993763:-900.000000
+FIN_COMPLEX_PORT
+BOXES:23
+BOX
+std:MagicBox:magicboxZ
+ISEXEC:FALSE
+68.675753:74.710523:-900.000000
+104.750753:64.710523:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:strCat
+ISEXEC:FALSE
+6.768675:37.526144:-900.000000
+46.293675:27.526144:-900.000000
+PORT
+In1:"0 "
+PORT
+In2:"0 "
+FIN_BOX
+BOX
+Transform3Ddicom:NewDicomImaPosPat:ndipp
+ISEXEC:FALSE
+-23.803821:-0.410982:-900.000000
+23.096179:-10.410982:-900.000000
+FIN_BOX
+BOX
+Transform3Ddicom:TransformSimple:ts
+ISEXEC:FALSE
+-15.704031:-55.156027:-900.000000
+22.020969:-65.156027:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ImageActor:actor
+ISEXEC:FALSE
+-22.279183:-162.519843:-900.000000
+15.670817:-172.519843:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box11
+ISEXEC:FALSE
+-129.830737:32.760280:-900.000000
+-93.755737:22.760280:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:DrawAxisTree3D:Box10
+ISEXEC:FALSE
+75.996292:-96.671176:-900.000000
+117.821292:-106.671176:-900.000000
+PORT
+ColourLaw:"2"
+PORT
+LineWidth:"2"
+PORT
+Opacity:"1"
+PORT
+iAxis:"0"
+PORT
+lstRadio:"1 1 1  1 1 1 1 1"
+FIN_BOX
+BOX
+Transform3Ddicom:CreateAxesTreeData:Box12
+ISEXEC:FALSE
+53.900495:-40.298824:-900.000000
+100.350495:-50.298824:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box13
+ISEXEC:FALSE
+183.192815:67.125154:-900.000000
+219.267815:57.125154:-900.000000
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box14
+ISEXEC:FALSE
+51.995790:-11.469660:-900.000000
+97.345790:-21.469660:-900.000000
+FIN_BOX
+BOX
+creaVtk:ConcatTransform:Box15
+ISEXEC:FALSE
+-57.107264:-105.151538:-900.000000
+-14.307264:-115.151538:-900.000000
+FIN_BOX
+BOX
+vtk:TransformWidget:Box16
+ISEXEC:FALSE
+-113.922675:-52.774113:-900.000000
+-71.547675:-62.774113:-900.000000
+PORT
+TitleWindow:"Transform"
+FIN_BOX
+BOX
+std:MultipleInputs:Box17
+ISEXEC:FALSE
+-127.882155:-114.693539:-900.000000
+-88.182155:-124.693539:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box18
+ISEXEC:FALSE
+-86.146344:-166.577827:-900.000000
+-45.821344:-176.577827:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+wx:OutputText:Box19
+ISEXEC:FALSE
+-153.587851:-146.322271:-900.000000
+-116.812851:-156.322271:-900.000000
+PORT
+In:"ups"
+FIN_BOX
+BOX
+vtk:Transform:Box20
+ISEXEC:FALSE
+-162.946513:-53.080408:-900.000000
+-127.371513:-63.080408:-900.000000
+PORT
+Translate:"-130 -114 0"
+FIN_BOX
+BOX
+vtk:Transform:Box21
+ISEXEC:FALSE
+-60.832803:-55.144106:-900.000000
+-25.257803:-65.144106:-900.000000
+PORT
+Translate:"130 114 0"
+FIN_BOX
+BOX
+std:ConcatStrings:Box23
+ISEXEC:FALSE
+-54.406756:66.940383:-900.000000
+-14.681756:56.940383:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box24
+ISEXEC:FALSE
+-109.505146:65.313515:-900.000000
+-69.780146:55.313515:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box25
+ISEXEC:FALSE
+-7.271279:70.555787:-900.000000
+32.453721:60.555787:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box27
+ISEXEC:FALSE
+-184.425562:63.976237:-900.000000
+-148.350562:53.976237:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:SliceImage:Box28
+ISEXEC:FALSE
+61.458724:26.789468:-900.000000
+98.683724:16.789468:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box29
+ISEXEC:FALSE
+132.667432:70.161670:-900.000000
+184.842432:60.161670:-900.000000
+FIN_BOX
+CONNECTIONS:49
+CONNECTION
+magicboxZ:Out:strCat:In3
+NumberOfControlPoints:0
+CONNECTION
+strCat:Out:ndipp:Point
+NumberOfControlPoints:0
+CONNECTION
+ndipp:Out:ts:IPP
+NumberOfControlPoints:0
+CONNECTION
+ts:OutImage:actor:In
+NumberOfControlPoints:0
+CONNECTION
+Z:Z:magicboxZ:In
+NumberOfControlPoints:0
+CONNECTION
+actor:Out:Out:Out
+NumberOfControlPoints:0
+CONNECTION
+boxexecute:boxexecute:Box11:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box12:LstZ:Box10:lstPointZ
+NumberOfControlPoints:0
+CONNECTION
+Box12:LstY:Box10:lstPointY
+NumberOfControlPoints:0
+CONNECTION
+Box12:LstX:Box10:lstPointX
+NumberOfControlPoints:0
+CONNECTION
+Box12:LstIndex:Box10:lstIndexs
+NumberOfControlPoints:0
+CONNECTION
+Box12:LstColor:Box10:Colour
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box10:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box12:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Renderer:Renderer:Box13:In
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:actor:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box10:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box14:Size:Box12:ImageSize
+NumberOfControlPoints:0
+CONNECTION
+Box14:Spacing:Box12:ImageSpacing
+NumberOfControlPoints:0
+CONNECTION
+Box15:Out:actor:Transform
+NumberOfControlPoints:0
+CONNECTION
+Box16:Window:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+Box16:BoxChange:Box17:In1
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box17:In2
+NumberOfControlPoints:0
+CONNECTION
+Box17:BoxChange:actor:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box16:BoxChange:Box18:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box18:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box16:Transform:Box15:In2
+NumberOfControlPoints:0
+CONNECTION
+Box20:Out:Box15:In1
+NumberOfControlPoints:0
+CONNECTION
+Box21:Out:Box15:In3
+NumberOfControlPoints:0
+CONNECTION
+ts:Out:Box15:In4
+NumberOfControlPoints:0
+CONNECTION
+Box23:Out:ndipp:IOP
+NumberOfControlPoints:0
+CONNECTION
+Box23:Out:ts:IOP
+NumberOfControlPoints:0
+CONNECTION
+Box23:Out:Box12:IOP
+NumberOfControlPoints:0
+CONNECTION
+OPP:OPP:Box23:In1
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:ndipp:IPP
+NumberOfControlPoints:0
+CONNECTION
+Box24:Out:Box12:IPP
+NumberOfControlPoints:0
+CONNECTION
+IPP:IPP:Box24:In1
+NumberOfControlPoints:0
+CONNECTION
+Box25:Out:ndipp:PixelSpacing
+NumberOfControlPoints:0
+CONNECTION
+Box25:Out:ts:PixelSpacing
+NumberOfControlPoints:0
+CONNECTION
+PixelSpacing:PixelSpacing:Box25:In1
+NumberOfControlPoints:0
+CONNECTION
+Box15:Out:outTransform:outTransform
+NumberOfControlPoints:0
+CONNECTION
+opacity:opacity:Box27:In
+NumberOfControlPoints:0
+CONNECTION
+Box27:Out:actor:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box27:Out:Box10:Opacity
+NumberOfControlPoints:0
+CONNECTION
+magicboxZ:Out:Box28:Z
+NumberOfControlPoints:0
+CONNECTION
+Image:Image:Box29:In
+NumberOfControlPoints:0
+CONNECTION
+Box29:Out:Box28:In
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:Box14:In
+NumberOfControlPoints:0
+CONNECTION
+Box28:Out:ts:InImage
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbs b/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbs
new file mode 100644 (file)
index 0000000..81837df
--- /dev/null
@@ -0,0 +1,136 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/CreatisWorks/Transform3Ddicom/Transform3Ddicom/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include std
+include Transform3Ddicom
+include creaMaracasVisu
+include vtk
+include creaVtk
+include wx
+
+define ImageActorDicom Transform3Ddicom
+
+author "davila.eduardo@creatis.univ-lyon1.fr"
+description "Extract one slice image to a  Viewer IRM univer"
+
+category "complex box, 3D object creator"
+
+new std:MagicBox magicboxZ
+
+new std:ConcatStrings strCat
+  set strCat.In1 "0 "
+  set strCat.In2 "0 "
+
+new Transform3Ddicom:NewDicomImaPosPat ndipp
+
+new Transform3Ddicom:TransformSimple ts
+
+new creaMaracasVisu:ImageActor actor
+
+new std:MagicBox Box11
+
+new creaMaracasVisu:DrawAxisTree3D Box10
+  set Box10.ColourLaw "2"
+  set Box10.LineWidth "2"
+  set Box10.Opacity "1"
+  set Box10.iAxis "0"
+  set Box10.lstRadio "1 1 1  1 1 1 1 1"
+
+new Transform3Ddicom:CreateAxesTreeData Box12
+
+new std:MagicBox Box13
+
+new vtk:ImageVtkProperties Box14
+
+new creaVtk:ConcatTransform Box15
+
+new vtk:TransformWidget Box16
+  set Box16.TitleWindow "Transform"
+
+new std:MultipleInputs Box17
+
+new vtk:UpdateRender Box18
+  set Box18.Active "true"
+
+new wx:OutputText Box19
+  set Box19.In "ups"
+
+new vtk:Transform Box20
+  set Box20.Translate "-130 -114 0"
+
+new vtk:Transform Box21
+  set Box21.Translate "130 114 0"
+
+new std:ConcatStrings Box23
+
+new std:ConcatStrings Box24
+
+new std:ConcatStrings Box25
+
+new std:MagicBox Box27
+
+new creaMaracasVisu:SliceImage Box28
+
+new vtk:vtkImageDataPointerRelay Box29
+
+
+connect magicboxZ.Out strCat.In3
+connect strCat.Out ndipp.Point
+connect ndipp.Out ts.IPP
+connect ts.OutImage actor.In
+connect Box12.LstZ Box10.lstPointZ
+connect Box12.LstY Box10.lstPointY
+connect Box12.LstX Box10.lstPointX
+connect Box12.LstIndex Box10.lstIndexs
+connect Box12.LstColor Box10.Colour
+connect Box11.Out Box10.BoxExecute
+connect Box11.Out Box12.BoxExecute
+connect Box13.Out actor.Renderer
+connect Box13.Out Box10.Renderer
+connect Box14.Size Box12.ImageSize
+connect Box14.Spacing Box12.ImageSpacing
+connect Box15.Out actor.Transform
+connect Box16.BoxChange Box17.In1
+connect Box11.Out Box17.In2
+connect Box17.BoxChange actor.BoxExecute
+connect Box16.BoxChange Box18.BoxExecute
+connect Box13.Out Box18.Renderer
+connect Box16.Transform Box15.In2
+connect Box20.Out Box15.In1
+connect Box21.Out Box15.In3
+connect ts.Out Box15.In4
+connect Box23.Out ndipp.IOP
+connect Box23.Out ts.IOP
+connect Box23.Out Box12.IOP
+connect Box24.Out ndipp.IPP
+connect Box24.Out Box12.IPP
+connect Box25.Out ndipp.PixelSpacing
+connect Box25.Out ts.PixelSpacing
+connect Box27.Out actor.Opacity
+connect Box27.Out Box10.Opacity
+connect magicboxZ.Out Box28.Z
+connect Box29.Out Box28.In
+connect Box28.Out Box14.In
+connect Box28.Out ts.InImage
+
+# Complex input ports
+input Z magicboxZ.In " "
+input boxexecute Box11.BoxExecute " "
+input Renderer Box13.In " "
+input OPP Box23.In1 " "
+input IPP Box24.In1 " "
+input PixelSpacing Box25.In1 " "
+input opacity Box27.In " "
+input Image Box29.In " "
+
+# Complex output ports
+output Out actor.Out " "
+output widget Box16.Window " "
+output outTransform Box15.Out " "
+
+
+endefine
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbs_EED b/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbImageActorDicom.bbs_EED
new file mode 100644 (file)
index 0000000..3de8769
--- /dev/null
@@ -0,0 +1,60 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PointBySpacing.bbs
+# ----------------------------------
+
+load Transform3Ddicom
+load vtk
+load std
+
+define ImageActorDicom Transform3Ddicom
+
+author "davila.eduardo@creatis.univ-lyon1.fr"
+description "Extract one slice image to a  Viewer IRM univer"
+category "complex box, 3D object creator"
+
+new MagicBox  magicboxIPP
+new MagicBox  magicboxIOP
+new MagicBox  magicboxPixelSpacing
+new MagicBox  magicboxZ
+
+new ConcatStrings strCat
+   set strCat.In1 "0"
+   set strCat.In2 "0"
+
+new NewDicomImaPosPat ndipp
+
+new SliceImage sliceimage
+
+new TransformSimple ts
+
+new ImageActor actor
+
+
+connect magicboxZ.Out strCat.In3
+connect strCat.Out                ndipp.Point
+connect magicboxIPP.Out           ndipp.IPP
+connect magicboxIOP.Out           ndipp.IOP
+connect magicboxPixelSpacing.Out  ndipp.PixelSpacing
+connect magicboxZ.Out sliceimage.Z
+connect  ndipp.Out                 ts.IPP
+connect  magicboxIOP.Out           ts.IOP
+connect  magicboxPixelSpacing.Out  ts.PixelSpacing
+connect  sliceimage.Out            ts.InImage
+connect ts.OutImage actor.In
+connect ts.Out actor.Transform
+
+# ----Require inputs----
+ input IPP            magicboxIPP.In            "Image Position Patient"
+ input OPP            magicboxIOP.In            "Image Orienation Patient"
+ input PixelSpacing   magicboxPixelSpacing.In   "Spacing of the image"
+ input Z              magicboxZ.In              "slice Z"
+ input Image          sliceimage.In             "Input image"
+ input Renderer       actor.Renderer            "The 2D image will be put in this rendere"
+
+
+
+# ----output----
+ output Out           actor.Out        "Actor vtk"
+
+endefine
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbIsoSurfaceExtractorDicom.bbs b/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbIsoSurfaceExtractorDicom.bbs
new file mode 100644 (file)
index 0000000..4aa4011
Binary files /dev/null and b/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbIsoSurfaceExtractorDicom.bbs differ
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbMetaImageDicomInfoReader.bbs b/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbMetaImageDicomInfoReader.bbs
new file mode 100644 (file)
index 0000000..ff5f425
--- /dev/null
@@ -0,0 +1,37 @@
+
+load Transform3Ddicom
+load vtk
+load std
+
+define MetaImageDicomInfoReader Transform3Ddicom
+
+description "Save MHD and MHD_dicom"
+author "davila.eduardo@creatis.univ-lyon1.fr"
+category "complex box, read/write"
+
+
+new MagicBox magicboxFilename
+
+new ConcatStrings catStr
+  connect magicboxFilename.Out catStr.In1
+  set catStr.In2 "_dicominfo"
+
+new MetaImageReader_DicomInfo readerdicominfo
+  connect catStr.Out readerdicominfo.In
+
+new MetaImageReader metaimagereader
+  connect magicboxFilename.Out metaimagereader.In
+
+
+// ----Require inputs----
+ input Filename       magicboxFilename.In                      "Filename"
+
+
+// ----Optional inputs----
+ output IPP            readerdicominfo.IPP            "Image Position Patient"
+ output OPP            readerdicominfo.IOP            "Image Orienation Patient"
+ output PixelSpacing   readerdicominfo.PixelSpacing   "Spacing of the image"
+ output Image          metaimagereader.Out            "Input image"
+
+endefine
+
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbMetaImageDicomInfoWriter.bbs b/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbMetaImageDicomInfoWriter.bbs
new file mode 100644 (file)
index 0000000..89a5b01
--- /dev/null
@@ -0,0 +1,42 @@
+
+load Transform3Ddicom
+load vtk
+load std
+
+define MetaImageDicomInfoWriter Transform3Ddicom
+
+description "Read MHD and MHD_dicom"
+author "davila.eduardo@creatis.univ-lyon1.fr"
+category "complex box, read/write"
+
+
+new MagicBox magicboxFilename
+
+new ConcatStrings catStr
+  connect magicboxFilename.Out catStr.In1
+  set catStr.In2 "_dicominfo"
+
+new MetaImageWriter_DicomInfo writerdicominfo
+  connect catStr.Out writerdicominfo.Filename
+
+new MetaImageWriter metaimagewriter
+       connect magicboxFilename.Out metaimagewriter.Filename
+
+
+// ----Require inputs----
+ input IPP            writerdicominfo.IPP            "Image Position Patient"
+ input OPP            writerdicominfo.IOP            "Image Orienation Patient"
+ input PixelSpacing   writerdicominfo.PixelSpacing   "Spacing of the image"
+ input Image          magicboxFilename.In            "Input image"
+ input In             metaimagewriter.Filename       "File Name"
+
+
+// ----Optional inputs----
+// input Colour         actor.Colour        "Color of the surface"
+// input Opacity        actor.Opacity       "Opacity of the surface"
+
+// ----output----
+// output Out           actor.Out        "Actor vtk"
+
+endefine
+
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbSubVolDicom.bbs b/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbSubVolDicom.bbs
new file mode 100644 (file)
index 0000000..d460208
--- /dev/null
@@ -0,0 +1,50 @@
+
+
+load Transform3Ddicom
+load vtk
+load std
+load itk
+load itkvtk
+
+
+define SubVolumeDicom Transform3Ddicom
+
+description "Extract sub volume with dicom info"
+author "davila.eduardo@creatis.univ-lyon1.fr"
+category "complex box, 3D object creator"
+
+
+
+new MagicBox magicboxIPP 
+new MagicBox magicboxIOP
+new MagicBox magicboxPixelSpacing 
+new MagicBox magicboxIndex
+
+new NewDicomImaPosPat ndipp
+  connect magicboxIndex.Out         ndipp.Point
+  connect magicboxIPP.Out           ndipp.IPP
+  connect magicboxIOP.Out           ndipp.IOP
+  connect magicboxPixelSpacing.Out  ndipp.PixelSpacing 
+
+
+new ImageRegion imageregion
+  connect magicboxIndex.Out  imageregion.Index
+
+new ExtractImageFilter extractimagefilter
+  connect imageregion.Out  extractimagefilter.Region
+
+
+// ----Require inputs----
+ input IPP            magicboxIPP.In            "Image Position Patient"
+ input OPP            magicboxIOP.In            "Image Orienation Patient"
+ input PixelSpacing   magicboxPixelSpacing.In   "Spacing of the image"
+ input Index          magicboxIndex.In          "Index of the subvolume"
+ input Size           imageregion.Size          "Size subvolume"
+ input In             extractimagefilter.In     "Image"
+
+
+// ----output----
+ output Out            extractimagefilter.Out        "sub image"
+
+endefine
+
diff --git a/bbtk_Transform3Ddicom_PKG/data/CMakeLists.txt b/bbtk_Transform3Ddicom_PKG/data/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8c8cae9
--- /dev/null
@@ -0,0 +1,29 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+#===========================================================================
+# Include package data configuration cmake script from bbtk dir
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_data.cmake)
+#===========================================================================
diff --git a/bbtk_Transform3Ddicom_PKG/doc/CMakeLists.txt b/bbtk_Transform3Ddicom_PKG/doc/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b8c773a
--- /dev/null
@@ -0,0 +1,30 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+#===========================================================================
+# Include package doc configuration cmake script
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_doc.cmake)
+#===========================================================================
+
diff --git a/bbtk_Transform3Ddicom_PKG/doc/bbdoc/CMakeLists.txt b/bbtk_Transform3Ddicom_PKG/doc/bbdoc/CMakeLists.txt
new file mode 100644 (file)
index 0000000..be214b8
--- /dev/null
@@ -0,0 +1,27 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_doc_bbdoc.cmake)
+
diff --git a/bbtk_Transform3Ddicom_PKG/doc/bbdoc/header.html.in b/bbtk_Transform3Ddicom_PKG/doc/bbdoc/header.html.in
new file mode 100644 (file)
index 0000000..4b3ae29
--- /dev/null
@@ -0,0 +1,38 @@
+<!--
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+-->
+
+<h1>bbtk package <b>@BBTK_PACKAGE_NAME@</b></h1>
+
+<p>
+Version <b>@BBTK_PACKAGE_MAJOR_VERSION@.@BBTK_PACKAGE_MINOR_VERSION@.@BBTK_PACKAGE_BUILD_VERSION@</b> - 
+by <b>@BBTK_PACKAGE_AUTHOR@</b>
+
+<p>
+@BBTK_PACKAGE_DESCRIPTION@
+
+<p>
+ <a href="../../doxygen/@BBTK_PACKAGE_NAME@/index.html">Doxygen documentation</a> of the source code
diff --git a/bbtk_Transform3Ddicom_PKG/doc/doxygen/CMakeLists.txt b/bbtk_Transform3Ddicom_PKG/doc/doxygen/CMakeLists.txt
new file mode 100644 (file)
index 0000000..901fd79
--- /dev/null
@@ -0,0 +1,26 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_doc_doxygen.cmake)
diff --git a/bbtk_Transform3Ddicom_PKG/doc/doxygen/DoxyMainPage.txt.in b/bbtk_Transform3Ddicom_PKG/doc/doxygen/DoxyMainPage.txt.in
new file mode 100644 (file)
index 0000000..6f90585
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+/**
+ * \mainpage bbtk package @BBTK_PACKAGE_NAME@
+
+\htmlonly 
+
+<p>Version 
+<b>@BBTK_PACKAGE_MAJOR_VERSION@.@BBTK_PACKAGE_MINOR_VERSION@.@BBTK_PACKAGE_BUILD_VERSION@</b> - 
+by <b>@BBTK_PACKAGE_AUTHOR@</b>
+<p>
+@BBTK_PACKAGE_DESCRIPTION@
+
+\endhtmlonly
+
+ */
diff --git a/bbtk_Transform3Ddicom_PKG/doc/doxygen/Doxyfile.txt.in b/bbtk_Transform3Ddicom_PKG/doc/doxygen/Doxyfile.txt.in
new file mode 100644 (file)
index 0000000..e759561
--- /dev/null
@@ -0,0 +1,789 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+# Doxyfile 1.2.14
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+PROJECT_NAME           = @DOXYGEN_PROJECT_NAME@
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+PROJECT_NUMBER         = @PROJECT_VERSION@
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+OUTPUT_DIRECTORY       = @DOXYGEN_OUTPUT@
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, 
+# German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, 
+# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
+OUTPUT_LANGUAGE        = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+EXTRACT_LOCAL_CLASSES  = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these class will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+HIDE_UNDOC_CLASSES     = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+REPEAT_BRIEF           = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
+# members of a class in the documentation of that class as if those members were 
+# ordinary class members. Constructors, destructors and assignment operators of 
+# the base classes will not be shown.
+INLINE_INHERITED_MEMB  = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. It is allowed to use relative paths in the argument list.
+STRIP_FROM_PATH        = 
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+INTERNAL_DOCS          = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+STRIP_CODE_COMMENTS    = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower case letters. If set to YES upper case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# users are adviced to set this option to NO.
+CASE_SENSE_NAMES       = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+SHORT_NAMES            = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+HIDE_SCOPE_NAMES       = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+VERBATIM_HEADERS       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put list of the files that are included by a file in the documentation 
+# of that file.
+SHOW_INCLUDE_FILES     = YES
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments  will behave just like the Qt-style comments (thus requiring an 
+# explict @brief command for a brief description.
+JAVADOC_AUTOBRIEF      = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# reimplements.
+INHERIT_DOCS           = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+SORT_MEMBER_DOCS       = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+DISTRIBUTE_GROUP_DOC   = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+TAB_SIZE               = 8
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+GENERATE_BUGLIST       = YES
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+ALIASES                = 
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+SHOW_USED_FILES        = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+QUIET                  = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, then doxygen will generate warnings 
+# for error documented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text.
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+WARN_LOGFILE           = @DOXYGEN_LOGFILE@
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+INPUT                  = @DOXYGEN_INPUT@
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# *.h++ *.idl *.odl
+FILE_PATTERNS          = *.h *.cxx *.txx
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+EXCLUDE                = @DOXYGEN_EXCLUDE@
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories.
+EXCLUDE_PATTERNS       = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+EXAMPLE_PATTERNS       = *.cxx
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.
+INPUT_FILTER           = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse.
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources.
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+INLINE_SOURCES         = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+REFERENCES_RELATION    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+COLS_IN_ALPHA_INDEX    = 3
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+HTML_OUTPUT            = @DOXYGEN_HTML_OUTPUT@
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view.
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, 
+# or Internet explorer 4.0+). Note that for large projects the tree generation 
+# can take a very long time. In such cases it is better to disable this feature. 
+# Windows users are probably better off using the HTML help feature.
+GENERATE_TREEVIEW      = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+LATEX_OUTPUT           = latex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+LATEX_BATCHMODE        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimised for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assigments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+GENERATE_XML           = NO
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed.
+PREDEFINED             = @DOXYGEN_DOC_PREDEFINED@
+                        
+
+# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line and do not end with a semicolon. Such function macros are typically 
+# used for boiler-plate code, and will confuse the parser if not removed.
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
+# super classes. Setting the tag to NO turns the diagrams off. Note that this 
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yield more powerful graphs.
+CLASS_DIAGRAMS         = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+HAVE_DOT               = @DOXYGEN_HAVE_DOT@
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+COLLABORATION_GRAPH    = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+TEMPLATE_RELATIONS     = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+HIDE_UNDOC_RELATIONS   = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+INCLUDED_BY_GRAPH      = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+GRAPHICAL_HIERARCHY    = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are gif, jpg, and png
+# If left blank gif will be used.
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found on the path.
+DOT_PATH               = "@DOXYGEN_DOT_PATH@"
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs.
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+SEARCHENGINE           = NO
diff --git a/bbtk_Transform3Ddicom_PKG/src/.DS_Store b/bbtk_Transform3Ddicom_PKG/src/.DS_Store
new file mode 100644 (file)
index 0000000..5008ddf
Binary files /dev/null and b/bbtk_Transform3Ddicom_PKG/src/.DS_Store differ
diff --git a/bbtk_Transform3Ddicom_PKG/src/CMakeLists.txt b/bbtk_Transform3Ddicom_PKG/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..34b0599
--- /dev/null
@@ -0,0 +1,30 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+#---------------------------------------------------------------------------
+# Include src configuration cmake script
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_src.cmake)
+#---------------------------------------------------------------------------
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateAxesTreeData.cxx b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateAxesTreeData.cxx
new file mode 100644 (file)
index 0000000..0887b1c
--- /dev/null
@@ -0,0 +1,140 @@
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+#include "bbTransform3DdicomCreateAxesTreeData.h"
+#include "bbTransform3DdicomPackage.h"
+#include "math.h"
+
+namespace bbTransform3Ddicom
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,CreateAxesTreeData)
+BBTK_BLACK_BOX_IMPLEMENTATION(CreateAxesTreeData,bbtk::AtomicBlackBox);
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void CreateAxesTreeData::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+//   Here we simply set the input 'In' value to the output 'Out'
+//   And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+//    void bbSet{Input|Output}NAME(const TYPE&)
+//    const TYPE& bbGet{Input|Output}NAME() const 
+//    Where :
+//    * NAME is the name of the input/output
+//      (the one provided in the attribute 'name' of the tag 'input')
+//    * TYPE is the C++ type of the input/output
+//      (the one provided in the attribute 'type' of the tag 'input')
+
+//    bbSetOutputOut( bbGetInputIn() );
+//    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+       std::vector<double> LstX;
+       std::vector<double> LstY;
+       std::vector<double> LstZ;
+       std::vector<int>        LstIndex;
+       std::vector<double> LstColor;
+       if ((bbGetInputIPP().size()==3) && (bbGetInputIOP().size()==6) )
+       {
+       // Axis X
+               LstX.push_back( bbGetInputIPP()[0] );
+               LstY.push_back( bbGetInputIPP()[1] );
+               LstZ.push_back( bbGetInputIPP()[2] );
+               LstX.push_back( bbGetInputIPP()[0]+20 );
+               LstY.push_back( bbGetInputIPP()[1] );
+               LstZ.push_back( bbGetInputIPP()[2] );           
+               LstIndex.push_back(2);
+               LstColor.push_back(1);
+               LstColor.push_back(0);
+               LstColor.push_back(0);
+       // Axis Y
+               LstX.push_back( bbGetInputIPP()[0] );
+               LstY.push_back( bbGetInputIPP()[1] );
+               LstZ.push_back( bbGetInputIPP()[2] );
+               LstX.push_back( bbGetInputIPP()[0] );
+               LstY.push_back( bbGetInputIPP()[1]+20 );
+               LstZ.push_back( bbGetInputIPP()[2] );           
+               LstIndex.push_back(2);
+               LstColor.push_back(1);
+               LstColor.push_back(1);
+               LstColor.push_back(0);
+       // Axis Z
+               LstX.push_back( bbGetInputIPP()[0] );
+               LstY.push_back( bbGetInputIPP()[1] );
+               LstZ.push_back( bbGetInputIPP()[2] );
+               LstX.push_back( bbGetInputIPP()[0] );
+               LstY.push_back( bbGetInputIPP()[1] );
+               LstZ.push_back( bbGetInputIPP()[2]+20 );                
+               LstIndex.push_back(2);
+               LstColor.push_back(1);
+               LstColor.push_back(0);
+               LstColor.push_back(1);
+       // Axis V1
+               LstX.push_back( bbGetInputIPP()[0] );
+               LstY.push_back( bbGetInputIPP()[1] );
+               LstZ.push_back( bbGetInputIPP()[2] );
+               double sizeX = (bbGetInputImageSize()[0]-1)*bbGetInputImageSpacing()[0];
+               LstX.push_back( bbGetInputIPP()[0] + bbGetInputIOP()[0]*sizeX);
+               LstY.push_back( bbGetInputIPP()[1] + bbGetInputIOP()[1]*sizeX);
+               LstZ.push_back( bbGetInputIPP()[2] + bbGetInputIOP()[2]*sizeX);         
+               LstIndex.push_back(2);
+               LstColor.push_back(1);
+               LstColor.push_back(1);
+               LstColor.push_back(1);
+       // Axis V2
+               LstX.push_back( bbGetInputIPP()[0] );
+               LstY.push_back( bbGetInputIPP()[1] );
+               LstZ.push_back( bbGetInputIPP()[2] );
+               double sizeY = (bbGetInputImageSize()[1]-1)*bbGetInputImageSpacing()[1];
+               LstX.push_back( bbGetInputIPP()[0] + bbGetInputIOP()[3]*sizeY);
+               LstY.push_back( bbGetInputIPP()[1] + bbGetInputIOP()[4]*sizeY);
+               LstZ.push_back( bbGetInputIPP()[2] + bbGetInputIOP()[5]*sizeY);         
+               LstIndex.push_back(2);
+               LstColor.push_back(0.7);
+               LstColor.push_back(0.7);
+               LstColor.push_back(0.7);
+     //  ---------------
+               bbSetOutputLstX( LstX );
+               bbSetOutputLstY( LstY );
+               bbSetOutputLstZ( LstZ );
+               bbSetOutputLstIndex( LstIndex );
+               bbSetOutputLstColor( LstColor );
+       }
+}
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void CreateAxesTreeData::bbUserSetDefaultValues()
+{
+//  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
+//    Here we initialize the input 'In' to 0
+ //  bbSetInputIn(0); 
+}
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void CreateAxesTreeData::bbUserInitializeProcessing()
+{
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any  
+}
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void CreateAxesTreeData::bbUserFinalizeProcessing()
+{
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any 
+}
+
+} // EO namespace bbTransform3Ddicom
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateAxesTreeData.h b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateAxesTreeData.h
new file mode 100644 (file)
index 0000000..b2cb3d2
--- /dev/null
@@ -0,0 +1,59 @@
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+#ifndef __bbTransform3DdicomCreateAxesTreeData_h_INCLUDED__
+#define __bbTransform3DdicomCreateAxesTreeData_h_INCLUDED__
+#include "bbTransform3Ddicom_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbTransform3Ddicom
+{
+
+class bbTransform3Ddicom_EXPORT CreateAxesTreeData
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(CreateAxesTreeData,bbtk::AtomicBlackBox);
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+  BBTK_DECLARE_INPUT(IPP,std::vector<double>);
+  BBTK_DECLARE_INPUT(IOP,std::vector<double>);
+  BBTK_DECLARE_INPUT(ImageSize,std::vector<int>);
+  BBTK_DECLARE_INPUT(ImageSpacing,std::vector<double>);
+  BBTK_DECLARE_OUTPUT(LstX,std::vector<double>);
+  BBTK_DECLARE_OUTPUT(LstY,std::vector<double>);
+  BBTK_DECLARE_OUTPUT(LstZ,std::vector<double>);
+  BBTK_DECLARE_OUTPUT(LstIndex,std::vector<int>);
+  BBTK_DECLARE_OUTPUT(LstColor,std::vector<double>);
+  BBTK_PROCESS(Process);
+  void Process();
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(CreateAxesTreeData,bbtk::AtomicBlackBox);
+  BBTK_NAME("CreateAxesTreeData");
+  BBTK_AUTHOR("InfoDev");
+  BBTK_DESCRIPTION("IPP[3] IOP[6]. X-red Y-yelow Z-violet,  V1-white, V2-gray");
+  BBTK_CATEGORY("empty");
+  BBTK_INPUT(CreateAxesTreeData,IPP,"Image position patient",std::vector<double>,"");
+  BBTK_INPUT(CreateAxesTreeData,IOP,"Image orientation patient",std::vector<double>,"");
+  BBTK_INPUT(CreateAxesTreeData,ImageSize,"Image size",std::vector<int>,"");
+  BBTK_INPUT(CreateAxesTreeData,ImageSpacing,"Image spacing",std::vector<double>,"");
+  BBTK_OUTPUT(CreateAxesTreeData,LstX,"List X",std::vector<double>,"");
+  BBTK_OUTPUT(CreateAxesTreeData,LstY,"List Y",std::vector<double>,"");
+  BBTK_OUTPUT(CreateAxesTreeData,LstZ,"List Z",std::vector<double>,"");
+  BBTK_OUTPUT(CreateAxesTreeData,LstIndex,"List Index",std::vector<int>,"");
+  BBTK_OUTPUT(CreateAxesTreeData,LstColor,"List Index",std::vector<double>,"");
+BBTK_END_DESCRIBE_BLACK_BOX(CreateAxesTreeData);
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+}
+// EO namespace bbTransform3Ddicom
+
+#endif // __bbTransform3DdicomCreateAxesTreeData_h_INCLUDED__
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.cxx b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.cxx
new file mode 100644 (file)
index 0000000..212668f
--- /dev/null
@@ -0,0 +1,185 @@
+#include <vtkVersionMacros.h>
+#include "bbTransform3DdicomCreateComplementImage.h"
+#include "bbTransform3DdicomPackage.h"
+namespace bbTransform3Ddicom
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,CreateComplementImage)
+BBTK_BLACK_BOX_IMPLEMENTATION(CreateComplementImage,bbtk::AtomicBlackBox);
+void CreateComplementImage::Process()
+{
+
+       if (( bbGetInputImage1()!=NULL ) && ( bbGetInputImage2()!=NULL ))
+       {
+               creaimage1->SetvtkImageData( bbGetInputImage1() );
+               creaimage1->SetImagePositionPatient( bbGetInputPosition1()[0] , bbGetInputPosition1()[1] , bbGetInputPosition1()[2] );
+               creaimage1->SetImageSpacing( bbGetInputSpacing1()[0] , bbGetInputSpacing1()[1] , bbGetInputSpacing1()[2]  );
+               creaimage1->SetImageOrientation(  bbGetInputOrientation1Vec1()[0] , bbGetInputOrientation1Vec1()[1] , bbGetInputOrientation1Vec1()[2] , 
+                                                                               bbGetInputOrientation1Vec2()[0] , bbGetInputOrientation1Vec2()[1] , bbGetInputOrientation1Vec2()[2]  );         
+               
+               creaimage2->SetvtkImageData( bbGetInputImage2() );
+               creaimage2->SetImagePositionPatient( bbGetInputPosition2()[0] , bbGetInputPosition2()[1] , bbGetInputPosition2()[2] );
+               creaimage2->SetImageSpacing( bbGetInputSpacing2()[0] , bbGetInputSpacing2()[1] , bbGetInputSpacing2()[2]  );
+               creaimage2->SetImageOrientation(  bbGetInputOrientation2Vec1()[0] , bbGetInputOrientation2Vec1()[1] , bbGetInputOrientation2Vec1()[2] , 
+                                                                               bbGetInputOrientation2Vec2()[0] , bbGetInputOrientation2Vec2()[1] , bbGetInputOrientation2Vec2()[2]  );
+               
+               
+               creaimagecomplement->SetBaseCreaImage( creaimage1 );
+               creaimagecomplement->SetComplementCreaImage( creaimage2 );
+               creaimagecomplement->Update();
+               
+               
+               double dimx,dimy,dimz;
+               
+               
+               dimx= ((bbGetInputExtOut()[1] - bbGetInputExtOut()[0]) / bbGetInputSpcOut()[0])+1;
+               dimy= ((bbGetInputExtOut()[3] - bbGetInputExtOut()[2]) / bbGetInputSpcOut()[1])+1;
+               dimz= ((bbGetInputExtOut()[5] - bbGetInputExtOut()[4]) / bbGetInputSpcOut()[2])+1;
+
+       //---- imageresult --------
+               imageresult->SetSpacing(1,1,1);
+               imageresult->SetDimensions(dimx,dimy,dimz);
+               imageresult->SetExtent(0,dimx-1,0,dimy-1,0,dimz-1);
+       #if (VTK_MAJOR_VERSION <= 5) 
+               imageresult->SetWholeExtent(0,dimx-1,0,dimy,0,dimz-1);
+               imageresult->SetScalarTypeToUnsignedShort();
+               imageresult->AllocateScalars();
+               imageresult->Update();
+       #endif
+       #if (VTK_MAJOR_VERSION >= 6) 
+               imageresult->AllocateScalars( VTK_UNSIGNED_SHORT ,1 );
+       #endif
+               
+               
+               
+               
+       //---- imageresult2 --------
+               imageresult2->SetSpacing(1,1,1);
+               imageresult2->SetDimensions(dimx,dimy,dimz);
+               imageresult2->SetExtent(0,dimx-1,0,dimy-1,0,dimz-1);
+
+       #if (VTK_MAJOR_VERSION <= 5) 
+               imageresult2->SetWholeExtent(0,dimx-1,0,dimy,0,dimz-1);
+               imageresult2->SetScalarTypeToUnsignedShort();
+               imageresult2->AllocateScalars();        
+               imageresult2->Update();
+       #endif
+       #if (VTK_MAJOR_VERSION >= 6) 
+               imageresult2->AllocateScalars( VTK_UNSIGNED_SHORT ,1 );
+       #endif
+               
+               
+               unsigned short *p;
+               double value;
+               int x,y,z;
+               double xx,yy,zz;
+               for (x=0;x<dimx;x++)
+               {
+                       for (y=0;y<dimy;y++)
+                       {
+                               for (z=0;z<dimz;z++)
+                               {
+                                       xx = (double)x * bbGetInputSpcOut()[0] + bbGetInputExtOut()[0] ;
+                                       yy = (double)y * bbGetInputSpcOut()[1] + bbGetInputExtOut()[2] ;
+                                       zz = (double)z * bbGetInputSpcOut()[2] + bbGetInputExtOut()[4] ;
+                                       // -- imageresult
+                                       value = creaimagecomplement->GetVoxelFromComplementImage_In_BaseCreaImage_Universe(xx,yy,zz);
+                                       p = (unsigned short *)imageresult->GetScalarPointer( x,y,z );
+                                       *p = (unsigned short)value;
+                                       // -- imageresult2
+                                       value = creaimage1->GetVoxelInImageUniverse(xx,yy,zz);
+                                       p = (unsigned short *)imageresult2->GetScalarPointer( x,y,z );
+                                       *p = (unsigned short)value;
+                                       
+                               }// for z
+                       } // for y
+               }// for x
+               
+               
+               
+               
+        bbSetOutputOut(imageresult);
+               bbSetOutputOut2(imageresult2);
+       } else  {
+               bbSetOutputOut(NULL);
+       }
+  
+}
+
+/*
+
+void CreateComplementImage::bbUserConstructor()
+{
+       creaimage1                      = new CreaImage();
+       creaimage2                      = new CreaImage();
+       creaimagecomplement = new CreaImageComplement();
+       imageresult                     = vtkImageData::New();
+       imageresult2            = vtkImageData::New();
+}
+void CreateComplementImage::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+{
+
+  
+}
+void CreateComplementImage::bbUserDestructor()
+{
+       delete creaimage1;
+       delete creaimage2;
+}
+
+*/
+
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void CreateComplementImage::bbUserSetDefaultValues()
+{
+       creaimage1                      = new CreaImage();
+       creaimage2                      = new CreaImage();
+       creaimagecomplement = new CreaImageComplement();
+       imageresult                     = vtkImageData::New();
+       imageresult2            = vtkImageData::New(); 
+}
+
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void CreateComplementImage::bbUserInitializeProcessing()
+{
+
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any 
+
+  
+}
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void CreateComplementImage::bbUserFinalizeProcessing()
+{
+
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+       delete creaimage1;
+       delete creaimage2;
+  
+}
+
+
+
+
+}
+// EO namespace bbTransform3Ddicom
+
+
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.cxx_eed b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.cxx_eed
new file mode 100644 (file)
index 0000000..0b2ad1d
--- /dev/null
@@ -0,0 +1,86 @@
+#include "bbTransform3DdicomCreateComplementImage.h"
+#include "bbTransform3DdicomPackage.h"
+
+
+
+namespace bbTransform3Ddicom
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,CreateComplementImage)
+BBTK_BLACK_BOX_IMPLEMENTATION(CreateComplementImage,bbtk::AtomicBlackBox);
+void CreateComplementImage::Process()
+{
+       if (( bbGetInputInImage1()!=NULL ) && ( bbGetInputInImage2()!=NULL ))
+       {
+               creaimage1->SetvtkImageData( bbGetInputImage1() );
+               creaimage1->SetImagePositionPatient( bbGetInputPosition1()[0] , 
+                               bbGetInputPosition1()[1] , 
+                               bbGetInputPosition1()[2] );\r
+               creaimage1->SetImageSpacing( bbGetInputSpacing1()[0] , bbGetInputSpacing1()[1] , bbGetInputSpacing1()[2]  );\r
+               creaimage1->SetImageOrientation(  bbGetInputOrientation1Vec1()[0] , bbGetInputOrientation1Vec1()[1] , bbGetInputOrientation1Vec1()[2] , 
+                                                                               bbGetInputOrientation1Vec2()[0] , bbGetInputOrientation1Vec2()[1] , bbGetInputOrientation1Vec2()[2]  );         \r
+               
+               creaimage2->SetvtkImageData( bbGetInputImage1() );
+               creaimage2->SetImagePositionPatient( bbGetInputPosition1()[0] , bbGetInputPosition1()[1] , bbGetInputPosition1()[2] );\r
+               creaimage2->SetImageSpacing( bbGetInputSpacing1()[0] , bbGetInputSpacing1()[1] , bbGetInputSpacing1()[2]  );\r
+               creaimage2->SetImageOrientation(  bbGetInputOrientation1Vec1()[0] , bbGetInputOrientation1Vec1()[1] , bbGetInputOrientation1Vec1()[2] , 
+                                                                               bbGetInputOrientation1Vec2()[0] , bbGetInputOrientation1Vec2()[1] , bbGetInputOrientation1Vec2()[2]  );
+               
+               \r
+               creaimagecomplement->SetBaseCreaImage( creaimage1 );
+               creaimagecomplement->SetComplementCreaImage( creaimage2 );
+               creaimagecomplement->Update();
+               
+               imageresult->SetSpacing(1,1,1);
+               imageresult->SetScalarTypeUnsignedShort();
+               dimx= (bbGetInputExtOut()[1] - bbGetInputExtOut()[0]) / bbGetInputSpcOut()[0];
+               dimy= (bbGetInputExtOut()[3] - bbGetInputExtOut()[2]) / bbGetInputSpcOut()[1];
+               dimz= (bbGetInputExtOut()[5] - bbGetInputExtOut()[4]) / bbGetInputSpcOut()[2];
+               imageresult->SetDimensions(dimx,dimy,dimz);
+               imageresult->AllocateMemory();  
+               
+               int x,y,z;
+               double xx,yy,zz;
+               for (x=0;x<dimx;x++)
+               {
+                       for (y=0;y<dimy;y++)
+                       {
+                               for (z=0;z<dimz;z++)
+                               {
+                                       xx = (double)x * bbGetInputSpcOut()[0] + bbGetInputExtOut()[0] ;
+                                       yy = (double)y * bbGetInputSpcOut()[1] + bbGetInputExtOut()[2] ;
+                                       zz = (double)z * bbGetInputSpcOut()[2] + bbGetInputExtOut()[4] ;
+                                       unsigned short value=creaimagecomplement->GetVoxelFromComplementImage_In_BaseCreaImage_Universe(xx,yy,zz);
+                                       unsigned short *p = (unsigned short *)imageresult->GetScalarPointer( x,y,z );
+                                       *p = value;
+                               }// for z
+                       } // for y
+               }// for x
+               bbSetOutputOut(imageresult);
+       } else  {
+               bbSetOutputOut(NULL);
+       }
+}
+
+void CreateComplementImage::bbUserConstructor()
+{  
+       creaimage1                      = new CreaImage();
+       creaimage2                      = new CreaImage();
+       creaimagecomplement = new CreaImageComplement();
+       imageresult                     = vtkImageData::New();
+}
+
+void CreateComplementImage::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+{ 
+}
+
+void CreateComplementImage::bbUserDestructor()
+{  
+       delete creaimage1;
+       delete creaimage2;
+}
+
+}
+// EO namespace bbTransform3Ddicom
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.h b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.h
new file mode 100644 (file)
index 0000000..d2d4a6d
--- /dev/null
@@ -0,0 +1,88 @@
+#ifndef __bbTransform3DdicomCreateComplementImage_h_INCLUDED__
+#define __bbTransform3DdicomCreateComplementImage_h_INCLUDED__
+#include "bbTransform3Ddicom_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+
+#include "CreaImage.h"
+#include "CreaImageComplement.h"
+
+
+namespace bbTransform3Ddicom
+{
+
+class bbTransform3Ddicom_EXPORT CreateComplementImage
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(CreateComplementImage,bbtk::AtomicBlackBox);
+//==================================================================
+
+/*
+/// User callback called in the box contructor
+virtual void bbUserConstructor();
+/// User callback called in the box copy constructor
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
+/// User callback called in the box destructor
+virtual void bbUserDestructor();
+*/
+
+//==================================================================
+
+  BBTK_DECLARE_INPUT(Image1, vtkImageData* );
+  BBTK_DECLARE_INPUT(Image2, vtkImageData* );
+  BBTK_DECLARE_INPUT(ExtOut,std::vector<double> );
+  BBTK_DECLARE_INPUT(SpcOut,std::vector<double> );
+  BBTK_DECLARE_INPUT(Spacing1,std::vector<double> );
+  BBTK_DECLARE_INPUT(Spacing2,std::vector<double> );
+  BBTK_DECLARE_INPUT(Position1,std::vector<double> );
+  BBTK_DECLARE_INPUT(Position2,std::vector<double> );
+  BBTK_DECLARE_INPUT(Orientation1Vec1,std::vector<double> );
+  BBTK_DECLARE_INPUT(Orientation1Vec2,std::vector<double> );
+  BBTK_DECLARE_INPUT(Orientation2Vec1,std::vector<double> );
+  BBTK_DECLARE_INPUT(Orientation2Vec2,std::vector<double> );
+  BBTK_DECLARE_OUTPUT(Out, vtkImageData* );
+  BBTK_DECLARE_OUTPUT(Out2, vtkImageData* );
+
+  BBTK_PROCESS(Process);
+  void Process();
+
+       CreaImage                       *creaimage1;
+       CreaImage                       *creaimage2;
+       CreaImageComplement *creaimagecomplement;
+       vtkImageData            *imageresult;
+       vtkImageData            *imageresult2;
+
+
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(CreateComplementImage,bbtk::AtomicBlackBox);
+BBTK_NAME("CreateComplementImage");
+BBTK_AUTHOR("InfoTeam");
+BBTK_DESCRIPTION("_description_");
+BBTK_CATEGORY("");
+
+BBTK_INPUT(CreateComplementImage,Image1,"Input image 1", vtkImageData* ,"");
+BBTK_INPUT(CreateComplementImage,Image2,"Input image 2", vtkImageData* ,"");
+BBTK_INPUT(CreateComplementImage,ExtOut,"Extend output image", std::vector<double> ,"");
+BBTK_INPUT(CreateComplementImage,SpcOut,"Spacing output image", std::vector<double> ,"");
+BBTK_INPUT(CreateComplementImage,Spacing1,"Spacing image 1",std::vector<double>,"");
+BBTK_INPUT(CreateComplementImage,Spacing2,"Spacing image 2",std::vector<double>,"");
+BBTK_INPUT(CreateComplementImage,Position1,"Position image 1",std::vector<double>,"");
+BBTK_INPUT(CreateComplementImage,Position2,"Position image 2",std::vector<double>,"");
+BBTK_INPUT(CreateComplementImage,Orientation1Vec1,"Orientation image 1 with vec 1",std::vector<double>,"");
+BBTK_INPUT(CreateComplementImage,Orientation1Vec2,"Orientation image 1 with vec 2",std::vector<double>,"");
+BBTK_INPUT(CreateComplementImage,Orientation2Vec1,"Orientation image 2 with vec 1",std::vector<double>,"");
+BBTK_INPUT(CreateComplementImage,Orientation2Vec2,"Orientation image 2 with vec 2",std::vector<double>,"");
+BBTK_OUTPUT(CreateComplementImage,Out,"Output image",vtkImageData*,"");
+BBTK_OUTPUT(CreateComplementImage,Out2,"Output image",vtkImageData*,"");
+
+
+BBTK_END_DESCRIBE_BLACK_BOX(CreateComplementImage);
+}
+// EO namespace bbTransform3Ddicom
+
+#endif // __bbTransform3DdicomCreateComplementImage_h_INCLUDED__
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.h_eed b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomCreateComplementImage.h_eed
new file mode 100644 (file)
index 0000000..3e32b81
--- /dev/null
@@ -0,0 +1,82 @@
+#ifndef __bbTransform3DdicomCreateComplementImage_h_INCLUDED__
+#define __bbTransform3DdicomCreateComplementImage_h_INCLUDED__
+#include "bbTransform3Ddicom_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+
+#include "CreaImage.h"
+#include "CreaImageComplement.h"
+
+
+namespace bbTransform3Ddicom
+{
+
+class bbTransform3Ddicom_EXPORT CreateComplementImage
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(CreateComplementImage,bbtk::AtomicBlackBox);
+//==================================================================
+/// User callback called in the box contructor
+virtual void bbUserConstructor();
+/// User callback called in the box copy constructor
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
+/// User callback called in the box destructor
+virtual void bbUserDestructor();
+//==================================================================
+
+  BBTK_DECLARE_INPUT(Image1, vtkImageData );\r
+  BBTK_DECLARE_INPUT(Image2, vtkImageData );\r
+  BBTK_DECLARE_INPUT(ExtOut,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(SpcOut,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Spacing1,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Spacing2,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Position1,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Position2,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation1Vec1,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation1Vec2,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation2Vec1,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation2Vec2,std::vector<double> );\r
+  BBTK_DECLARE_OUTPUT(Out, vtkImageData* );
+
+  BBTK_PROCESS(Process);
+  void Process();
+
+       CreaImage                       *creaimage1;
+       CreaImage                       *creaimage2;
+       CreaImageComplement *creaimagecomplement;
+       vtkImageData            *imageresult;
+
+
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(CreateComplementImage,bbtk::AtomicBlackBox);
+BBTK_NAME("CreateComplementImage");
+BBTK_AUTHOR("InfoDev");
+BBTK_DESCRIPTION("_description_");
+BBTK_CATEGORY("filter");
+BBTK_INPUT(CreateComplementImage,In,"First input",double,"");
+
+BBTK_INPUT(CreateComplementImage,Image1,"Input image 1", vtkImageData* ,"");\r
+BBTK_INPUT(CreateComplementImage,Image2,"Input image 2", vtkImageData* ,"");\r
+BBTK_INPUT(CreateComplementImage,ExtOut,"Extend output image", std::vector<double> ,"");\r
+BBTK_INPUT(CreateComplementImage,SpcOut,"Spacing output image", std::vector<double> ,"");\r
+BBTK_INPUT(CreateComplementImage,Spacing1,"Spacing image 1",std::vector<double>,"");\r
+BBTK_INPUT(CreateComplementImage,Spacing2,"Spacing image 2",std::vector<double>,"");\r
+BBTK_INPUT(CreateComplementImage,Position1,"Position image 1",std::vector<double>,"");\r
+BBTK_INPUT(CreateComplementImage,Position2,"Position image 2",std::vector<double>,"");\r
+BBTK_INPUT(CreateComplementImage,Orientation1Vec1,"Orientation image 1 with vec 1",std::vector<double>,"");\r
+BBTK_INPUT(CreateComplementImage,Orientation1Vec2,"Orientation image 1 with vec 2",std::vector<double>,"");\r
+BBTK_INPUT(CreateComplementImage,Orientation2Vec1,"Orientation image 2 with vec 1",std::vector<double>,"");\r
+BBTK_INPUT(CreateComplementImage,Orientation2Vec2,"Orientation image 2 with vec 2",std::vector<double>,"");\r
+BBTK_OUTPUT(CreateComplementImage,Out,"Output image",vtkImageData*,"");\r
+
+
+BBTK_END_DESCRIBE_BLACK_BOX(CreateComplementImage);
+}
+// EO namespace bbTransform3Ddicom
+
+#endif // __bbTransform3DdicomCreateComplementImage_h_INCLUDED__
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomFlipImage.cxx b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomFlipImage.cxx
new file mode 100644 (file)
index 0000000..b88f86f
--- /dev/null
@@ -0,0 +1,99 @@
+#include "bbTransform3DdicomFlipImage.h"
+#include "bbTransform3DdicomPackage.h"
+namespace bbTransform3Ddicom
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,FlipImage)
+BBTK_BLACK_BOX_IMPLEMENTATION(FlipImage,bbtk::AtomicBlackBox);
+
+void FlipImage::Process()
+{
+       if (imagedata!=NULL)
+       {
+               imagedata->Delete();
+       }
+       imagedata = vtkImageData::New();
+       imagedata->DeepCopy( bbGetInputIn() );
+       
+       int ext[6];
+       imagedata->GetExtent( ext );
+       
+       for (int z=0; z<=ext[5]; z++) {
+         for (int x=0; x<ext[1]; x++) {
+               for (int y=0; y<ext[3]/2; y++) {
+                       unsigned short *p1 = (unsigned short *)imagedata->GetScalarPointer( x , y , z ); 
+                       unsigned short *p2 = (unsigned short *)imagedata->GetScalarPointer( x , ext[3]-y-1 , z ); 
+                       unsigned short tt;
+                       tt =*p1;
+                       *p1=*p2;
+                       *p2=tt;
+               }
+         } 
+       }
+
+       bbSetOutputOut( imagedata );
+}
+
+/*  EED 13/11/2015
+void FlipImage::bbUserConstructor()
+{
+       imagedata=NULL;
+//    bbSetInputIn(0);
+}
+
+void FlipImage::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+{
+}
+
+void FlipImage::bbUserDestructor()
+{  
+}
+*/
+
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void FlipImage::bbUserSetDefaultValues()
+{
+       imagedata=NULL;
+//    bbSetInputIn(0);
+}
+
+
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void FlipImage::bbUserInitializeProcessing()
+{
+
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any 
+
+  
+}
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void FlipImage::bbUserFinalizeProcessing()
+{
+
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+  
+}
+
+
+
+}
+// EO namespace bbTransform3Ddicom
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomFlipImage.h b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomFlipImage.h
new file mode 100644 (file)
index 0000000..13ccf8c
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef __bbTransform3DdicomFlipImage_h_INCLUDED__
+#define __bbTransform3DdicomFlipImage_h_INCLUDED__
+#include "bbTransform3Ddicom_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+
+
+namespace bbTransform3Ddicom
+{
+
+class bbTransform3Ddicom_EXPORT FlipImage
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(FlipImage,bbtk::AtomicBlackBox);
+//==================================================================
+
+/* EED 13/11/2015
+/// User callback called in the box contructor
+virtual void bbUserConstructor();
+/// User callback called in the box copy constructor
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
+/// User callback called in the box destructor
+virtual void bbUserDestructor();
+*/
+
+//==================================================================
+  BBTK_DECLARE_INPUT(In,vtkImageData*);
+  BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+  BBTK_PROCESS(Process);
+  void Process();
+  vtkImageData *imagedata;
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(FlipImage,bbtk::AtomicBlackBox);
+BBTK_NAME("FlipImage");
+BBTK_AUTHOR("InfoDev CREATIS-LRMN");
+BBTK_DESCRIPTION("FlipImage in Y");
+BBTK_CATEGORY("");
+BBTK_INPUT(FlipImage,In,"First input",vtkImageData*,"");
+BBTK_OUTPUT(FlipImage,Out,"First output",vtkImageData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(FlipImage);
+}
+// EO namespace bbTransform3Ddicom
+
+#endif // __bbTransform3DdicomFlipImage_h_INCLUDED__
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageReader_DicomInfo.cxx b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageReader_DicomInfo.cxx
new file mode 100644 (file)
index 0000000..4aa765f
--- /dev/null
@@ -0,0 +1,142 @@
+#include "bbTransform3DdicomMetaImageReader_DicomInfo.h"
+#include "bbTransform3DdicomPackage.h"
+namespace bbTransform3Ddicom
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,MetaImageReader_DicomInfo)
+BBTK_BLACK_BOX_IMPLEMENTATION(MetaImageReader_DicomInfo,bbtk::AtomicBlackBox);
+void MetaImageReader_DicomInfo::Process()
+{  
+       if (bbGetInputIn()!=""){
+               IPP.clear();
+               IOP.clear();
+               PixelSpacing.clear();
+               char tmp[100];
+               FILE *ff = fopen(  bbGetInputIn().c_str() , "r+" );
+               fscanf(ff,"%s", tmp);  // ImagePositionPatient
+               fscanf(ff,"%s", tmp);  // x
+               IPP.push_back( atof(tmp) );
+               fscanf(ff,"%s", tmp);  // y
+               IPP.push_back( atof(tmp) );
+               fscanf(ff,"%s", tmp);  // z
+               IPP.push_back( atof(tmp) );
+
+               fscanf(ff,"%s", tmp);  // ImageOrientationPatient
+               fscanf(ff,"%s", tmp);  // x1
+               IOP.push_back( atof(tmp) );
+               fscanf(ff,"%s", tmp);  // y1
+               IOP.push_back( atof(tmp) );
+               fscanf(ff,"%s", tmp);  // z1
+               IOP.push_back( atof(tmp) );
+               fscanf(ff,"%s", tmp);  // x2
+               IOP.push_back( atof(tmp) );
+               fscanf(ff,"%s", tmp);  // y2
+               IOP.push_back( atof(tmp) );
+               fscanf(ff,"%s", tmp);  // z2
+               IOP.push_back( atof(tmp) );
+       
+               fscanf(ff,"%s", tmp);  // Spacing
+               fscanf(ff,"%s", tmp);  // sx
+               PixelSpacing.push_back( atof(tmp) );
+               fscanf(ff,"%s", tmp);  // sy
+               PixelSpacing.push_back( atof(tmp) );
+               fscanf(ff,"%s", tmp);  // sz
+               PixelSpacing.push_back( atof(tmp) );
+               
+               fclose(ff);
+               
+               bbSetOutputIPP( IPP );
+               bbSetOutputIOP( IPP );
+               bbSetOutputPixelSpacing( PixelSpacing );
+       } 
+       
+       
+}
+       
+/*
+void MetaImageReader_DicomInfo::bbUserConstructor()
+{
+    bbSetInputIn("");
+       IPP.clear();
+       
+       IOP.clear();
+       IOP.push_back( 1 ); // x1
+       IOP.push_back( 0 ); // y1
+       IOP.push_back( 0 ); // z1
+       IOP.push_back( 0 ); // x2
+       IOP.push_back(10 ); // y2
+       IOP.push_back( 0 ); // z2
+       
+       PixelSpacing.clear();
+       PixelSpacing.push_back( 1 );
+       PixelSpacing.push_back( 1 );
+       PixelSpacing.push_back( 1 );
+       
+}
+       
+void MetaImageReader_DicomInfo::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+{
+}
+       
+void MetaImageReader_DicomInfo::bbUserDestructor()
+{
+}
+*/
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void MetaImageReader_DicomInfo::bbUserSetDefaultValues()
+{
+    bbSetInputIn("");
+       IPP.clear();
+       
+       IOP.clear();
+       IOP.push_back( 1 ); // x1
+       IOP.push_back( 0 ); // y1
+       IOP.push_back( 0 ); // z1
+       IOP.push_back( 0 ); // x2
+       IOP.push_back(10 ); // y2
+       IOP.push_back( 0 ); // z2
+       
+       PixelSpacing.clear();
+       PixelSpacing.push_back( 1 );
+       PixelSpacing.push_back( 1 );
+       PixelSpacing.push_back( 1 );    
+}
+
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void MetaImageReader_DicomInfo::bbUserInitializeProcessing()
+{
+
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any 
+
+}
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void MetaImageReader_DicomInfo::bbUserFinalizeProcessing()
+{
+
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+
+  
+}
+
+
+       
+}
+// EO namespace bbTransform3Ddicom
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageReader_DicomInfo.h b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageReader_DicomInfo.h
new file mode 100644 (file)
index 0000000..e2e4607
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef __bbTransform3DdicomMetaImageReader_DicomInfo_h_INCLUDED__
+#define __bbTransform3DdicomMetaImageReader_DicomInfo_h_INCLUDED__
+#include "bbTransform3Ddicom_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbTransform3Ddicom
+{
+
+class bbTransform3Ddicom_EXPORT MetaImageReader_DicomInfo
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(MetaImageReader_DicomInfo,bbtk::AtomicBlackBox);
+//==================================================================
+
+/*
+/// User callback called in the box contructor
+virtual void bbUserConstructor();
+/// User callback called in the box copy constructor
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
+/// User callback called in the box destructor
+virtual void bbUserDestructor();
+*/
+
+//==================================================================
+  BBTK_DECLARE_INPUT( In , std::string );
+       BBTK_DECLARE_OUTPUT(IPP, std::vector<double> );
+       BBTK_DECLARE_OUTPUT(IOP, std::vector<double> );
+       BBTK_DECLARE_OUTPUT(PixelSpacing, std::vector<double> );
+  BBTK_PROCESS(Process);
+  void Process();
+       std::vector<double>  IPP;
+       std::vector<double>  IOP;
+       std::vector<double>  PixelSpacing;
+       
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(MetaImageReader_DicomInfo,bbtk::AtomicBlackBox);
+BBTK_NAME("MetaImageReader_DicomInfo");
+BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
+BBTK_DESCRIPTION("Read MHD and MHD_dicominfo");
+BBTK_CATEGORY("");
+       BBTK_INPUT(MetaImageReader_DicomInfo,In,"File name", std::string ,"");
+    BBTK_OUTPUT(MetaImageReader_DicomInfo,IPP,"Image position patient", std::vector<double>,"");
+    BBTK_OUTPUT(MetaImageReader_DicomInfo,IOP,"Image orientation patient", std::vector<double>,"");
+    BBTK_OUTPUT(MetaImageReader_DicomInfo,PixelSpacing,"Spacing ", std::vector<double>,"");
+BBTK_END_DESCRIBE_BLACK_BOX(MetaImageReader_DicomInfo);
+}
+// EO namespace bbTransform3Ddicom
+
+#endif // __bbTransform3DdicomMetaImageReader_DicomInfo_h_INCLUDED__
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageWriter_DicomInfo.cxx b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageWriter_DicomInfo.cxx
new file mode 100644 (file)
index 0000000..c71f287
--- /dev/null
@@ -0,0 +1,76 @@
+#include "bbTransform3DdicomMetaImageWriter_DicomInfo.h"
+#include "bbTransform3DdicomPackage.h"
+namespace bbTransform3Ddicom
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,MetaImageWriter_DicomInfo)
+BBTK_BLACK_BOX_IMPLEMENTATION(MetaImageWriter_DicomInfo,bbtk::AtomicBlackBox);
+void MetaImageWriter_DicomInfo::Process()
+{
+
+       FILE *ff = fopen( bbGetInputFilename().c_str() ,"w+");
+       fprintf(ff, "ImagaPositionPatient %f %f %f", bbGetInputIPP()[0], bbGetInputIPP()[1], bbGetInputIPP()[2]);
+       fprintf(ff, "ImageOrientationPatient %f %f %f %f %f %f", bbGetInputIOP()[0], bbGetInputIOP()[1], bbGetInputIOP()[2], bbGetInputIOP()[3], bbGetInputIOP()[4], bbGetInputIOP()[5]);
+       fprintf(ff, "Spacing %f %f %f", bbGetInputPixelSpacing()[0], bbGetInputPixelSpacing()[1], bbGetInputPixelSpacing()[2]);
+    fclose(ff);  
+}
+
+/*
+void MetaImageWriter_DicomInfo::bbUserConstructor()
+{
+    bbSetInputFilename("");
+}
+void MetaImageWriter_DicomInfo::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+{ 
+}
+void MetaImageWriter_DicomInfo::bbUserDestructor()
+{  
+}
+*/
+
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void MetaImageWriter_DicomInfo::bbUserSetDefaultValues()
+{
+    bbSetInputFilename("");
+}
+
+
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void MetaImageWriter_DicomInfo::bbUserInitializeProcessing()
+{
+
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any 
+
+       
+}
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void MetaImageWriter_DicomInfo::bbUserFinalizeProcessing()
+{
+
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+  
+}
+
+
+
+
+}
+// EO namespace bbTransform3Ddicom
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageWriter_DicomInfo.h b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomMetaImageWriter_DicomInfo.h
new file mode 100644 (file)
index 0000000..1f16344
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef __bbTransform3DdicomMetaImageWriter_DicomInfo_h_INCLUDED__
+#define __bbTransform3DdicomMetaImageWriter_DicomInfo_h_INCLUDED__
+#include "bbTransform3Ddicom_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbTransform3Ddicom
+{
+
+class bbTransform3Ddicom_EXPORT MetaImageWriter_DicomInfo
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(MetaImageWriter_DicomInfo,bbtk::AtomicBlackBox);
+//==================================================================
+/*
+/// User callback called in the box contructor
+virtual void bbUserConstructor();
+/// User callback called in the box copy constructor
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
+/// User callback called in the box destructor
+virtual void bbUserDestructor();
+*/
+//==================================================================
+  BBTK_DECLARE_INPUT( Filename, std::string );
+  BBTK_DECLARE_INPUT( PixelSpacing,std::vector<double> );
+  BBTK_DECLARE_INPUT( IPP,std::vector<double> );
+  BBTK_DECLARE_INPUT( IOP,std::vector<double> );
+//  BTK_DECLARE_OUTPUT(Out,double);
+  BBTK_PROCESS(Process);
+  void Process();
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(MetaImageWriter_DicomInfo,bbtk::AtomicBlackBox);
+BBTK_NAME("MetaImageWriter_DicomInfo");
+BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
+BBTK_DESCRIPTION("Write MHD and MHD_dicominfo");
+BBTK_CATEGORY("");
+BBTK_INPUT(MetaImageWriter_DicomInfo,Filename,"File name",std::string,"");
+BBTK_INPUT(MetaImageWriter_DicomInfo,PixelSpacing,"Pixel Spacing",std::vector<double>,"");
+BBTK_INPUT(MetaImageWriter_DicomInfo,IPP,"Image position patient",std::vector<double>,"");
+BBTK_INPUT(MetaImageWriter_DicomInfo,IOP,"Image orientation patient",std::vector<double>,"");
+//BBTK_OUTPUT(MetaImageWriter_DicomInfo,Out,"First output",double,"");
+BBTK_END_DESCRIBE_BLACK_BOX(MetaImageWriter_DicomInfo);
+}
+// EO namespace bbTransform3Ddicom
+
+#endif // __bbTransform3DdicomMetaImageWriter_DicomInfo_h_INCLUDED__
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomNewDicomImaPosPat.cxx b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomNewDicomImaPosPat.cxx
new file mode 100644 (file)
index 0000000..1a56b02
--- /dev/null
@@ -0,0 +1,99 @@
+#include "bbTransform3DdicomNewDicomImaPosPat.h"
+#include "bbTransform3DdicomPackage.h"
+
+#include "matrixRotation.h"
+
+
+namespace bbTransform3Ddicom
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,NewDicomImaPosPat)
+BBTK_BLACK_BOX_IMPLEMENTATION(NewDicomImaPosPat,bbtk::AtomicBlackBox);
+void NewDicomImaPosPat::Process()
+{
+    printf("NewDicomImaPosPat::Process Start\n");
+       if (!((bbGetInputIPP().size()!=3) ||   (bbGetInputIOP().size()!=6)  ||  (bbGetInputPixelSpacing().size()!=3)  ))
+       {
+               matrixRotation matrixrotation;  
+               matrixrotation.SetOrigin(  bbGetInputIPP()[0]  , bbGetInputIPP()[1] , bbGetInputIPP()[2] );
+               matrixrotation.SetVector1( bbGetInputIOP()[0] , bbGetInputIOP()[1] , bbGetInputIOP()[2] );
+               matrixrotation.SetVector2(  bbGetInputIOP()[3] , bbGetInputIOP()[4] , bbGetInputIOP()[5] );
+        printf("EED NewDicomImaPosPat::Process spc %f %f %f \n",  bbGetInputPixelSpacing()[0] ,  bbGetInputPixelSpacing()[1],  bbGetInputPixelSpacing()[2] );
+        matrixrotation.SetSpacing(  bbGetInputPixelSpacing()[0] ,  bbGetInputPixelSpacing()[1],  bbGetInputPixelSpacing()[2]);
+               vtkTransform *transform = vtkTransform::New();
+               matrixrotation.GetTransformation(transform);
+        bbSetOutputTransform( transform );
+
+        if ( (bbGetInputPoint().size()==3) )
+        {
+            double ipp[3], newIPP[3];
+            ipp[0] = bbGetInputPoint()[0];
+            ipp[1] = bbGetInputPoint()[1];
+            ipp[2] = bbGetInputPoint()[2];
+            transform->Update();
+            transform->TransformPoint(ipp, newIPP);
+            std::vector<double> vecOutIPP;
+            vecOutIPP.push_back( newIPP[0] );
+            vecOutIPP.push_back( newIPP[1] );
+            vecOutIPP.push_back( newIPP[2] );
+            bbSetOutputOut( vecOutIPP );
+        } else {
+            printf("EED NewDicomImaPosPat::Process  empty vector with input Point\n");
+        }
+       } else {
+               printf("EED Warnning! NewDicomImaPosPat::Process Size inputs are not correct. IPP(3)=%lu  IOP(6)=%lu  Spacing(3)=%lu  Point(3)=%lu\n", bbGetInputIPP().size() , bbGetInputIOP().size() , bbGetInputPixelSpacing().size() , bbGetInputPoint().size() );
+       }
+    printf("NewDicomImaPosPat::Process End\n");
+}
+
+/*     
+void NewDicomImaPosPat::bbUserConstructor()
+{
+
+}
+       
+void NewDicomImaPosPat::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+{
+}
+       
+void NewDicomImaPosPat::bbUserDestructor()
+{
+}
+*/
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void NewDicomImaPosPat::bbUserSetDefaultValues()
+{
+}
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void NewDicomImaPosPat::bbUserInitializeProcessing()
+{
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any 
+}
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void NewDicomImaPosPat::bbUserFinalizeProcessing()
+{
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+}
+
+       
+}
+// EO namespace bbTransform3Ddicom
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomNewDicomImaPosPat.h b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomNewDicomImaPosPat.h
new file mode 100644 (file)
index 0000000..2efe524
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef __bbTransform3DdicomNewDicomImaPosPat_h_INCLUDED__
+#define __bbTransform3DdicomNewDicomImaPosPat_h_INCLUDED__
+#include "bbTransform3Ddicom_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+#include "vtkLinearTransform.h"
+
+namespace bbTransform3Ddicom
+{
+
+class bbTransform3Ddicom_EXPORT NewDicomImaPosPat
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(NewDicomImaPosPat,bbtk::AtomicBlackBox);
+
+/*
+//==================================================================
+/// User callback called in the box contructor
+virtual void bbUserConstructor();
+/// User callback called in the box copy constructor
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
+/// User callback called in the box destructor
+virtual void bbUserDestructor();
+//==================================================================
+*/
+
+       BBTK_DECLARE_INPUT( Point,std::vector<double> );
+       BBTK_DECLARE_INPUT( IPP,std::vector<double> );
+       BBTK_DECLARE_INPUT( IOP,std::vector<double> );
+       BBTK_DECLARE_INPUT( PixelSpacing,std::vector<double> );
+       BBTK_DECLARE_OUTPUT( Out, std::vector<double> );
+       BBTK_DECLARE_OUTPUT( Transform, vtkLinearTransform* );
+       BBTK_PROCESS(Process);
+  void Process();
+
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(NewDicomImaPosPat,bbtk::AtomicBlackBox);
+  BBTK_NAME("NewDicomImaPosPat");
+  BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
+  BBTK_DESCRIPTION("New Dicom ImagePositionPatient");
+  BBTK_CATEGORY("");
+       
+  BBTK_INPUT(NewDicomImaPosPat,Point,"point to be transform", std::vector<double> ,"");
+  BBTK_INPUT(NewDicomImaPosPat,IPP,"Image Position Patient",std::vector<double>,"");
+  BBTK_INPUT(NewDicomImaPosPat,IOP,"Image Orientation Patient",std::vector<double>,"");
+  BBTK_INPUT(NewDicomImaPosPat,PixelSpacing,"Pixel Spacing",std::vector<double>,"");
+
+  BBTK_OUTPUT(NewDicomImaPosPat,Out , "New Image Position Patient" , std::vector<double> , "");
+  BBTK_OUTPUT(NewDicomImaPosPat,Transform,"Linear Transform (4x4 homogeneous)",vtkLinearTransform*,"");
+       
+BBTK_END_DESCRIBE_BLACK_BOX(NewDicomImaPosPat);
+}
+// EO namespace bbTransform3Ddicom
+
+#endif // __bbTransform3DdicomNewDicomImaPosPat_h_INCLUDED__
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomRotateDICOM.cxx b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomRotateDICOM.cxx
new file mode 100644 (file)
index 0000000..6ddb07d
--- /dev/null
@@ -0,0 +1,182 @@
+#include "bbTransform3DdicomRotateDICOM.h"\r
+#include "bbTransform3DdicomPackage.h"\r
+\r
+#include <vtkMatrix4x4.h>\r
+#include <vtkTransform.h>\r
+\r
+#include "matrixRotation.h"\r
+\r
+namespace bbTransform3Ddicom\r
+{\r
+\r
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,RotateDICOM)\r
+BBTK_BLACK_BOX_IMPLEMENTATION(RotateDICOM,bbtk::AtomicBlackBox);\r
+void RotateDICOM::Process()\r
+{\r
+       vtkTransform* transform1 = vtkTransform::New();\r
+       matrixRotation matrot1;\r
+        if (bbGetInputSpacing1().size()==3)\r
+        {\r
+            matrot1.SetSpacing( bbGetInputSpacing1()[0],bbGetInputSpacing1()[1] ,bbGetInputSpacing1()[2]  );\r
+        }\r
+        if (bbGetInputPosition1().size()==3)\r
+        {\r
+            matrot1.SetOrigin( bbGetInputPosition1()[0],bbGetInputPosition1()[1] ,bbGetInputPosition1()[2]  );\r
+        }\r
+        if ((bbGetInputOrientation1Vec1().size()==3) && (bbGetInputOrientation1Vec2().size()==3) )\r
+        {\r
+            matrot1.SetVector1( bbGetInputOrientation1Vec1()[0],bbGetInputOrientation1Vec1()[1] ,bbGetInputOrientation1Vec1()[2]  );\r
+            matrot1.SetVector2( bbGetInputOrientation1Vec2()[0],bbGetInputOrientation1Vec2()[1] ,bbGetInputOrientation1Vec2()[2]  );\r
+        }\r
+        if ((bbGetInputOrientation1Vec12().size()==6) )\r
+        {\r
+            matrot1.SetVector1( bbGetInputOrientation1Vec12()[0],bbGetInputOrientation1Vec12()[1] ,bbGetInputOrientation1Vec12()[2]  );\r
+            matrot1.SetVector2( bbGetInputOrientation1Vec12()[3],bbGetInputOrientation1Vec12()[4] ,bbGetInputOrientation1Vec12()[5]  );\r
+        }\r
+        matrot1.GetTransformation(transform1);\r
+    \r
+        matrixRotation matrot2;\r
+        if (bbGetInputSpacing2().size()==3)\r
+        {\r
+            matrot2.SetSpacing( bbGetInputSpacing2()[0],bbGetInputSpacing2()[1] ,bbGetInputSpacing2()[2]  );\r
+        }\r
+        if (bbGetInputPosition2().size()==3)\r
+        {\r
+            matrot2.SetOrigin( bbGetInputPosition2()[0],bbGetInputPosition2()[1] ,bbGetInputPosition2()[2]  );\r
+        }\r
+        if ((bbGetInputOrientation2Vec1().size()==3) && (bbGetInputOrientation2Vec2().size()==3) )\r
+        {\r
+            matrot2.SetVector1( bbGetInputOrientation2Vec1()[0],bbGetInputOrientation2Vec1()[1] ,bbGetInputOrientation2Vec1()[2]  );\r
+            matrot2.SetVector2( bbGetInputOrientation2Vec2()[0],bbGetInputOrientation2Vec2()[1] ,bbGetInputOrientation2Vec2()[2]  );\r
+        }\r
+        if ((bbGetInputOrientation2Vec12().size()==6) )\r
+        {\r
+            matrot2.SetVector1( bbGetInputOrientation2Vec12()[0],bbGetInputOrientation2Vec12()[1] ,bbGetInputOrientation2Vec12()[2]  );\r
+            matrot2.SetVector2( bbGetInputOrientation2Vec12()[3],bbGetInputOrientation2Vec12()[4] ,bbGetInputOrientation2Vec12()[5]  );\r
+        }\r
+       vtkTransform* transform2 = (vtkTransform*)bbGetOutputOut();\r
+       transform2->PostMultiply ();\r
+       matrot2.GetTransformation(transform2);\r
+       vtkMatrix4x4 *invers1 =  vtkMatrix4x4::New();\r
+       transform1->GetInverse(invers1);\r
+       transform2->Concatenate(invers1);\r
+    bbSetOutputOut( transform2 );\r
+       transform1->Delete();\r
+}\r
+\r
+/*\r
+void RotateDICOM::bbUserConstructor()\r
+{\r
+      std::vector<double> spacing;\r
+     spacing.push_back(1.0);\r
+     spacing.push_back(1.0);\r
+     spacing.push_back(1.0);\r
+     bbSetInputSpacing1(spacing);\r
+     bbSetInputSpacing2(spacing);\r
+\r
+     std::vector<double> position;\r
+     position.push_back(0.0);\r
+     position.push_back(0.0);\r
+     position.push_back(0.0);\r
+     bbSetInputPosition1(position);\r
+     bbSetInputPosition2(position);\r
+\r
+     std::vector<double> orientationVec1;\r
+     orientationVec1.push_back(1.0);\r
+     orientationVec1.push_back(0.0);\r
+     orientationVec1.push_back(0.0);\r
+     bbSetInputOrientation1Vec1(orientationVec1);\r
+     bbSetInputOrientation2Vec1(orientationVec1);\r
+\r
+     std::vector<double> orientationVec2;\r
+     orientationVec2.push_back(0.0);\r
+     orientationVec2.push_back(1.0);\r
+     orientationVec2.push_back(0.0);\r
+     bbSetInputOrientation1Vec2(orientationVec2);\r
+     bbSetInputOrientation2Vec2(orientationVec2);\r
+\r
+        bbSetOutputOut( vtkTransform::New() );\r
+  \r
+}\r
+\r
+void RotateDICOM::bbUserCopyConstructor(bbtk::BlackBox::Pointer)\r
+{\r
+}\r
+\r
+void RotateDICOM::bbUserDestructor()\r
+{\r
+       vtkTransform* transform = (vtkTransform*)bbGetOutputOut();\r
+       if (transform!=NULL)\r
+       {\r
+               transform->Delete();\r
+       } \r
+}\r
+*/\r
+\r
+\r
+//===== \r
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)\r
+//===== \r
+void RotateDICOM::bbUserSetDefaultValues()\r
+{\r
+      std::vector<double> spacing;\r
+     spacing.push_back(1.0);\r
+     spacing.push_back(1.0);\r
+     spacing.push_back(1.0);\r
+     bbSetInputSpacing1(spacing);\r
+     bbSetInputSpacing2(spacing);\r
+\r
+     std::vector<double> position;\r
+     position.push_back(0.0);\r
+     position.push_back(0.0);\r
+     position.push_back(0.0);\r
+     bbSetInputPosition1(position);\r
+     bbSetInputPosition2(position);\r
+\r
+     std::vector<double> orientationVec1;\r
+     orientationVec1.push_back(1.0);\r
+     orientationVec1.push_back(0.0);\r
+     orientationVec1.push_back(0.0);\r
+     bbSetInputOrientation1Vec1(orientationVec1);\r
+     bbSetInputOrientation2Vec1(orientationVec1);\r
+\r
+     std::vector<double> orientationVec2;\r
+     orientationVec2.push_back(0.0);\r
+     orientationVec2.push_back(1.0);\r
+     orientationVec2.push_back(0.0);\r
+     bbSetInputOrientation1Vec2(orientationVec2);\r
+     bbSetInputOrientation2Vec2(orientationVec2);\r
+        bbSetOutputOut( vtkTransform::New() );\r
+\r
+}\r
+\r
+//===== \r
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)\r
+//===== \r
+void RotateDICOM::bbUserInitializeProcessing()\r
+{\r
+//  THE INITIALIZATION METHOD BODY :\r
+//    Here does nothing \r
+//    but this is where you should allocate the internal/output pointers \r
+//    if any\r
+}\r
+\r
+//===== \r
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)\r
+//===== \r
+void RotateDICOM::bbUserFinalizeProcessing()\r
+{\r
+//  THE FINALIZATION METHOD BODY :\r
+//    Here does nothing \r
+//    but this is where you should desallocate the internal/output pointers \r
+//    if any\r
+       vtkTransform* transform = (vtkTransform*)bbGetOutputOut();\r
+       if (transform!=NULL)\r
+       {\r
+               transform->Delete();\r
+       }\r
+}\r
+\r
+} // EO namespace bbTransform3Ddicom\r
+\r
+\r
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomRotateDICOM.h b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomRotateDICOM.h
new file mode 100644 (file)
index 0000000..cf6a844
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef __bbTransform3DdicomRotateDICOM_h_INCLUDED__\r
+#define __bbTransform3DdicomRotateDICOM_h_INCLUDED__\r
+#include "bbtkAtomicBlackBox.h"\r
+#include "iostream"\r
+\r
+#include <vtkLinearTransform.h>\r
+\r
+\r
+namespace bbTransform3Ddicom\r
+{\r
+\r
+class /*BBTK_EXPORT*/ RotateDICOM\r
+ : \r
+   public bbtk::AtomicBlackBox\r
+{\r
+  BBTK_BLACK_BOX_INTERFACE(RotateDICOM,bbtk::AtomicBlackBox);\r
+\r
+/*\r
+//==================================================================\r
+/// User callback called in the box contructor\r
+virtual void bbUserConstructor();\r
+/// User callback called in the box copy constructor\r
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);\r
+/// User callback called in the box destructor\r
+virtual void bbUserDestructor();\r
+//==================================================================\r
+*/\r
+\r
+  BBTK_DECLARE_INPUT(Spacing1,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Spacing2,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Position1,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Position2,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation1Vec12,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation1Vec1,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation1Vec2,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation2Vec12,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation2Vec1,std::vector<double> );\r
+  BBTK_DECLARE_INPUT(Orientation2Vec2,std::vector<double> );\r
+  BBTK_DECLARE_OUTPUT(Out, vtkLinearTransform * );\r
+  BBTK_PROCESS(Process);\r
+  void Process();\r
+};\r
+\r
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(RotateDICOM,bbtk::AtomicBlackBox);\r
+BBTK_NAME("RotateDICOM");\r
+BBTK_AUTHOR("InfoTeam CREATIS-LRMN");\r
+BBTK_DESCRIPTION("Transform 4x4 matix");\r
+BBTK_CATEGORY("filter");\r
+\r
+BBTK_INPUT(RotateDICOM,Spacing1,"Spacing image 1",std::vector<double>,"");\r
+BBTK_INPUT(RotateDICOM,Spacing2,"Spacing image 2",std::vector<double>,"");\r
+BBTK_INPUT(RotateDICOM,Position1,"Position image 1",std::vector<double>,"");\r
+BBTK_INPUT(RotateDICOM,Position2,"Position image 2",std::vector<double>,"");\r
+BBTK_INPUT(RotateDICOM,Orientation1Vec1,"Orientation image 1 with vec 1",std::vector<double>,"");\r
+BBTK_INPUT(RotateDICOM,Orientation1Vec12,"Orientation image 1 with vec 1 and 2 [x1 y1 z1 x2 y2 z2]",std::vector<double>,"");\r
+BBTK_INPUT(RotateDICOM,Orientation1Vec2,"Orientation image 1 with vec 2",std::vector<double>,"");\r
+BBTK_INPUT(RotateDICOM,Orientation2Vec12,"Orientation image 2 with vec 1 and 2 [x1 y1 z1 x2 y2 z2]",std::vector<double>,"");\r
+BBTK_INPUT(RotateDICOM,Orientation2Vec1,"Orientation image 2 with vec 1",std::vector<double>,"");\r
+BBTK_INPUT(RotateDICOM,Orientation2Vec2,"Orientation image 2 with vec 2",std::vector<double>,"");\r
+BBTK_OUTPUT(RotateDICOM,Out,"Linear Transform (4x4 homogeneous)",vtkLinearTransform*,"");\r
+\r
+\r
+\r
+BBTK_END_DESCRIBE_BLACK_BOX(RotateDICOM);\r
+}\r
+// EO namespace bbTransform3Ddicom\r
+\r
+#endif // __bbTransform3DdicomRotateDICOM_h_INCLUDED__\r
+\r
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomTransformSimple.cxx b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomTransformSimple.cxx
new file mode 100644 (file)
index 0000000..4367d9e
--- /dev/null
@@ -0,0 +1,90 @@
+#include "bbTransform3DdicomTransformSimple.h"
+#include "bbTransform3DdicomPackage.h"
+
+
+
+namespace bbTransform3Ddicom
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,TransformSimple)
+BBTK_BLACK_BOX_IMPLEMENTATION(TransformSimple,bbtk::AtomicBlackBox);
+void TransformSimple::Process()
+{
+       vtkImageData *resultImage = NULL;
+       vtkTransform *transform = NULL;
+       if ( bbGetInputInImage()!=NULL )
+       {
+               creaimage->SetvtkImageData( bbGetInputInImage() );
+               creaimage->SetImagePositionPatient( bbGetInputIPP()[0] , bbGetInputIPP()[1] , bbGetInputIPP()[2] );
+               creaimage->SetImageSpacing( bbGetInputPixelSpacing()[0] , bbGetInputPixelSpacing()[1] , bbGetInputPixelSpacing()[2]  );
+               creaimage->SetImageOrientation(  bbGetInputIOP()[0] , bbGetInputIOP()[1] , bbGetInputIOP()[2] , 
+                                                                               bbGetInputIOP()[3] , bbGetInputIOP()[4] , bbGetInputIOP()[5]  );
+               creaimage->Update();
+               transform = creaimage->GetvtkTransform(  );
+               resultImage = creaimage->GetImage() ; 
+       }
+       bbSetOutputOut( transform ); 
+       bbSetOutputOutImage( resultImage ); 
+}
+
+/*
+void TransformSimple::bbUserConstructor()
+{  
+       creaimage = new CreaImage();
+       bbSetInputInImage(NULL);
+}
+
+void TransformSimple::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+{  
+}
+
+void TransformSimple::bbUserDestructor()
+{
+//     transform->Delete();
+}
+*/
+
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void TransformSimple::bbUserSetDefaultValues()
+{
+       creaimage = new CreaImage();
+       bbSetInputInImage(NULL); 
+}
+
+
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void TransformSimple::bbUserInitializeProcessing()
+{
+
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any 
+
+}
+
+//===== 
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//===== 
+void TransformSimple::bbUserFinalizeProcessing()
+{
+
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
+
+}
+
+
+}
+// EO namespace bbTransform3Ddicom
+
+
diff --git a/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomTransformSimple.h b/bbtk_Transform3Ddicom_PKG/src/bbTransform3DdicomTransformSimple.h
new file mode 100644 (file)
index 0000000..c710531
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __bbTransform3DdicomTransformSimple_h_INCLUDED__
+#define __bbTransform3DdicomTransformSimple_h_INCLUDED__
+#include "bbTransform3Ddicom_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkLinearTransform.h>
+#include <vtkTransform.h>
+#include <vtkImageData.h>
+#include "CreaImage.h"
+
+
+namespace bbTransform3Ddicom
+{
+
+class bbTransform3Ddicom_EXPORT TransformSimple
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_BLACK_BOX_INTERFACE(TransformSimple,bbtk::AtomicBlackBox);
+/*
+//==================================================================
+/// User callback called in the box contructor
+virtual void bbUserConstructor();
+/// User callback called in the box copy constructor
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
+/// User callback called in the box destructor
+virtual void bbUserDestructor();
+//==================================================================
+*/
+
+  BBTK_DECLARE_INPUT( InImage, vtkImageData* );
+  BBTK_DECLARE_INPUT( PixelSpacing,std::vector<double> );
+  BBTK_DECLARE_INPUT( IPP,std::vector<double> );
+  BBTK_DECLARE_INPUT( IOP,std::vector<double> );
+  BBTK_DECLARE_OUTPUT( Out, vtkLinearTransform* );
+  BBTK_DECLARE_OUTPUT( OutImage, vtkImageData* );
+  BBTK_PROCESS(Process);
+  void Process();
+
+  CreaImage *creaimage;
+
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(TransformSimple,bbtk::AtomicBlackBox);
+  BBTK_NAME("TransformSimple"); 
+  BBTK_AUTHOR("InfoTeam CREATIS-LRMN");
+  BBTK_DESCRIPTION("Transofrm matrix to ConsoleWindow");
+  BBTK_CATEGORY("");
+
+  BBTK_INPUT(TransformSimple,InImage,"Input image ", vtkImageData* ,"");
+  BBTK_INPUT(TransformSimple,PixelSpacing,"Spacing image ",std::vector<double>,"");
+  BBTK_INPUT(TransformSimple,IPP,"Position image ",std::vector<double>,"");
+  BBTK_INPUT(TransformSimple,IOP,"Orientation image  with vec 1",std::vector<double>,"");
+  
+  BBTK_OUTPUT(TransformSimple,Out,"Linear Transform (4x4 homogeneous)",vtkLinearTransform*,"");
+  BBTK_OUTPUT(TransformSimple,OutImage,"Output image", vtkImageData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(TransformSimple);
+}
+// EO namespace bbTransform3Ddicom
+
+#endif // __bbTransform3DdicomTransformSimple_h_INCLUDED__
+
diff --git a/lib/.DS_Store b/lib/.DS_Store
new file mode 100644 (file)
index 0000000..dcf6963
Binary files /dev/null and b/lib/.DS_Store differ
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..18f0238
--- /dev/null
@@ -0,0 +1,31 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Santé)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */ 
+
+# USER! : Add a ADD_SUBDIRECTORY command for each one of your libraries
+# -----
+
+## ADD_SUBDIRECTORY(mySampleLib)
+
+ADD_SUBDIRECTORY(TransformDicom3D)
diff --git a/lib/TransformDicom3D/CMakeLists.txt b/lib/TransformDicom3D/CMakeLists.txt
new file mode 100644 (file)
index 0000000..c2f2e6b
--- /dev/null
@@ -0,0 +1,119 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */ 
+
+#----------------------------------------------------------------------------
+# USER! : SET THE NAME OF YOUR LIBRARY
+# (Replace 'MyLib' by your own library name)
+
+#############################
+SET ( LIBRARY_NAME   TransformDicom3D  )
+#############################
+
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# CREATES A USER OPTION IN CMAKE
+OPTION ( BUILD_${LIBRARY_NAME}  "Build ${LIBRARY_NAME} library ?" ON)
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+IF ( BUILD_${LIBRARY_NAME} )
+#----------------------------------------------------------------------------
+
+  #----------------------------------------------------------------------------
+  # BUILD LIBRARY
+  #----------------------------------------------------------------------------
+
+  #----------------------------------------------------------------------------
+  # LIBRARY HEADERS (TO BE INSTALLED)
+  # EITHER LIST ALL .h, *.txx IN CURRENT DIR USING NEXT LINE:
+
+  FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h" "*.txx")
+  
+  # OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND
+  #  SET ( ${LIBRARY_NAME}_HEADERS
+  #
+  #      )
+  #----------------------------------------------------------------------------
+
+  #----------------------------------------------------------------------------
+  # LIBRARY SOURCES (TO BE COMPILED)
+  # EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
+
+  FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc)
+
+  # OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
+  #  SET ( ${LIBRARY_NAME}_SOURCES 
+  #   
+  #      )
+  #----------------------------------------------------------------------------
+
+  INCLUDE_DIRECTORIES (
+  
+  # USER! : Add here the directories holding the extra .h files you need
+  # e.g.
+  # ../mySampleLib
+   
+  )
+
+  #----------------------------------------------------------------------------
+  # LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH)
+  #
+  # USER! : Uncomment the Libraries you need
+  #
+  SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
+  #    ${crea_LIBRARIES}
+  #    ${WXWIDGETS_LIBRARIES}
+  #    ${KWWidgets_LIBRARIES}
+      ${VTK_LIBRARIES}
+  #    ${ITK_LIBRARIES}
+  #    ${GDCM_LIBRARIES}
+  #    ${BOOST_LIBRARIES}
+
+  # If this library must link against other libraries 
+  # USER! : Add here any extra Library you need
+
+      )
+  #----------------------------------------------------------------------------
+
+  #----------------------------------------------------------------------------
+  # MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL
+
+  # USER! : The default is to create a Dynamic Library.
+  # if you need to create a static library
+  # comment out the following line :
+
+  CREA_ADD_LIBRARY( ${LIBRARY_NAME} )
+
+  # and uncomment the 2 lines hereafter:
+
+  # ADD_LIBRARY(${LIBRARY_NAME} STATIC  ${${LIBRARY_NAME}_SOURCES})
+  # TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES} )
+
+  #
+  #----------------------------------------------------------------------------
+
+  #---------------------------------------------------------------------------
+ENDIF ( BUILD_${LIBRARY_NAME} )
diff --git a/lib/TransformDicom3D/CreaImage.cxx b/lib/TransformDicom3D/CreaImage.cxx
new file mode 100644 (file)
index 0000000..d4fc742
--- /dev/null
@@ -0,0 +1,121 @@
+#include"Math.h"
+#include"CreaImage.h"
+
+//-------------------------------------------------------------------------------------------
+CreaImage::CreaImage()
+{
+       orgImage                        = NULL;
+       matrixrotation          = new matrixRotation();
+       transform                       = vtkTransform::New();  
+}
+
+//-------------------------------------------------------------------------------------------
+CreaImage::~CreaImage()
+{
+       delete matrixrotation;
+       transform->Delete();
+}
+
+//-------------------------------------------------------------------------------------------
+void CreaImage::SetvtkImageData(vtkImageData *image)
+{
+       if (image!=NULL)
+       {
+               if (orgImage!=NULL)
+               {
+               //      orgImage->Delete();
+               }
+               orgImage = vtkImageData::New();
+               orgImage->ShallowCopy(image);
+               orgImage = image;
+//             orgImage->SetSpacing(1,1,1);
+       } else {
+               orgImage = NULL;
+       }
+}
+
+//-------------------------------------------------------------------------------------------
+void CreaImage::SetImagePositionPatient(double x,double y,double z)
+{
+       matrixrotation->SetOrigin(x,y,z);
+}
+
+//-------------------------------------------------------------------------------------------
+void CreaImage::SetImageSpacing(double sx, double sy, double sz)
+{
+       matrixrotation->SetSpacing(sx,sy,sz);
+}
+
+//-------------------------------------------------------------------------------------------
+void CreaImage::SetImageOrientation(double v1x,double v1y,double v1z, double v2x,double v2y,double v2z)
+{
+       matrixrotation->SetVector1( v1x , v1y , v1z );
+       matrixrotation->SetVector2( v2x , v2y , v2z );
+}
+
+//-------------------------------------------------------------------------------------------
+void CreaImage::Update()
+{
+       matrixrotation->GetTransformation(transform);   
+}
+
+//-------------------------------------------------------------------------------------------
+vtkImageData *CreaImage::GetImage()
+{
+       return orgImage;
+}
+
+//-------------------------------------------------------------------------------------------
+vtkTransform *CreaImage::GetvtkTransform()
+{
+       return transform;
+}
+
+//-------------------------------------------------------------------------------------------
+double CreaImage::GetVoxelInIRMUniverse(double x,double y, double z)
+{
+       double result=0;
+       double pIn[3];
+       double pOut[3];
+       
+       pIn[0]=x;
+       pIn[1]=y;
+       pIn[2]=z;
+
+    transform->TransformPoint( pIn , pOut );
+
+       int ext[6];
+       orgImage->GetExtent(ext);
+       int px=round(pOut[0]);
+       int py=round(pOut[1]);
+       int pz=round(pOut[2]);
+       if ( (px>=ext[0]) && (px<ext[1]) &&  
+                (py>=ext[2]) && (py<ext[3]) && 
+                (pz>=ext[4]) && (pz<ext[5])  ) 
+       {
+               unsigned short *p = (unsigned short*) orgImage->GetScalarPointer( px,py,pz );
+               result = *p;
+       }
+       return result;
+       
+}
+
+//-------------------------------------------------------------------------------------------
+double CreaImage::GetVoxelInImageUniverse(double x,double y, double z)
+{
+       double result=0;
+       int ext[6];
+       orgImage->GetExtent(ext);
+       int px=round(x);
+       int py=round(y);
+       int pz=round(z);
+       if ( (px>=ext[0]) && (px<ext[1]) &&  
+                (py>=ext[2]) && (py<ext[3]) && 
+                (pz>=ext[4]) && (pz<ext[5])  ) 
+       {
+               unsigned short *p = (unsigned short*) orgImage->GetScalarPointer( px,py,pz );
+               result = *p;
+       }
+       return result;
+}
+
diff --git a/lib/TransformDicom3D/CreaImage.h b/lib/TransformDicom3D/CreaImage.h
new file mode 100644 (file)
index 0000000..aa4e33e
--- /dev/null
@@ -0,0 +1,33 @@
+\r
+#ifndef __CREA__IMAGE_H_INCLUDED__\r
+#define __CREA__IMAGE_H_INCLUDED__\r
+\r
+#include "vtkTransform.h"\r
+#include "vtkImageData.h"
+#include "matrixRotation.h"
+\r
+class CreaImage\r
+{\r
+public:\r
+       CreaImage();
+       ~CreaImage();\r
+       void SetvtkImageData(vtkImageData *image);
+       void SetImagePositionPatient(double x,double y,double z);\r
+       void SetImageSpacing(double sx, double sy, double sz);\r
+       void SetImageOrientation(double v1x,double v1y,double v1z, double v2x,double v2y,double v2z);\r
+       void Update();
+       vtkImageData *GetImage();
+       vtkTransform *GetvtkTransform();
+       double GetVoxelInIRMUniverse(double x,double y, double z);              
+       double GetVoxelInImageUniverse(double x,double y, double z);            
+\r
+private:
+  vtkImageData                 *orgImage;
+  matrixRotation       *matrixrotation;
+  vtkTransform                 *transform;
+\r
+protected:\r
+\r
+}; \r
+\r
+#endif // __CREA__IMAGE_H_INCLUDED__\r
diff --git a/lib/TransformDicom3D/CreaImageComplement.cxx b/lib/TransformDicom3D/CreaImageComplement.cxx
new file mode 100644 (file)
index 0000000..b149441
--- /dev/null
@@ -0,0 +1,100 @@
+#include"Math.h"
+#include"CreaImage.h"
+#include"CreaImageComplement.h"
+
+//-------------------------------------------------------------------------------------------
+CreaImageComplement::CreaImageComplement()
+{
+       basecreaimage                                   = NULL;
+       complementcreaimage                             = NULL;
+       transformToComplementCreaImage  = vtkTransform::New();
+       transformToComplementCreaImage->Identity();
+}
+
+//-------------------------------------------------------------------------------------------
+CreaImageComplement::~CreaImageComplement()
+{
+       transformToComplementCreaImage->Delete();
+}
+
+//-------------------------------------------------------------------------------------------
+void CreaImageComplement::SetBaseCreaImage(CreaImage* creaimage)
+{
+       basecreaimage = creaimage;
+}
+
+//-------------------------------------------------------------------------------------------
+void CreaImageComplement::SetComplementCreaImage(CreaImage* creaimage)
+{
+       complementcreaimage = creaimage;
+}
+
+//-------------------------------------------------------------------------------------------
+vtkTransform *CreaImageComplement::GetvtkTransformToComplementImage()
+{
+       return transformToComplementCreaImage;
+}
+
+
+//-------------------------------------------------------------------------------------------
+double CreaImageComplement::GetVoxelFromComplementImage_In_BaseCreaImage_Universe(double x,double y, double z)
+{
+       double result = 0;
+       double pIn[3];
+       double pOut[3];
+       
+       pIn[0]=x;
+       pIn[1]=y;
+       pIn[2]=z;
+       
+    transformToComplementCreaImage->TransformPoint( pIn , pOut );
+       int ext[6];
+       complementcreaimage->GetImage()->GetExtent(ext);
+       int px = round(pOut[0]);
+       int py = round(pOut[1]);
+       int pz = round(pOut[2]);
+       if ( (px>=ext[0]) && (px<=ext[1]) &&  
+                (py>=ext[2]) && (py<=ext[3]) && 
+                (pz>=ext[4]) && (pz<=ext[5])  ) 
+       {
+               unsigned short *p = (unsigned short*) complementcreaimage->GetImage()->GetScalarPointer( px , py ,pz );
+               result = (double)*p;
+       }
+       return result;
+}
+
+
+//-------------------------------------------------------------------------------------------
+void CreaImageComplement::Update()
+{
+       if (basecreaimage!=NULL)
+       {
+               vtkTransform *transform;
+               vtkMatrix4x4 *inversTransformComplementImage    = vtkMatrix4x4::New();  
+               vtkTransform* tmpTransformComplementCreaImage           = vtkTransform::New();
+
+               basecreaimage                                   -> Update();    
+               complementcreaimage                             -> Update();
+               
+               transform = basecreaimage               -> GetvtkTransform();
+               tmpTransformComplementCreaImage =  complementcreaimage  -> GetvtkTransform();
+
+               tmpTransformComplementCreaImage -> GetInverse( inversTransformComplementImage );        
+
+               transformToComplementCreaImage  -> PostMultiply();
+               transformToComplementCreaImage  -> Identity();
+
+               transformToComplementCreaImage  -> Concatenate( transform );
+               transformToComplementCreaImage  -> Concatenate( inversTransformComplementImage );
+               transformToComplementCreaImage  -> Update();
+
+               inversTransformComplementImage  -> Delete();
+               tmpTransformComplementCreaImage         -> Delete();
+               
+       } else {
+               transformToComplementCreaImage->Identity();
+       } // if
+       
+}
+
+
diff --git a/lib/TransformDicom3D/CreaImageComplement.h b/lib/TransformDicom3D/CreaImageComplement.h
new file mode 100644 (file)
index 0000000..68f6353
--- /dev/null
@@ -0,0 +1,31 @@
+\r
+#ifndef __CREA_COMPLEMENT_IMAGE_H_INCLUDED__\r
+#define __CREA_COMPLEMENT_IMAGE_H_INCLUDED__\r
+\r
+#include "vtkTransform.h"\r
+#include "vtkImageData.h"
+
+#include "CreaImage.h"
+\r
+class CreaImageComplement\r
+{\r
+public:\r
+       CreaImageComplement();
+       ~CreaImageComplement();\r
+
+       void                    SetBaseCreaImage(CreaImage* creaimage);
+       void                    SetComplementCreaImage(CreaImage* creaimage);
+       vtkTransform*   GetvtkTransformToComplementImage();
+       double                  GetVoxelFromComplementImage_In_BaseCreaImage_Universe(double x,double y, double z);
+       void                    Update();
+\r
+private:
+  CreaImage            *basecreaimage;
+  CreaImage            *complementcreaimage;
+  vtkTransform         *transformToComplementCreaImage;
+\r
+protected:\r
+\r
+}; \r
+\r
+#endif // __CREA_COMPLEMENT_IMAGE_H_INCLUDED__\r
diff --git a/lib/TransformDicom3D/creaSystem.h b/lib/TransformDicom3D/creaSystem.h
new file mode 100755 (executable)
index 0000000..b570c5a
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Santé)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ 
+*/ 
+
+#ifndef _$PROJECT_NAME$SYSTEM_H_
+#define _$PROJECT_NAME$SYSTEM_H_
+
+
+// Windoze related troubles (as usual)
+
+//-----------------------------------------------------------------------------
+
+#if defined(_WIN32)
+  #ifdef $PROJECT_NAME$_EXPORT_SYMBOLS
+    #define $PROJECT_NAME$_EXPORT __declspec( dllexport )
+#else
+    #define $PROJECT_NAME$_EXPORT __declspec( dllimport )
+  #endif
+  #define $PROJECT_NAME$_CDECL __cdecl
+#else
+  #define $PROJECT_NAME$_EXPORT
+  #define $PROJECT_NAME$_CDECL
+#endif // defined(_WIN32)
+
+#ifdef __BORLANDC__
+  #include <mem.h>
+#endif
+
+#endif
diff --git a/lib/TransformDicom3D/creaSystem.h.in b/lib/TransformDicom3D/creaSystem.h.in
new file mode 100755 (executable)
index 0000000..782097d
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Santé)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */ 
+
+#ifndef _$PROJECT_NAME$SYSTEM_H_
+#define _$PROJECT_NAME$SYSTEM_H_
+
+
+// Windoze related troubles (as usual)
+
+//-----------------------------------------------------------------------------
+
+#if defined(_WIN32)
+  #ifdef $PROJECT_NAME$_EXPORT_SYMBOLS
+    #define $PROJECT_NAME$_EXPORT __declspec( dllexport )
+#else
+    #define $PROJECT_NAME$_EXPORT __declspec( dllimport )
+  #endif
+  #define $PROJECT_NAME$_CDECL __cdecl
+#else
+  #define $PROJECT_NAME$_EXPORT
+  #define $PROJECT_NAME$_CDECL
+#endif // defined(_WIN32)
+
+#ifdef __BORLANDC__
+  #include <mem.h>
+#endif
+
+#endif
diff --git a/lib/TransformDicom3D/matrixRotation.cxx b/lib/TransformDicom3D/matrixRotation.cxx
new file mode 100644 (file)
index 0000000..40b1f52
--- /dev/null
@@ -0,0 +1,108 @@
+#include"Math.h"
+#include"matrixRotation.h"
+
+//-------------------------------------------------------------------------------------------
+matrixRotation::matrixRotation()
+{
+       spcX = 1;
+       spcY = 1;
+       spcZ = 1;
+        
+       orgX = 0;
+       orgY = 0;
+       orgZ = 0;
+
+       vec1X = 1;
+       vec1Y = 0;
+       vec1Z = 0;
+       vec2X = 0;
+       vec2Y = 1;
+       vec2Z = 0;
+}
+
+//-------------------------------------------------------------------------------------------
+matrixRotation::~matrixRotation()
+{
+}
+
+void matrixRotation::CrossProduct(double *vecZx, double *vecZy, double *vecZz)
+{      
+       *vecZx = vec1Y * vec2Z - vec1Z * vec2Y; 
+       *vecZy = vec1Z * vec2X - vec1X * vec2Z; 
+       *vecZz = vec1X * vec2Y - vec1Y * vec2X;         
+}
+
+//-------------------------------------------------------------------------------------------
+void matrixRotation::GetTransformation(vtkTransform *transform)
+{
+       double dst_nrm_dircos_x;
+       double dst_nrm_dircos_y;
+       double dst_nrm_dircos_z;
+       //http://www.dclunie.com/medical-image-faq/html/part2.html
+       CrossProduct( &dst_nrm_dircos_x , &dst_nrm_dircos_y , &dst_nrm_dircos_z );
+       vtkMatrix4x4 *mat = vtkMatrix4x4::New();
+    
+       mat->SetElement(0,0,vec1X);
+       mat->SetElement(1,0,vec1Y);
+       mat->SetElement(2,0,vec1Z);
+    mat->SetElement(3,0,0);
+    
+       mat->SetElement(0,1,vec2X);
+    mat->SetElement(1,1,vec2Y);
+       mat->SetElement(2,1,vec2Z);
+       mat->SetElement(3,1,0);
+    
+       mat->SetElement(0,2,dst_nrm_dircos_x);
+       mat->SetElement(1,2,dst_nrm_dircos_y);
+       mat->SetElement(2,2,dst_nrm_dircos_z);
+       mat->SetElement(3,2,0);
+
+    mat->SetElement(0,3,0);
+       mat->SetElement(1,3,0);
+       mat->SetElement(2,3,0);
+       mat->SetElement(3,3,1);
+    
+       transform->PostMultiply ();
+       transform->Identity();
+       transform->Scale(spcX,spcY,spcZ);
+       transform->Update();
+       transform->Concatenate(mat);
+       transform->Update();
+       transform->Translate(orgX,orgY,orgZ);   
+       transform->Update();
+}
+
+
+//-------------------------------------------------------------------------------------------
+void matrixRotation::SetSpacing(double spcX,double spcY, double spcZ)
+{
+       this->spcX = spcX;
+       this->spcY = spcY;
+       this->spcZ = spcZ;
+}
+
+//-------------------------------------------------------------------------------------------
+void matrixRotation::SetOrigin(double orgX,double orgY, double orgZ)
+{
+       this->orgX = orgX;
+       this->orgY = orgY;
+       this->orgZ = orgZ;
+}
+
+//-------------------------------------------------------------------------------------------
+void matrixRotation::SetVector1(double vX,double vY, double vZ)
+{
+       double nor=sqrt(vX*vX + vY*vY + vZ*vZ);
+       this->vec1X = vX/nor;
+       this->vec1Y = vY/nor;
+       this->vec1Z = vZ/nor;
+}
+
+//-------------------------------------------------------------------------------------------
+void matrixRotation::SetVector2(double vX,double vY, double vZ)
+{
+       double nor=sqrt(vX*vX + vY*vY + vZ*vZ);
+       this->vec2X = vX/nor;
+       this->vec2Y = vY/nor;
+       this->vec2Z = vZ/nor;
+}
diff --git a/lib/TransformDicom3D/matrixRotation.h b/lib/TransformDicom3D/matrixRotation.h
new file mode 100644 (file)
index 0000000..00e6d9f
--- /dev/null
@@ -0,0 +1,39 @@
+\r
+#ifndef __MATRIX__ROTATION_h_INCLUDED__\r
+#define __MATRIX__ROTATION_h_INCLUDED__\r
+\r
+#include<vtkTransform.h>\r
+\r
+class matrixRotation \r
+{\r
+public:\r
+       matrixRotation();\r
+       ~matrixRotation();\r
+       \r
+       void SetSpacing(double, double, double);\r
+       void SetOrigin(double, double, double);\r
+       void SetVector1(double, double, double);\r
+       void SetVector2(double, double, double);\r
+       void GetTransformation(vtkTransform *transform);\r
+       void CrossProduct(double *vecZx, double *vecZy, double *vecZz);\r
+       \r
+private:\r
+     double spcX;\r
+     double spcY;\r
+     double spcZ;\r
+        \r
+     double orgX;\r
+     double orgY;\r
+     double orgZ;\r
+\r
+        double vec1X;\r
+        double vec1Y;\r
+        double vec1Z;\r
+        double vec2X;\r
+        double vec2Y;\r
+        double vec2Z;\r
+protected:\r
+\r
+}; \r
+\r
+#endif // __MATRIX__ROTATION_h_INCLUDED__\r