Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkITKTimeSeriesDatabase.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: vtkITK
9  Module: $HeadURL: http://svn.slicer.org/Slicer4/trunk/Libs/vtkITK/vtkITKArchetypeImageSeriesReader.h $
10  Date: $Date: 2008-03-11 13:22:52 -0500 (Tue, 11 Mar 2008) $
11  Version: $Revision: 6159 $
12 
13 ==========================================================================*/
14 
15 #ifndef __vtkITKTimeSeriesDatabase_h
16 #define __vtkITKTimeSeriesDatabase_h
17 
18 #include <vector>
19 
20 #include "vtkImageData.h"
21 #include "vtkPointData.h"
22 #include "vtkImageAlgorithm.h"
23 #include "itkTimeSeriesDatabase.h"
24 #include "vtkImageImport.h"
25 #include "itkVTKImageExport.h"
26 #include <vtkVersion.h>
27 
28 #include "vtkITK.h"
29 #include "vtkITKUtility.h"
30 
41 class VTK_ITK_EXPORT vtkITKTimeSeriesDatabase : public vtkImageAlgorithm
42 {
43 public:
45  static vtkITKTimeSeriesDatabase *New();
46  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE{ Superclass::PrintSelf(os, indent);}
47  vtkTypeMacro(vtkITKTimeSeriesDatabase,vtkImageAlgorithm);
48 
49 public:
51  static void CreateFromFileArchetype ( const char* TSDFilename, const char* ArchetypeFilename )
52  {
54  };
55 
59 
61  void SetCurrentImage ( unsigned int value )
62  { DelegateITKInputMacro ( SetCurrentImage, value); };
63  unsigned int GetCurrentImage ( unsigned int vtkNotUsed(value) )
64  { DelegateITKOutputMacro ( GetCurrentImage ); };
65 
67  { DelegateITKOutputMacro ( GetNumberOfVolumes ); };
68 
69 protected:
71  {
72  m_Filter = SourceType::New();
73  this->itkExporter = ImageExportType::New();
74  this->vtkImporter = vtkImageImport::New();
75  ConnectPipelines ( this->itkExporter, this->vtkImporter );
76  this->itkExporter->SetInput ( m_Filter->GetOutput() );
77  };
79  {
80  this->vtkImporter->Delete();
81  }
82  typedef short InputImagePixelType;
83  typedef short OutputImagePixelType;
84  typedef itk::Image<OutputImagePixelType, 3> OutputImageType;
85  typedef itk::VTKImageExport<OutputImageType> ImageExportType;
87  typedef SourceType ImageFilterType;
88 
90  ImageExportType::Pointer itkExporter;
91  vtkImageImport* vtkImporter;
92 
93  virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
95  virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo) VTK_OVERRIDE;
96 
97 private:
99  void operator=(const vtkITKTimeSeriesDatabase&);
100 
101 };
102 
103 #endif
SmartPointer< Self > Pointer
void ConnectPipelines(ITK_Exporter exporter, VTK_Importer *importer)
Definition: vtkITKUtility.h:26
#define DelegateITKInputMacro(name, arg)
Definition: vtkITKUtility.h:65
static void CreateFromFileArchetype(const char *filename, const char *archetype)
itk::TimeSeriesDatabase< OutputImagePixelType > SourceType
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
itk::Image< OutputImagePixelType, 3 > OutputImageType
static void CreateFromFileArchetype(const char *TSDFilename, const char *ArchetypeFilename)
Create a TimeSeriesDatabase from a series of volumes.
Effeciently process large datasets in small memory.
#define DelegateITKOutputMacro(name)
Definition: vtkITKUtility.h:77
TimeSeriesDatabase transforms a series of images stored on disk into a high performance database...
ImageExportType::Pointer itkExporter
itk::VTKImageExport< OutputImageType > ImageExportType
unsigned int GetCurrentImage(unsigned int vtkNotUsed(value))
void SetCurrentImage(unsigned int value)
Get/Set the current time stamp to read.