1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef CLITKCONEBEAMPROJECTIMAGEGENERICFILTER_CXX
19 #define CLITKCONEBEAMPROJECTIMAGEGENERICFILTER_CXX
22 * @file clitkConeBeamProjectImageGenericFilter.cxx
23 * @author Jef Vandemeulebroucke <jef@creatis.insa-lyon.fr>
24 * @date Wed April 30 13:47:57 2008
31 #include "clitkConeBeamProjectImageGenericFilter.h"
36 //====================================================================
38 ConeBeamProjectImageGenericFilter::ConeBeamProjectImageGenericFilter()
44 // mIsoCenter.resize(3);
45 // for (unsigned int j=0; j < 3; j++) mIsoCenter[j]=128.;
46 // mSourceToScreen=1536.;
47 // mSourceToAxis=1000.;
48 // mProjectionAngle=0.;
50 // // set the rigid transform matrix to the identity
51 // for (unsigned int i=0; i <4; i++)
52 // for (unsigned int j=0; j <4; j++)
53 // if (i==j)mRigidTransformMatrix[i][j]=1.;
54 // else mRigidTransformMatrix[i][j]=0.;
57 // mEdgePaddingValue=0.0;
60 //====================================================================
62 void ConeBeamProjectImageGenericFilter::Update()
64 //Read the PixelType and dimension of the input image
66 std::string PixelType;
67 clitk::ReadImageDimensionAndPixelType(m_InputFileName, Dimension, PixelType);
70 if (m_Verbose) std::cout << "Input was detected to be "<< Dimension << "D and " << PixelType << "..." << std::endl;
72 if(PixelType == "short"){
73 if (m_Verbose) std::cout << "Launching Projection in signed short..." << std::endl;
74 UpdateWithPixelType<signed short>();
77 // else if(PixelType == "unsigned_short"){
78 // if (m_Verbose) std::cout << "Launching Projection in unsigned_short..." << std::endl;
79 // UpdateWithPixelType<unsigned short>();
82 else if (PixelType == "unsigned_char"){
83 if (m_Verbose) std::cout << "Launching Projection in unsigned_char..." << std::endl;
84 UpdateWithPixelType<unsigned char>();
87 // else if (PixelType == "char"){
88 // if (m_Verbose) std::cout << "Launching Projection in signed_char..." << std::endl;
89 // UpdateWithPixelType<signed char>();
92 if (m_Verbose) std::cout << "Launching Projection in float..." << std::endl;
93 UpdateWithPixelType<float>();
97 else {itkExceptionMacro(<< "Input Image dimension is " << Dimension
98 << " but I can only work on 3D images.");
103 //====================================================================
106 #endif //#define CLITKCONEBEAMPROJECTIMAGEGENERICFILTER_CXX