GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
itkMegaCaptureReader.h
Go to the documentation of this file.
1 /*=========================================================================
2  Authors: The GoFigure Dev. Team.
3  at Megason Lab, Systems biology, Harvard Medical school, 2009-11
4 
5  Copyright (c) 2009-11, President and Fellows of Harvard College.
6  All rights reserved.
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are met:
10 
11  Redistributions of source code must retain the above copyright notice,
12  this list of conditions and the following disclaimer.
13  Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16  Neither the name of the President and Fellows of Harvard College
17  nor the names of its contributors may be used to endorse or promote
18  products derived from this software without specific prior written
19  permission.
20 
21  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
25  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 =========================================================================*/
34 
35 #ifndef __itkMegaCaptureReader_h
36 #define __itkMegaCaptureReader_h
37 
39 #include "itkLightProcessObject.h"
42 
43 #include "QGoIOConfigure.h"
44 
45 #include "vtkSmartPointer.h"
46 
47 class vtkImageData;
48 class vtkImageAppend;
49 
50 namespace itk
51 {
52 class QGOIO_EXPORT MegaCaptureReader:public LightProcessObject
53 {
54 public:
57  typedef LightProcessObject Superclass;
58  typedef SmartPointer< Self > Pointer;
59  typedef SmartPointer< const Self > ConstPointer;
60 
61  itkNewMacro(Self);
62 
63  itkTypeMacro(MegaCaptureReader, LightProcessObject);
64 
66  void SetInput(const GoFigureFileInfoHelperMultiIndexContainer & UserFileList);
67 
68  void SetMegaCaptureHeader(const std::string & iHeader);
69 
71  itkSetMacro(FileType, GoFigure::FileType);
72  itkSetMacro(TimeBased, bool);
73 
74  void SetTimePoint(const unsigned int & iTm);
75 
76  itkGetConstMacro(UpdateTimePoint, unsigned int);
77 
78  itkGetConstMacro(MinTimePoint, unsigned int);
79  itkGetConstMacro(MaxTimePoint, unsigned int);
80 
81  itkGetConstMacro(TimeInterval, unsigned int);
82 
83  void SetZSlice(const unsigned int & iZs);
84 
85  itkGetConstMacro(UpdateZSlice, unsigned int);
86 
87  itkGetConstMacro(MinZSlice, unsigned int);
88  itkGetConstMacro(MaxZSlice, unsigned int);
89 
90  itkGetConstMacro(MinChannel, unsigned int);
91  itkGetConstMacro(MaxChannel, unsigned int);
92 
93  void Update();
94 
95  vtkSmartPointer<vtkImageData> GetOutput(const unsigned int & iChannel);
96 
97  vtkSmartPointer<vtkImageData> GetImage( const unsigned int & iChannel,
98  const unsigned int & iT );
99 
100  std::map< unsigned int, vtkImageData * > GetOutputs();
101 
102  std::vector< std::vector< int > > GetChannelColor();
103 
104 protected:
107 
108  void ComputeBounds();
109  void AddToVTKVolumeBuilder( const int& iCounter,
110  const std::string& iFileName,
111  vtkImageAppend * iBuilder );
112 
113  std::map< unsigned int, vtkImageData * > m_OutputImageMap;
117 
118  std::vector< std::vector< int > > m_ChannelColor;
119 
120  unsigned int m_MinTimePoint;
121  unsigned int m_MaxTimePoint;
122  unsigned int m_UpdateTimePoint;
123  unsigned int m_TimeInterval;
124 
125  unsigned int m_MinZSlice;
126  unsigned int m_MaxZSlice;
127  unsigned int m_UpdateZSlice;
128 
129  unsigned int m_MinChannel;
130  unsigned int m_MaxChannel;
131 
134 
135 private:
136  MegaCaptureReader(const Self &);
137  void operator=(const Self &);
138 };
139 }
140 #endif
MegaCaptureHeaderReader * m_HeaderReader
SmartPointer< const Self > ConstPointer
std::map< unsigned int, vtkImageData * > m_OutputImageMap
LightProcessObject Superclass
SmartPointer< Self > Pointer
boost::multi_index::multi_index_container< GoFigureFileInfoHelper, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_PCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_RCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_CCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_XTileCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_YTileCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_ZTileCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_ZCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_Channel >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_TCoord >, > >> GoFigureFileInfoHelperMultiIndexContainer
GoFigureFileInfoHelperMultiIndexContainer m_FileList
std::vector< std::vector< int > > m_ChannelColor
GoFigure::FileType m_FileType