cmtkImageSymmetryPlaneCommandLineBase.h

Go to the documentation of this file.
00001 /*
00002 //
00003 //  Copyright 1997-2009 Torsten Rohlfing
00004 //
00005 //  Copyright 2004-2010 SRI International
00006 //
00007 //  This file is part of the Computational Morphometry Toolkit.
00008 //
00009 //  http://www.nitrc.org/projects/cmtk/
00010 //
00011 //  The Computational Morphometry Toolkit is free software: you can
00012 //  redistribute it and/or modify it under the terms of the GNU General Public
00013 //  License as published by the Free Software Foundation, either version 3 of
00014 //  the License, or (at your option) any later version.
00015 //
00016 //  The Computational Morphometry Toolkit is distributed in the hope that it
00017 //  will be useful, but WITHOUT ANY WARRANTY; without even the implied
00018 //  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 //  GNU General Public License for more details.
00020 //
00021 //  You should have received a copy of the GNU General Public License along
00022 //  with the Computational Morphometry Toolkit.  If not, see
00023 //  <http://www.gnu.org/licenses/>.
00024 //
00025 //  $Revision: 2398 $
00026 //
00027 //  $LastChangedDate: 2010-10-05 14:54:37 -0700 (Tue, 05 Oct 2010) $
00028 //
00029 //  $LastChangedBy: torstenrohlfing $
00030 //
00031 */
00032 
00033 #ifndef __cmtkImageSymmetryPlaneCommandLineBase_h_included_
00034 #define __cmtkImageSymmetryPlaneCommandLineBase_h_included_
00035 
00036 #include <cmtkconfig.h>
00037 
00038 #include <Registration/cmtkImageSymmetryPlaneFunctionalBase.h>
00039 
00040 #include <System/cmtkCannotBeCopied.h>
00041 #include <System/cmtkCommandLine.h>
00042 
00043 namespace
00044 cmtk
00045 {
00046 
00049 
00052 class ImageSymmetryPlaneCommandLineBase :
00053     private CannotBeCopied
00054 {
00055 public:
00057   ImageSymmetryPlaneCommandLineBase();
00058 
00063   int Run( const int argc, const char* argv[] );
00064 
00066   CommandLine& GetCommandLine()
00067   {
00068     return this->m_CommandLine;
00069   }
00070 
00071 protected:
00073   virtual ImageSymmetryPlaneFunctionalBase::SmartPtr CreateFunctional( UniformVolume::SmartPtr& volume ) = 0;
00074 
00076   virtual ImageSymmetryPlaneFunctionalBase::SmartPtr CreateFunctional( UniformVolume::SmartPtr& volume, const Types::DataItemRange& range ) = 0;
00077 
00078 private:
00080   bool ParseCommandLine ( const int argc, const char* argv[] );
00081 
00083   ParametricPlane m_SymmetryPlane;
00084 
00086   bool m_Verbose;
00087 
00089   float m_MinValue;
00090 
00092   bool m_MinValueSet;
00093 
00095   float m_MaxValue;
00096 
00098   bool m_MaxValueSet;
00099 
00101   Types::Coordinate m_Sampling;
00102 
00104   Types::Coordinate m_Accuracy;
00105   
00107   Interpolators::InterpolationEnum m_Interpolation;
00108 
00110   int m_Levels;
00111   
00113   bool m_DisableOptimization;
00114 
00116   Types::Coordinate m_Rho;
00117 
00119   Units::Degrees m_Theta;
00120 
00122   Units::Degrees m_Phi;
00123   
00125   bool m_FixOffset;
00126 
00128   const char* m_MirrorOutFile;
00129 
00131   const char* m_AlignedOutFile;
00132 
00134   bool m_MarkPlaneAligned;
00135 
00137   const char* m_MarkedOutFile;
00138   
00140   const char* m_DifferenceOutFile;
00141 
00143   const char* m_WriteXformPath;
00144 
00146   Types::DataItem m_MarkPlaneValue;
00147 
00149   bool m_PadOutValueSet;
00150   
00152   Types::DataItem m_PadOutValue;
00153 
00155   const char* m_SymmetryOutFileName;
00156   
00158   const char* m_SymmetryParameters;
00159 
00161   const char* m_SymmetryParametersFile;
00162 
00164   const char* m_InFileName;
00165   
00167   typedef enum
00168   {
00170     SYMPL_INIT_XY,
00172     SYMPL_INIT_XZ,
00174     SYMPL_INIT_YZ
00175   } InitialPlaneEnum;
00176   
00178   InitialPlaneEnum m_InitialPlane;
00179 
00181   void WriteDifference( UniformVolume::SmartConstPtr& originalVolume ) const;
00182 
00184   void WriteMirror( UniformVolume::SmartConstPtr& originalVolume ) const;
00185 
00187   void WriteMarkPlane( UniformVolume::SmartConstPtr& originalVolume ) const;
00188 
00190   void WriteAligned( UniformVolume::SmartConstPtr& originalVolume ) const;
00191 
00192 private:
00193   CommandLine m_CommandLine;
00194 };
00195 
00196 } // namespace cmtk
00197 
00198 #endif // #ifndef  __cmtkImageSymmetryPlaneCommandLineBase_h_included_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines