Giter VIP home page Giter VIP logo

mutual_information_cuda's Introduction

Project: 		Image Mutual Information in CUDA

Developer:    		Yan Ge

Time: 	      		March 2017 - May 2017

Source Code based on: [1] CUDA sample histogram 
       	    	      [2] ITK Image Mutual Information sample code.
		      (https://itk.org/Wiki/ITK/Examples/Registration/MutualInformation)

_______________________________________________________________________
I dedicate this project to my mom, in celebration of her 50th birthday!
_______________________________________________________________________

How to use:

[1] Install ITK
    (It takes long, when you type "make", type "make -j 4(# of processors you have in your PC)"
    https://itk.org/ITK/resources/software.html)

    Install CMAKE
    (https://cmake.org/download/)
    


[2] mkdir cudaMutualInformation
    tar -xvzf *.tar
    cd cudaMutualInformation && mkdir build && cmake ../

if cmake failed, the following may help build.

[3] Build using cmake.
    you might need to change a few lines of code in "CMakeList.txt". 
    
    Suggestions:
    <1> build a sample ITK program using cmake
    (ITK/Configuring and Building, https://itk.org/Wiki/ITK/Configuring_and_Building)
    
    <2> build a sample CUDA program using cmake
    (how to use cmake with cuda, https://codeyarns.com/2013/09/13/how-to-build-cuda-programs-using-cmake/)
    
    <3> now combine them, build a ITK CUDA program using my example "CMakeList.txt"
    (please find comment in "CMakeList.txt")


[4] make


[5] Copy any two images to directory "build", I have provided you with a 3D brain image (.nrrd file).
    You may choose any two images, they can be the same, or different, as long as ITK recognize them.


[6] Example command line options:
    <1> use ITK (#_bin), for example
	./ImageMutualInformation ManualRegistrationExample_fixed.nrrd ManualRegistrationExample_fixed.nrrd 0 #_bin

    <2> use CUDA (only 64-bin or 256 bin) 
        ./ImageMutualInformation ManualRegistrationExample_fixed.nrrd ManualRegistrationExample_fixed.nrrd 1 (64 or 256)


Attention: the "double" format in ITK is more precise than CUDA.
	   For eample, if bin count is 42, ITK gives 0.00840947, while CUDA gives 0.008409.
	   
	   
	   
	   Thank you for trying this software, and I certainly welcome any comments.



mutual_information_cuda's People

Contributors

yge58 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.