SimpleITK  1.0.1
sitkImageSeriesReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef sitkImageSeriesReader_h
19 #define sitkImageSeriesReader_h
20 
21 #include "sitkMacro.h"
22 #include "sitkImage.h"
23 #include "sitkImageReaderBase.h"
25 
26 namespace itk {
27  namespace simple {
28 
35  : public ImageReaderBase
36  {
37  public:
39 
41 
43  virtual std::string ToString() const;
44 
46  virtual std::string GetName() const { return std::string("ImageSeriesReader"); }
47 
65  static std::vector<std::string> GetGDCMSeriesFileNames( const std::string &directory,
66  const std::string &seriesID = "",
67  bool useSeriesDetails = false,
68  bool recursive = false,
69  bool loadSequences = false );
70 
76  static std::vector<std::string> GetGDCMSeriesIDs( const std::string &directory );
77 
78  SITK_RETURN_SELF_TYPE_HEADER SetFileNames ( const std::vector<std::string> &fileNames );
79  const std::vector<std::string> &GetFileNames() const;
80 
81  Image Execute();
82 
83  protected:
84 
85  template <class TImageType> Image ExecuteInternal ( itk::ImageIOBase * );
86 
87  private:
88 
89  // function pointer type
90  typedef Image (Self::*MemberFunctionType)( itk::ImageIOBase * );
91 
92  // friend to get access to executeInternal member
93  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
94  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
95 
96  std::vector<std::string> m_FileNames;
97  };
98 
114  SITKIO_EXPORT Image ReadImage ( const std::vector<std::string> &fileNames, PixelIDValueEnum outputPixelType=sitkUnknown );
115  }
116 }
117 
118 #endif
An abract base class for image readers.
PixelIDValueEnum
Enumerated values of pixelIDs.
Read series of image into a SimpleITK image.
std::vector< std::string > m_FileNames
virtual std::string GetName() const
SITKIO_EXPORT Image ReadImage(const std::string &filename, PixelIDValueEnum outputPixelType=sitkUnknown)
ReadImage is a procedural interface to the ImageFileReader class which is convenient for most image r...
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
#define SITKIO_EXPORT
Definition: sitkIO.h:34
The main Image class for SimpleITK.
Definition: sitkImage.h:54