cmtkStudy.h

Go to the documentation of this file.
00001 /*
00002 //
00003 //  Copyright 1997-2009 Torsten Rohlfing
00004 //
00005 //  Copyright 2004-2011 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: 2752 $
00026 //
00027 //  $LastChangedDate: 2011-01-17 11:33:31 -0800 (Mon, 17 Jan 2011) $
00028 //
00029 //  $LastChangedBy: torstenrohlfing $
00030 //
00031 */
00032 
00033 #ifndef __cmtkStudy_h_included_
00034 #define __cmtkStudy_h_included_
00035 
00036 #include <cmtkconfig.h>
00037 
00038 #include <Base/cmtkMacros.h>
00039 #include <Base/cmtkVolume.h>
00040 #include <Base/cmtkUniformVolume.h>
00041 #include <Base/cmtkAffineXform.h>
00042 #include <Base/cmtkWarpXform.h>
00043 #include <Base/cmtkLandmarkList.h>
00044 #include <Base/cmtkSegmentationLabel.h>
00045 
00046 #include <IO/cmtkFileFormat.h>
00047 
00048 namespace
00049 cmtk
00050 {
00051 
00054 
00057 enum
00058 {
00060   PALETTE_GRAY = 0,
00062   PALETTE_RED = 1,
00064   PALETTE_GREEN = 2,
00066   PALETTE_BLUE = 3,
00068   PALETTE_RAINBOW = 4,
00070   PALETTE_LABELS = 5
00071 };
00072 
00075 class Study
00076 {
00078   cmtkGetSetMacroString(FileSystemPath);
00079 
00081   cmtkGetSetMacroString(Name);
00082 
00084   cmtkGetSetMacroString(Description);
00085 
00087   cmtkGetSetMacroString(Modality);
00088 
00090   cmtkGetSetMacro(UniformVolume::SmartPtr,Volume);
00091 
00093   cmtkGetSetMacro(LandmarkList::SmartPtr,LandmarkList);
00094 
00096   DataGrid::IndexType m_Dims;
00097 
00099   cmtkGetSetMacro3Array(Types::Coordinate,Calibration);
00100 
00102   cmtkGetSetMacro(Types::DataItem,MinimumValue);
00103 
00105   cmtkGetSetMacro(Types::DataItem,MaximumValue);
00106 
00108   cmtkGetSetMacro(bool,Padding);
00109 
00111   cmtkGetSetMacro(Types::DataItem,PaddingValue);
00112 
00114   cmtkGetSetMacro(bool,HaveUserColorMap);
00115 
00117   cmtkGetSetMacro(char,StandardColormap);
00118 
00120   cmtkGetSetMacro(bool,ReverseColormap);
00121 
00123   cmtkGetSetMacro(Types::DataItem,Black);
00124 
00126   cmtkGetSetMacro(Types::DataItem,White);
00127 
00129   cmtkGetSetMacro(double,Gamma);
00130 
00132   cmtkGetSetMacro(unsigned int,DisplayedImageIndex);
00133 
00135   cmtkGetSetMacro(unsigned int,ZoomFactor);
00136 
00138   cmtkGetSetMacro(int,SliceNormal);
00139 
00140 public:
00142   typedef SmartPointer<Study> SmartPtr;
00143 
00145   Study();
00146 
00148   Study( const char* fileSystemPath, const char* name = NULL );
00149 
00151   virtual ~Study();
00152 
00154   virtual void UpdateFromVolume();
00155 
00163   virtual bool ReadVolume( const bool reRead = false, const char* orientation = NULL );
00164 
00170   const char* SetMakeName( const char* name = NULL , const int suffix = 0  );
00171 
00173   static Study* Read( const char* path );
00174 
00177   virtual void CopyColormap( const Study* other );
00178 
00181   void SetFromLabelMap( const SegmentationLabelMap& lblMap ) 
00182   {
00183     this->m_HaveUserColorMap = true;
00184     UserLabelMap = lblMap;
00185   }
00186 
00188   const SegmentationLabelMap& GetUserLabelMap() const 
00189   {
00190     return UserLabelMap; 
00191   }
00192   
00193 private:
00195   SegmentationLabelMap UserLabelMap;
00196 };
00197 
00199 
00200 } // namespace cmtk
00201 
00202 #endif // #ifndef __cmtkStudy_h_included_
00203 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines