[Castor-users] Castor-users Digest, Vol 36, Issue 22

Schagt, I.H. van der I.H.vanderSchagt at umcutrecht.nl
Wed Sep 30 10:15:47 CEST 2020


Hi Thibaut,


This story does not apply to castor version 3.0, because I then got empty (NaN) images when reconstructing with -im, I had also emailed about this.
Castor version 3.1 has solved this problem, now I only have this 'blur' on the images. I will send you a private email with my dataset and further specifications of the data.

Thank you very much for making time for this.

Inge


________________________________
Van: Castor-users <castor-users-bounces at lists.castor-project.org> namens castor-users-request at lists.castor-project.org <castor-users-request at lists.castor-project.org>
Verzonden: dinsdag 29 september 2020 14:33:01
Aan: castor-users at lists.castor-project.org
Onderwerp: Castor-users Digest, Vol 36, Issue 22

Send Castor-users mailing list submissions to
        castor-users at lists.castor-project.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.castor-project.org/listinfo/castor-users
or, via email, send a message with subject or body 'help' to
        castor-users-request at lists.castor-project.org

You can reach the person managing the list at
        castor-users-owner at lists.castor-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Castor-users digest..."


Today's Topics:

   1. Re: Castor-users Digest, Vol 36, Issue 17 (tmerlin)


----------------------------------------------------------------------

Message: 1
Date: Tue, 29 Sep 2020 14:32:54 +0200
From: tmerlin <Thibaut.Merlin at univ-brest.fr>
To: castor-users at lists.castor-project.org
Subject: Re: [Castor-users] Castor-users Digest, Vol 36, Issue 17
Message-ID: <781597a3-3873-9c50-4115-be5bff7a5f50 at univ-brest.fr>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

Hi Inge,


Thank you for detailing the issue. The difference should come from the
sensitivity image weighing, as for -im case the weighing depends (among
other things) on the duration between two motion triggers. Using -rm,
the sensitivity images for each gate are simply averaged so it would
work only if the motion triggers are evenly spaced during the
acquisition, which is actually the case with your setup. What I don't
understand is why do you get these artifacts using -im, which should be
the proper way to go... Did you get this problem with the v3.0 version
as well ? Or is it just with the v3.1 version ? If you could upload the
data somewhere, I will have a look.


Best regards,

Thibaut



On 28/09/2020 09:26, Schagt, I.H. van der wrote:
>
> Hello Thibaut,
>
>
> I understand your explanation, but it seems to me that the correction
> is applied in a different way in respiratory motion correction than in
> involuntary motion correction.
>
> I have one dataset (PET list mode) of a Nema phantom that 'moves' in
> the x-y direction. The phantom is always in one position for 300s and
> then it moves in one moment to another position where it is 300s. This
> in total for three positions. (The translation of the phantom is 2 cm
> in x- and y-direction).
>
> I reconstructed this dataset in two ways:
>
> - 1. reconstruction with involuntary motion correction (-im) where the
> splitting of the data is done by timestamps (motion triggers), motion
> triggers on 0s, 300s and 600s.
>
> - 2. Reconstruction with respiratory motion correction (-rm) where the
> splitting of the data is done by gates (respiratory triggers), the
> data is split based on how many events belonged to each phantom position.
>
> In this way, the splitting should take place on exact the same moment
> and I used the exact same deformation file. Furthermore, I used the
> exact same attenuation correction map.
>
>
> But I get different images after reconstruction (see attached image).
> The image of the -im reconstruction differs from the image of the -rm
> reconstruction in the places where the density of the tissue changes
> when the phantom moves (outside of phantom and in the middle
> cilinder). That is why I suspect that something else happens with the
> attenuation correction (sensitivity images) between these two methods
> of motion correction.
>
>
> I can imagine this is quite an extensive story, but I wanted to
> explain it well. Hopefully this makes it a little bit more clear.
>
>
> Kind regards,
>
> Inge
>
> ------------------------------------------------------------------------
> *Van:* Castor-users <castor-users-bounces at lists.castor-project.org>
> namens castor-users-request at lists.castor-project.org
> <castor-users-request at lists.castor-project.org>
> *Verzonden:* donderdag 24 september 2020 11:39:46
> *Aan:* castor-users at lists.castor-project.org
> *Onderwerp:* Castor-users Digest, Vol 36, Issue 17
> Send Castor-users mailing list submissions to
>         castor-users at lists.castor-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.castor-project.org/listinfo/castor-users
> or, via email, send a message with subject or body 'help' to
>         castor-users-request at lists.castor-project.org
>
> You can reach the person managing the list at
>         castor-users-owner at lists.castor-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Castor-users digest..."
>
>
> Today's Topics:
>
>    1. Re: Castor-users Digest, Vol 36, Issue 13 (tmerlin)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 24 Sep 2020 11:40:03 +0200
> From: tmerlin <Thibaut.Merlin at univ-brest.fr>
> To: castor-users at lists.castor-project.org
> Subject: Re: [Castor-users] Castor-users Digest, Vol 36, Issue 13
> Message-ID: <9ebf85b5-fdb0-1b58-d5c4-03b4f2f25560 at univ-brest.fr>
> Content-Type: text/plain; charset="windows-1252"; Format="flowed"
>
> Hi Inge,
>
>
> I am not sure about what you mean by moving along the deformations.
>
> - With involuntary patient motion (-im), a sensitivity image is computed
> for each subset of data between motion triggers. If an attenuation image
> is provided, it is transformed using the "forward" deformation
> parameters. They are then transformed back to the reference position,
> and receive the proper weighing before being merged together (finally
> you get one sensitivity image by frame, or just one image if you don't
> have any frame).
>
> - The process is similar with motion correction for gating. One
> sensitivity image is computed for each set of transformation parameters
> (i.e, each gate), then they are deformed back into the reference
> position and merged together.
>
>
> During reconstruction, these sensitivity images are always used on
> images transformed back in the reference position.
>
>
> I hope this helps to clarify the process.
>
>
> Thibaut
>
>
>
>
> On 22/09/2020 18:44, Schagt, I.H. van der wrote:
> >
> > Hello Thibaut,
> >
> >
> > You are totally right, I enabled CASToR_BUILD_SAMPLE_UTILITIES in
> > Cmake and that worked. I can now build the projects and do
> > reconstructions.
> >
> >
> > Lastly, I noticed one more thing. When I reconstruct images with the
> > -im option and I use attenuation correction, the attenuation map
> > doesn't move along with the deformations, while this was the case for
> > the -rm option (respiratory motion).
> >
> > Is this the intention and/or is it possible to let the attenuation map
> > move along with the deformations?
> >
> >
> > Above all, many thanks for your help!
> >
> >
> > Inge
> >
> > ------------------------------------------------------------------------
> > *Van:* Castor-users <castor-users-bounces at lists.castor-project.org>
> > namens castor-users-request at lists.castor-project.org
> > <castor-users-request at lists.castor-project.org>
> > *Verzonden:* dinsdag 22 september 2020 10:24:31
> > *Aan:* castor-users at lists.castor-project.org
> > *Onderwerp:* Castor-users Digest, Vol 36, Issue 13
> > Send Castor-users mailing list submissions to
> >         castor-users at lists.castor-project.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://lists.castor-project.org/listinfo/castor-users
> > or, via email, send a message with subject or body 'help' to
> >         castor-users-request at lists.castor-project.org
> >
> > You can reach the person managing the list at
> >         castor-users-owner at lists.castor-project.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Castor-users digest..."
> >
> >
> > Today's Topics:
> >
> >    1. Re:  Problems with –im (involuntary patient motion
> >       correction) (tmerlin)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Tue, 22 Sep 2020 10:24:50 +0200
> > From: tmerlin <Thibaut.Merlin at univ-brest.fr>
> > To: castor-users at lists.castor-project.org
> > Subject: Re: [Castor-users]  Problems with –im (involuntary patient
> >         motion correction)
> > Message-ID: <6cf8c8f2-aceb-39d4-65d8-d620386cd9d2 at univ-brest.fr>
> > Content-Type: text/plain; charset="windows-1252"; Format="flowed"
> >
> >
> > Hi Inge,
> >
> >
> > The building problem might come from the CMake configuration file, as
> > these projects have been relocated (now you must enable
> > CASToR_BUILD_SAMPLE_UTILITIES in cmake to build them). It should not
> > have caused issues to build the solution though, so I will have a closer
> > look at it.
> >
> >
> > Could you try to rebuild the 3.1 version with
> > CASToR_BUILD_SAMPLE_UTILITIES enabled ? Alternatively if there are still
> > some issues, you can use the configuration file from the previous
> > version in attachements (to replace the one in the castor directory).
> >
> >
> > Let me know if this helps
> >
> >
> > Kind regards,
> >
> > Thibaut
> >
> >
> >
> > On 22/09/2020 09:41, Schagt, I.H. van der wrote:
> > >
> > > Dear Zacharis,
> > >
> > >
> > > Thank you for your quick response.
> > >
> > > As for oDynamicDataManager, in the datafile header a start time and
> > > duration are indeed given, these are 0s and 900s respectively. even
> > > though these values are included, the frame time stop remains 0s when
> > > I apply motion correction without framing.
> > >
> > > I tried the new version of Castor (V3.1), but I have trouble with
> > > configuring and building te program. Configuring only creates four
> > > projects in the solution (all_build, *castor-recon*, install and
> > > zero_check) instead of seven projects (all_build, *castor-recon*,
> > > install, zero_check, *castor-datafileExplorer,
> > > castor-imageDynamicTools and castor-scannerLUTExplorer*) and this
> > > causes problems building the solution.
> > >
> > > As far as configuring and building is concerned, I did everything the
> > > same as with v_3.0.1. I configured Castor with CMake and tried to
> > > build it in Windows Visual Studio.
> > >
> > > Do you know if the problem with configuring and building could be with
> > > this new version?
> > >
> > >
> > > Kind regards,
> > >
> > > Inge
> > >
> > >
> ------------------------------------------------------------------------
> > > *Van:* Chalampalakis, Zacharias <zacharias.chalampalakis at kcl.ac.uk>
> > > *Verzonden:* maandag 21 september 2020 18:21:32
> > > *Aan:* Schagt, I.H. van der; castor-users at lists.castor-project.org
> > > *Onderwerp:* RE: Problems with –im (involuntary patient motion
> > > correction)
> > >
> > > Good afternoon Igne
> > >
> > > Thank you for your email.
> > >
> > > We actually just released a new version of CASToR ( V3.1 ) which fixed
> > > some bugs related to the handling of motion timestamps.
> > >
> > > Maybe you could try with this version , if it is not too difficult ,
> > > to check if the behaviour you experience is related to these bugs ?
> > >
> > > In the latest version , the /oDynamidDataManager/ will remove all
> > > timestamps that occur after the end of the last frame.
> > >
> > > Normally the duration of the frame ( even when not specifying framing
> > > ) is set by the *Start time (s) *and *Duration (s) *entries in the
> > > datafile header.
> > >
> > > Do you have these entries in your datafile header?
> > >
> > > Kind Regards,
> > >
> > > Zacharias Chalampalakis
> > >
> > > *From:*Castor-users <castor-users-bounces at lists.castor-project.org>
> > > *On Behalf Of *Schagt, I.H. van der
> > > *Sent:* Monday, September 21, 2020 4:33 PM
> > > *To:* castor-users at lists.castor-project.org
> > > *Subject:* [Castor-users] Problems with –im (involuntary patient
> > > motion correction)
> > >
> > > Dear all,
> > >
> > > I am having trouble with motion correction reconstruction when using
> > > the –im option. When I try to apply motion correction reconstruction I
> > > get the error:
> > >
> > > /Error, the 2th motion trigger timestamp: xxx occurs after the end of
> > > the last frame (frame 1, timestop: 0!/
> > >
> > > This error occurs in the code in the file /oDynamicDataManager/ line
> > > 413 and arises incorrectly. When I do –im reconstruction in
> > > combination with 1 frame (so no framing), the time stop value of the
> > > frame remains 0s, it is not read from the data file. As a result, the
> > > time steps of the motion triggers are greater than the time stop value
> > > of the frame (line 407) and you will eventually get an error. When I
> > > manually adjust this time stop value to the correct value myself, this
> > > error message goes away, but I get incorrect reconstructed images. I
> > > only get black images after reconstruction where each voxel has NaN as
> > > its value. When I apply the same motion correction where I also divide
> > > the data into, for example, 2 frames (-frm…), I get correctly
> > > reconstructed images.
> > >
> > > Does anyone of you know why the option –im gives these weird results,
> > > or what I maybe do wrong?
> > > I use list-mode PET data with a total duration of 900 seconds. For the
> > > motion correction, I used three motion triggers (and deformations).
> > >
> > > Thanks in advance!
> > >
> > > Inge
> > >
> > >
> ------------------------------------------------------------------------
> > >
> > > /De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is
> > > uitsluitend bestemd voor de geadresseerde. Indien u dit bericht
> > > onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en de
> > > afzender direct te informeren door het bericht te retourneren. Het
> > > Universitair Medisch Centrum Utrecht is een publiekrechtelijke
> > > rechtspersoon in de zin van de W.H.W. (Wet Hoger Onderwijs en
> > > Wetenschappelijk Onderzoek) en staat geregistreerd bij de Kamer van
> > > Koophandel voor Midden-Nederland onder nr. 30244197. /
> > >
> > > /Denk s.v.p aan het milieu voor u deze e-mail afdrukt. /
> > >
> > >
> ------------------------------------------------------------------------
> > >
> > > /This message may contain confidential information and is intended
> > > exclusively for the addressee. If you receive this message
> > > unintentionally, please do not use the contents but notify the sender
> > > immediately by return e-mail. University Medical Center Utrecht is a
> > > legal person by public law and is registered at the Chamber of
> > > Commerce for Midden-Nederland under no. 30244197. /
> > >
> > > /Please consider the environment before printing this e-mail. /
> > >
> > >
> > > _______________________________________________
> > > Castor-users mailing list
> > > Castor-users at lists.castor-project.org
> > > http://lists.castor-project.org/listinfo/castor-users
> >
> > --
> > Thibaut MERLIN -- PhD
> >
> > Docteur en Imagerie Médicale au Laboratoire de Traitement de
> > l'Information Medicale (LaTIM - INSERM UMR 1101)
> > Institut Brestois de recherche en Bio-Santé (IBRBS)
> > 12 Avenue Foch, 29200 Brest, FRANCE
> > Tel: 06.75.12.24.90
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> >
> <http://lists.castor-project.org/pipermail/castor-users/attachments/20200922/6a9155da/attachment.html>
> > -------------- next part --------------
> > # MON 1 Aug 2016 17:02 PM CET
> > # Didier Benoit,  didier.benoit13 at gmail.com
> > # Thibaut Merlin, thibaut.merlin at gmail.com
> > # CMAKE compiling the CASToR reconstruction software
> >
> > #---------
> > # Checking the CMAKE version
> > cmake_minimum_required( VERSION 2.8 FATAL_ERROR )
> >
> > #---------
> > # Set the build type
> > set( CMAKE_BUILD_TYPE "Release" CACHE STRING
> >   "Choose the type of build, options are: Debug Release"
> > )
> >
> > #---------
> > # Defining the project
> > project( CASToR )
> > set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake-modules
> >   ${CMAKE_MODULE_PATH}
> > )
> >
> > #---------
> > # Defining a list of option
> > option( CASToR_64bits "Build CASToR on 64 bits architecture" YES )
> > option( CASToR_VERBOSE "Print lot of infos from CASToR" NO )
> > option( CASToR_DEBUG "Enable many additionnal checks in primitive
> > functions" NO )
> > option( CASToR_BUILD_GATE_UTILITIES "Build GATE tools for CASToR
> > (require ROOT library)" NO )
> > option( CASToR_BUILD_SAMPLE_UTILITIES "Build Example codes (require
> > ROOT library)" NO )
> > option( CASToR_BUILD_DEVEL "Build devel tools. Must be left unchecked"
> > NO )
> > option( CASToR_ROOT "Build CASToR with ROOT library" NO )
> > option( CASToR_SIMD "Build CASToR with SIMD OPTION" NO )
> > option( CASToR_OMP "Build CASToR with OMP" NO )
> > option( CASToR_MPI "Build CASToR with MPI" NO )
> > # For testing purposes
> > #option( CASToR_DEFORMATION_LEDESMA "Build CASToR with LEDESMA" NO )
> > #option( CASToR_ELASTIX "Build CASToR with ELASTIX" NO )
> >
> >
> > #---------
> > # Find the config file CASToR config
> > find_path( CASTOR_CONFIG_DIR oCASToRConfig.hh.in
> >   ${PROJECT_SOURCE_DIR}
> >   ${PROJECT_SOURCE_DIR}/include/algorithm
> >   ${PROJECT_SOURCE_DIR}/include/analytic_simulator
> >   ${PROJECT_SOURCE_DIR}/include/datafile
> >   ${PROJECT_SOURCE_DIR}/include/dynamic
> >   ${PROJECT_SOURCE_DIR}/include/image
> >   ${PROJECT_SOURCE_DIR}/include/management
> >   ${PROJECT_SOURCE_DIR}/include/optimizer
> >   ${PROJECT_SOURCE_DIR}/include/projector
> >   ${PROJECT_SOURCE_DIR}/include/scanner
> >   ${PROJECT_SOURCE_DIR}/include/utils
> > )
> >
> > #---------
> > # Defining configuration files
> > configure_file(
> >   "${CASTOR_CONFIG_DIR}/oCASToRConfig.hh.in"
> >   "${PROJECT_BINARY_DIR}/oCASToRConfig.hh"
> >   @ONLY
> > )
> >
> > #---------
> > # Setting the CASTOR_CONFIG variable
> > set( CASTOR_CONFIG ${PROJECT_SOURCE_DIR}/config CACHE PATH
> >   "Path to the CASTOR config repository"
> > )
> >
> > #---------
> > # Setting position of the CASToR utilitaries
> > set( TOOLKITS_SOURCE_DIR ${PROJECT_SOURCE_DIR}/toolkits )
> >
> > # To avoid conflict between the makefile from CMake and the makefile
> > provided
> > # by CASToR
> > add_definitions( -DCASToR_USE_CMAKE )
> >
> > ########################################################################
> > # Provide add_compile_options() when not available
> > ########################################################################
> > if( CMAKE_VERSION VERSION_LESS "2.8.12" )
> >     function( add_compile_options )
> >         add_definitions( ${ARGN} )
> >     endfunction( add_compile_options )
> > endif()
> >
> >
> > #---------
> > # Different option for Windows or Unix (Linux/MacOS)
> > if( WIN32 )
> >
> >   #---------
> >   # Delete some flags by default provided by CMAKE
> >   #---------
> >   string( REPLACE "/W3" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} )
> >   string( REPLACE "/O2" "" CMAKE_CXX_FLAGS_RELEASE
> > ${CMAKE_CXX_FLAGS_RELEASE} )
> >   string( REPLACE "/DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE
> >     ${CMAKE_CXX_FLAGS_RELEASE}
> >   )
> >   string( REPLACE "/MD" "" CMAKE_CXX_FLAGS_RELEASE
> > ${CMAKE_CXX_FLAGS_RELEASE} )
> >   string( REPLACE "/O2" "" CMAKE_CXX_FLAGS_RELEASE
> > ${CMAKE_CXX_FLAGS_RELEASE} )
> >
> >   # Visual studio flags by default /Ox
> >   add_compile_options( /MP )
> >
> >   #---------
> >   # Checking for OpenMP
> >   if( CASToR_OMP )
> >     find_package( OpenMP REQUIRED )
> >     set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
> >     set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
> >     set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}
> >       ${OpenMP_EXE_LINKER_FLAGS}"
> >     )
> >     add_definitions( /DCASTOR_OMP )
> >   endif()
> >
> >   #---------
> >   # Checking for MPI
> >   if( CASToR_MPI )
> >     set( MPIEXEC "C:/Program Files/Microsoft MPI/Bin/mpiexec.exe" )
> >     set( MPI_CXX_INCLUDE_PATH
> >       "C:/Program Files (x86)/Microsoft SDKs/MPI/Include"
> >     )
> >     if( "${CMAKE_SIZEOF_VOID_P}" EQUAL 8 )
> >       set( MS_MPI_ARCH_DIR x64 )
> >     else()
> >       set( MS_MPI_ARCH_DIR x86 )
> >     endif()
> >     set( MPI_CXX_LIBRARIES
> >       "C:/Program Files (x86)/Microsoft
> > SDKs/MPI/Lib/${MS_MPI_ARCH_DIR}/msmpi.lib"
> >     )
> >     set( MPI_C_INCLUDE_PATH "${MPI_CXX_INCLUDE_PATH}" )
> >     set( MPI_C_LIBRARIES "${MPI_CXX_LIBRARIES}" )
> >     set( MPIEXEC_NUMPROC_FLAG "-np" CACHE STRINGS
> >       "Flag used by MPI to specify the number of processes for
> > MPIEXEC; the next option will be the number of processes."
> >     )
> >
> >     include_directories( ${MPI_CXX_INCLUDE_PATH} )
> >     add_definitions( /DCASTOR_MPI )
> >   endif()
> >
> >   #---------
> >   # Checking verbosity
> >   if( CASToR_VERBOSE )
> >     add_compile_options( /W4 )
> >     add_definitions( /DCASTOR_VERBOSE )
> >   endif()
> >
> >   #---------
> >   # Checking debug
> >   if( CASToR_DEBUG )
> >     add_compile_options( /W4 )
> >     add_definitions( /DCASTOR_DEBUG )
> >   endif()
> >
> >   #---------
> >   # Checking the mode Release/Debug
> >   if( CMAKE_BUILD_TYPE MATCHES Release ) # Release mode
> >     # Add release flags
> >     add_compile_options( /Ox /O2 )
> >
> >   else() # Debug mode
> >      # Add debug flags
> >       add_compile_options( /Od )
> >       add_definitions( /DCASTOR_DEBUG )
> >   endif()
> >
> >
> >
> >     #---------
> >   # Checking for ROOT
> >   if( CASToR_ROOT )
> >     find_package( ROOT REQUIRED )
> >     include_directories( ${ROOT_INCLUDE_DIR} )
> >     set( LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} )
> >     add_definitions( -DCASTOR_ROOT )
> >   endif()
> >
> >
> >   #---------
> >   # GATE utilities
> >   if( CASToR_BUILD_GATE_UTILITIES )
> >     if(CASToR_ROOT)
> >     else()
> >       message( "CASToR_ROOT switched to ON (ROOT required for GATE
> > utilities) ${CMAKE_MODULE_PATH}" )
> >       set( ROOT_INCLUDE_DIR $ENV{ROOT_INCLUDE_DIR} )
> >       set( ROOT_LIBRARY_DIR $ENV{ROOT_LIBRARY_DIR} )
> >       include_directories( $ENV{ROOT_INCLUDE_DIR} )
> >       set( LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} )
> >       add_definitions( /DCASTOR_ROOT )
> >       set( CASToR_ROOT ON CACHE BOOL "Force ROOT linking" FORCE)
> >     endif()
> >   endif()
> >
> >
> >   #---------
> >   # Checking for ROOT
> >   if( CASToR_BUILD_SAMPLE_UTILITIES )
> >     if(CASToR_ROOT)
> >     else()
> >       message( "CASToR_ROOT switched to ON (ROOT required for sample
> > code utilities)" )
> >       set( ROOT_INCLUDE_DIR $ENV{ROOT_INCLUDE_DIR} )
> >       set( ROOT_LIBRARY_DIR $ENV{ROOT_LIBRARY_DIR} )
> >       include_directories( $ENV{ROOT_INCLUDE_DIR} )
> >       set( LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} )
> >       add_definitions( /DCASTOR_ROOT )
> >       set( CASToR_ROOT ON CACHE BOOL "Force ROOT linking" FORCE)
> >     endif()
> >   endif()
> >
> >   # Checking for both ROOT & 64bits enabled
> >   # Force to 32 bits in this case, as ROOT can only be 32 bits on WIN
> >   # https://root-forum.cern.ch/t/native-windows-64-bit-build/9102/27
> >   # Display warning message
> >
> >   #---------
> >   # Checking the architecture 64/32 bits
> >   if( CASToR_64bits )
> >     if( CASToR_ROOT )
> >       message( "Architecture set to 32 bits as ROOT can only be built
> > as 32 bits !" )
> >       message( "The generator may have to be manually changed to a 32
> > bits version !" )
> >       set( CASToR_64bits OFF CACHE BOOL "" FORCE)
> >     else()
> >       add_definitions( /D_64 )
> >     endif()
> >   endif()
> >
> >
> >
> > # Unix fork (Linux/MacOS)
> > else()
> >
> >   #---------
> >   # Compiler-specific C++11 activation.
> >   if( "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" )
> >     execute_process(
> >       COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE
> > GCC_VERSION
> >     )
> >     if( NOT( GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION
> > VERSION_EQUAL 4.7 ) )
> >       message( FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or
> > greater." )
> >     endif()
> >     add_compile_options( -std=c++11 )
> >   elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
> >     add_compile_options( -std=c++11 -stdlib=libc++ )
> >   endif ()
> >
> >   #---------
> >   # Checking the architecture 64/32 bits
> >   if( CASToR_64bits )
> >     add_compile_options( -m64 )
> >     add_definitions( -D_64 )
> >   else()
> >     add_compile_options( -m32 )
> >   endif()
> >
> >   #---------
> >   # Checking verbosity
> >   if( CASToR_VERBOSE )
> >     add_compile_options( -Wall -pedantic -Wextra )
> >     add_definitions( -DCASTOR_VERBOSE )
> >     if( CASToR_SIMD )
> >       add_compile_options( -ftree-vectorizer-verbose=2 )
> >     endif()
> >   endif()
> >
> >   #---------
> >   # Checking debug
> >   if( CASToR_DEBUG )
> >     add_compile_options( -Wall -pedantic -Wextra )
> >     add_definitions( -DCASTOR_DEBUG )
> >     if( CASToR_SIMD )
> >       add_compile_options( -ftree-vectorizer-verbose=2 )
> >     endif()
> >   endif()
> >
> >   #---------
> >   # Checking for OpenMP
> >   if( CASToR_OMP )
> >     find_package( OpenMP REQUIRED )
> >     add_compile_options( ${OpenMP_CXX_FLAGS} )
> >     add_definitions( -DCASTOR_OMP )
> >   endif()
> >
> >   #---------
> >   # Checking for MPI
> >   if( CASToR_MPI )
> >     find_package( MPI REQUIRED )
> >     include_directories( ${MPI_INCLUDE_PATH} )
> >     add_definitions( -DCASTOR_MPI )
> >   endif()
> >
> >   if( CASToR_BUILD_GATE_UTILITIES )
> >     if(CASToR_ROOT)
> >     else()
> >       message( "CASToR_ROOT switched to ON (ROOT required for GATE
> > utilities)" )
> >       set( ROOT_INCLUDE_DIR $ENV{ROOT_INCLUDE_DIR} )
> >       set( ROOT_LIBRARY_DIR $ENV{ROOT_LIBRARY_DIR} )
> >       include_directories( $ENV{ROOT_INCLUDE_DIR} )
> >       set( LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} )
> >       add_definitions( /DCASTOR_ROOT )
> >       set( CASToR_ROOT ON CACHE BOOL "Force ROOT linking" FORCE)
> >     endif()
> >   endif()
> >
> >
> >   #---------
> >   # Checking for ROOT
> >   if( CASToR_BUILD_SAMPLE_UTILITIES )
> >     if(CASToR_ROOT)
> >     else()
> >       message( "CASToR_ROOT switched to ON (ROOT required for sample
> > code utilities)" )
> >       set( ROOT_INCLUDE_DIR $ENV{ROOT_INCLUDE_DIR} )
> >       set( ROOT_LIBRARY_DIR $ENV{ROOT_LIBRARY_DIR} )
> >       include_directories( $ENV{ROOT_INCLUDE_DIR} )
> >       set( LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} )
> >       add_definitions( /DCASTOR_ROOT )
> >       set( CASToR_ROOT ON CACHE BOOL "Force ROOT linking" FORCE)
> >     endif()
> >   endif()
> >
> >   #---------
> >   # Checking for ROOT
> >   if( CASToR_ROOT )
> >     find_package( ROOT REQUIRED )
> >     include_directories( ${ROOT_INCLUDE_DIR} )
> >     set( LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} )
> >         message( "${ROOT_INCLUDE_DIR} " ${ROOT_INCLUDE_DIR})
> >     message( "${ROOT_LIBRARY_DIR} " ${ROOT_LIBRARY_DIR})
> >     add_definitions( -DCASTOR_ROOT )
> >   endif()
> >
> >   #--------- // LEDESMA deformation library. Not planned to be
> > included in Castor, just for private testing.
> >   # Checking for LEDESMA
> >   #if( CASToR_DEFORMATION_LEDESMA )
> >   #  include_directories( ${PROJECT_SOURCE_DIR}/include/image/lib )
> >   #  set( LINK_DIRECTORIES ${PROJECT_SOURCE_DIR}/include/image/lib
> > -lElasticRegistration)
> >   #  set( DEFORMATION_LEDESMA_LIBRARIES
> > -L${PROJECT_SOURCE_DIR}/include/image/lib\ -lElasticRegistration)
> >   #  add_definitions( -DCASTOR_DEFORMATION_LEDESMA )
> >   #endif()
> >
> >   #---------
> >   # Checking for ELASTIX
> >   #if( CASToR_ELASTIX )
> >   #  set( ELASTIX_BUILD_DIR "" CACHE PATH "Path to elastix build
> folder" )
> >   #  set( ELASTIX_USE_FILE ${ELASTIX_BUILD_DIR}/UseElastix.cmake )
> >
> >   #  option( USE_ITK_FOR_ELASTIX "Use ITK (required for elastix)" ON )
> >   #  find_package( ITK )
> >   #  if( ITK_FOUND )
> >   #    include( ${ITK_USE_FILE} )
> >   #  else( ITK_FOUND )
> >   #    message( FATAL_ERROR "Cannot build CASToR using ELASTIX without
> > ITK. Please set ITK_DIR." )
> >   #  endif( ITK_FOUND )
> >
> >   #  if( EXISTS ${ELASTIX_USE_FILE} )
> >   #    include( ${ELASTIX_USE_FILE} )
> >   #    link_libraries( param )
> >   #    link_libraries( elastix )
> >   #    link_libraries( transformix )
> >   #    add_definitions( -DCASTOR_ELASTIX )
> >   #  endif()
> >
> >   #endif()
> >
> >   #---------
> >   # Checking the mode Release/Debug
> >   if( CMAKE_BUILD_TYPE MATCHES Release ) # Release mode
> >     # Add release flags
> >     add_compile_options( -O3 )
> >
> >     # Add SIMD flags
> >     if( CASToR_SIMD )
> >       add_compile_options(
> >         -ftree-vectorize -msse2 -fassociative-math
> >       )
> >     endif()
> >   else() # Debug mode
> >      # Add debug flags
> >       add_compile_options( -O0 -g3 -fno-inline -pg )
> >       add_definitions( -DCASTOR_DEBUG )
> >   endif()
> >
> > endif()
> >
> > #---------
> > # Setup include directory for this project
> > include_directories(
> >   ${CMAKE_CURRENT_BINARY_DIR}
> >   ${PROJECT_SOURCE_DIR}/include/algorithm
> >   ${PROJECT_SOURCE_DIR}/include/analytic_simulator
> >   ${PROJECT_SOURCE_DIR}/include/datafile
> >   ${PROJECT_SOURCE_DIR}/include/dynamic
> >   ${PROJECT_SOURCE_DIR}/include/image
> >   ${PROJECT_SOURCE_DIR}/include/management
> >   ${PROJECT_SOURCE_DIR}/include/optimizer
> >   ${PROJECT_SOURCE_DIR}/include/projector
> >   ${PROJECT_SOURCE_DIR}/include/scanner
> >   ${PROJECT_SOURCE_DIR}/include/utils
> > )
> >
> > #---------
> > # Locate sources and headers for CASToR
> > file( GLOB_RECURSE sources ${PROJECT_SOURCE_DIR}/src/*.cc )
> > file( GLOB_RECURSE headers ${PROJECT_SOURCE_DIR}/include/*.hh )
> >
> > #---------
> > # Build the executables
> > add_executable( castor-recon castor-recon.cc ${sources} ${headers} )
> > add_executable( castor-datafileExplorer
> > ${TOOLKITS_SOURCE_DIR}/castor-datafileExplorer.cc ${sources}
> ${headers} )
> > add_executable( castor-scannerLUTExplorer
> > ${TOOLKITS_SOURCE_DIR}/castor-scannerLUTExplorer.cc ${sources}
> > ${headers} )
> > add_executable( castor-imageDynamicTools
> > ${TOOLKITS_SOURCE_DIR}/castor-imageDynamicTools.cc ${sources}
> ${headers} )
> > if( CASToR_BUILD_DEVEL)
> >   add_executable( castor-proj castor-proj.cc ${sources} ${headers} )
> > endif()
> >
> > # Build GATE tools for CASToR
> > if( CASToR_BUILD_GATE_UTILITIES )
> >   add_executable( castor-GATERootToCastor
> > ${TOOLKITS_SOURCE_DIR}/castor-GATERootToCastor.cc ${sources}
> ${headers} )
> >   add_executable( castor-GATEMacToGeom
> > ${TOOLKITS_SOURCE_DIR}/castor-GATEMacToGeom.cc ${sources}
> >   ${headers} )
> > endif()
> >
> > # Build GATE tools for CASToR
> > if( CASToR_BUILD_SAMPLE_UTILITIES )
> >   add_executable( castor-PetScannerLutEx
> > ${TOOLKITS_SOURCE_DIR}/castor-PetScannerLutEx.cc ${sources} ${headers} )
> >   add_executable( castor-datafileConversionEx
> > ${TOOLKITS_SOURCE_DIR}/castor-datafileConversionEx.cc ${sources}
> >   ${headers} )
> > endif()
> >
> > if( WIN32 )
> >   target_link_libraries( castor-recon ${ROOT_LIBRARIES}
> >     ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> ${MPI_CXX_LIBRARIES}
> >   )
> >   target_link_libraries( castor-datafileExplorer ${ROOT_LIBRARIES}
> >     ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> ${MPI_CXX_LIBRARIES}
> >   )
> >   target_link_libraries( castor-scannerLUTExplorer ${ROOT_LIBRARIES}
> >     ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> ${MPI_CXX_LIBRARIES}
> >   )
> >   target_link_libraries( castor-imageDynamicTools ${ROOT_LIBRARIES}
> >     ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> ${MPI_CXX_LIBRARIES}
> >   )
> >   if( CASToR_BUILD_DEVEL )
> >     target_link_libraries( castor-proj ${ROOT_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${MPI_CXX_LIBRARIES}
> >     )
> >   endif()
> >   if( CASToR_BUILD_GATE_UTILITIES )
> >     target_link_libraries( castor-GATERootToCastor ${ROOT_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${MPI_CXX_LIBRARIES}
> >     )
> >     target_link_libraries( castor-GATEMacToGeom ${ROOT_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${MPI_CXX_LIBRARIES}
> >     )
> >   endif()
> >   if( CASToR_BUILD_SAMPLE_UTILITIES )
> >     target_link_libraries( castor-PetScannerLutEx ${ROOT_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${MPI_CXX_LIBRARIES}
> >     )
> >     target_link_libraries( castor-datafileConversionEx ${ROOT_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${MPI_CXX_LIBRARIES}
> >     )
> >   endif()
> >
> > else()
> >   target_link_libraries( castor-recon ${ROOT_LIBRARIES}
> > ${OpenMP_CXX_FLAGS} ${MPI_LIBRARIES}
> >     ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES} )
> >   target_link_libraries( castor-datafileExplorer ${ROOT_LIBRARIES}
> > ${OpenMP_CXX_FLAGS} ${MPI_LIBRARIES}
> >     ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES} )
> >   target_link_libraries( castor-scannerLUTExplorer ${ROOT_LIBRARIES}
> > ${OpenMP_CXX_FLAGS} ${MPI_LIBRARIES}
> >     ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES} )
> >   target_link_libraries( castor-imageDynamicTools ${ROOT_LIBRARIES}
> > ${OpenMP_CXX_FLAGS} ${MPI_LIBRARIES}
> >     ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> >   )
> >   if( CASToR_BUILD_DEVEL )
> >     target_link_libraries( castor-proj ${ROOT_LIBRARIES}
> ${MPI_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${OpenMP_CXX_FLAGS}
> >     )
> >   endif()
> >   if( CASToR_BUILD_GATE_UTILITIES )
> >     target_link_libraries( castor-GATERootToCastor ${ROOT_LIBRARIES}
> > ${MPI_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${OpenMP_CXX_FLAGS}
> >     )
> >     target_link_libraries( castor-GATEMacToGeom ${ROOT_LIBRARIES}
> > ${MPI_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${OpenMP_CXX_FLAGS}
> >     )
> >   endif()
> >   if( CASToR_BUILD_SAMPLE_UTILITIES )
> >     target_link_libraries( castor-PetScannerLutEx ${ROOT_LIBRARIES}
> > ${MPI_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${OpenMP_CXX_FLAGS}
> >     )
> >     target_link_libraries( castor-datafileConversionEx
> > ${ROOT_LIBRARIES} ${MPI_LIBRARIES}
> >       ${DEFORMATION_LEDESMA_LIBRARIES} ${ITK_LIBRARIES}
> > ${OpenMP_CXX_FLAGS}
> >     )
> >   endif()
> > endif()
> >
> > #---------
> > # Move the executables to the install path
> > install( TARGETS
> >   castor-recon castor-datafileExplorer castor-scannerLUTExplorer
> > castor-imageDynamicTools
> >   DESTINATION
> >   bin
> > )
> >
> > if( CASToR_BUILD_DEVEL )
> >   install( TARGETS
> >     castor-proj
> >     DESTINATION
> >     bin
> >   )
> > endif()
> >
> > if( CASToR_BUILD_GATE_UTILITIES )
> >   install( TARGETS
> >     castor-GATERootToCastor castor-GATEMacToGeom
> >     DESTINATION
> >     bin
> >   )
> > endif()
> >
> > if( CASToR_BUILD_SAMPLE_UTILITIES )
> >   install( TARGETS
> >     castor-PetScannerLutEx castor-datafileConversionEx
> >     DESTINATION
> >     bin
> >   )
> > endif()
> >
> >
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > Castor-users mailing list
> > Castor-users at lists.castor-project.org
> > http://lists.castor-project.org/listinfo/castor-users
> >
> >
> > ------------------------------
> >
> > End of Castor-users Digest, Vol 36, Issue 13
> > ********************************************
> >
> > _______________________________________________
> > Castor-users mailing list
> > Castor-users at lists.castor-project.org
> > http://lists.castor-project.org/listinfo/castor-users
>
> --
> Thibaut MERLIN -- PhD
>
> Docteur en Imagerie Médicale au Laboratoire de Traitement de
> l'Information Medicale (LaTIM - INSERM UMR 1101)
> Institut Brestois de recherche en Bio-Santé (IBRBS)
> 12 Avenue Foch, 29200 Brest, FRANCE
> Tel: 06.75.12.24.90
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://lists.castor-project.org/pipermail/castor-users/attachments/20200924/79ec6c59/attachment.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Castor-users mailing list
> Castor-users at lists.castor-project.org
> http://lists.castor-project.org/listinfo/castor-users
>
>
> ------------------------------
>
> End of Castor-users Digest, Vol 36, Issue 17
> ********************************************
>
> _______________________________________________
> Castor-users mailing list
> Castor-users at lists.castor-project.org
> http://lists.castor-project.org/listinfo/castor-users

--
Thibaut MERLIN -- PhD

Docteur en Imagerie Médicale au Laboratoire de Traitement de l'Information Medicale (LaTIM - INSERM UMR 1101)
Institut Brestois de recherche en Bio-Santé (IBRBS)
12 Avenue Foch, 29200 Brest, FRANCE
Tel: 06.75.12.24.90

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.castor-project.org/pipermail/castor-users/attachments/20200929/50d0768b/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Castor-users mailing list
Castor-users at lists.castor-project.org
http://lists.castor-project.org/listinfo/castor-users


------------------------------

End of Castor-users Digest, Vol 36, Issue 22
********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.castor-project.org/pipermail/castor-users/attachments/20200930/01ed67ef/attachment-0001.html>


More information about the Castor-users mailing list