Slicer
4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
TimeSeriesDatabase transforms a series of images stored on disk into a high performance database. More...
#include <Libs/vtkITK/itkTimeSeriesDatabase.h>
Classes | |
struct | CacheBlock |
our cache More... | |
Public Types | |
typedef Array< TPixel > | ArrayType |
typedef SmartPointer< const Self > | ConstPointer |
typedef WeakPointer< const Self > | ConstWeakPointer |
typedef Image< TPixel, 3 > | OutputImageType |
typedef OutputImageType::Pointer | OutputImageTypePointer |
typedef Image< TPixel, 2 > | OutputSliceType |
typedef OutputSliceType::Pointer | OutputSliceTypePointer |
typedef SmartPointer< Self > | Pointer |
typedef TimeSeriesDatabase | Self |
typedef ImageSource< Image< TPixel, 3 > > | Superclass |
Public Member Functions | |
void | Connect (const char *filename) |
void | Disconnect () |
virtual void | GenerateData (void) ITK_OVERRIDE |
virtual void | GenerateOutputInformation (void) ITK_OVERRIDE |
float | GetCacheSizeInMiB () |
int | GetNumberOfVolumes () |
void | GetVoxelTimeSeries (typename OutputImageType::IndexType idx, ArrayType &array) |
itkGetMacro (CurrentImage, unsigned int) | |
itkGetMacro (OutputSpacing, typename OutputImageType::SpacingType) | |
itkGetMacro (OutputRegion, typename OutputImageType::RegionType) | |
itkGetMacro (OutputOrigin, typename OutputImageType::PointType) | |
itkGetMacro (OutputDirection, typename OutputImageType::DirectionType) | |
itkNewMacro (Self) | |
itkSetMacro (CurrentImage, unsigned int) | |
itkTypeMacro (TimeSeriesDatabase, ImageSource) | |
void | SetCacheSizeInMiB (float sz) |
Static Public Member Functions | |
static void | CreateFromFileArchetype (const char *filename, const char *archetype) |
static void | CreateFromFileArchetype (const char *filename, const char *archetype, unsigned long BlocksPerFile) |
Protected Types | |
typedef itk::TimeSeriesDatabaseHelper::counted_ptr< std::fstream > | StreamPtr |
Protected Member Functions | |
unsigned int | CalculateFileIndex (unsigned long Index) |
unsigned long | CalculateIndex (Size< 3 > Position, int ImageCount) |
bool | CalculateIntersection (Size< 3 > BlockIndex, typename OutputImageType::RegionType RequestedRegion, typename OutputImageType::RegionType &BlockRegion, typename OutputImageType::RegionType &ImageRegion) |
Return true if this is a full block, false otherwise. Assumes there is overlap! More... | |
CacheBlock * | GetCacheBlock (unsigned long index) |
bool | IsOpen () const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE |
TimeSeriesDatabase () | |
~TimeSeriesDatabase () | |
Static Protected Member Functions | |
static unsigned int | CalculateFileIndex (unsigned long Index, unsigned long BlocksPerFile) |
static unsigned long | CalculateIndex (Size< 3 > Position, int ImageCount, unsigned int BlocksPerImage[3]) |
static std::streampos | CalculatePosition (unsigned long index, unsigned long BlocksPerFile) |
Protected Attributes | |
unsigned long | m_BlocksPerFile |
Array< unsigned int > | m_BlocksPerImage |
TimeSeriesDatabaseHelper::LRUCache< unsigned long, CacheBlock > | m_Cache |
unsigned int | m_CurrentImage |
std::vector< std::string > | m_DatabaseFileNames |
std::vector< StreamPtr > | m_DatabaseFiles |
Array< unsigned int > | m_Dimensions |
std::string | m_Filename |
OutputImageType::DirectionType | m_OutputDirection |
OutputImageType::PointType | m_OutputOrigin |
OutputImageType::RegionType | m_OutputRegion |
OutputImageType::SpacingType | m_OutputSpacing |
Array< unsigned int > | m_PixelRemainder |
How many pixels are in the last block? More... | |
TimeSeriesDatabase transforms a series of images stored on disk into a high performance database.
The main idea behind TimeSeriesDatabase is to have a representation of a 4 dimensional dataset that is larger than main memory, but may still be accessed in a rapid manner. Though not strictly ITK conforming, this initial pass is strictly 4 dimensional datasets.
Definition at line 28 of file itkTimeSeriesDatabase.h.
typedef Array<TPixel> itk::TimeSeriesDatabase< TPixel >::ArrayType |
Definition at line 47 of file itkTimeSeriesDatabase.h.
typedef SmartPointer<const Self> itk::TimeSeriesDatabase< TPixel >::ConstPointer |
Definition at line 34 of file itkTimeSeriesDatabase.h.
typedef WeakPointer<const Self> itk::TimeSeriesDatabase< TPixel >::ConstWeakPointer |
Definition at line 35 of file itkTimeSeriesDatabase.h.
typedef Image<TPixel, 3> itk::TimeSeriesDatabase< TPixel >::OutputImageType |
Definition at line 43 of file itkTimeSeriesDatabase.h.
typedef OutputImageType::Pointer itk::TimeSeriesDatabase< TPixel >::OutputImageTypePointer |
Definition at line 44 of file itkTimeSeriesDatabase.h.
typedef Image<TPixel, 2> itk::TimeSeriesDatabase< TPixel >::OutputSliceType |
Definition at line 45 of file itkTimeSeriesDatabase.h.
typedef OutputSliceType::Pointer itk::TimeSeriesDatabase< TPixel >::OutputSliceTypePointer |
Definition at line 46 of file itkTimeSeriesDatabase.h.
typedef SmartPointer<Self> itk::TimeSeriesDatabase< TPixel >::Pointer |
Definition at line 33 of file itkTimeSeriesDatabase.h.
typedef TimeSeriesDatabase itk::TimeSeriesDatabase< TPixel >::Self |
Definition at line 31 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 118 of file itkTimeSeriesDatabase.h.
typedef ImageSource<Image<TPixel,3> > itk::TimeSeriesDatabase< TPixel >::Superclass |
Definition at line 32 of file itkTimeSeriesDatabase.h.
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
staticprotected |
|
protected |
Return true if this is a full block, false otherwise. Assumes there is overlap!
|
staticprotected |
void itk::TimeSeriesDatabase< TPixel >::Connect | ( | const char * | filename | ) |
Connect to an existing TimeSeriesDatabase file on disk The idea behind the Connect method is to associate this class with a pre-existing self-describing file containing a 4-dimensional dataset that is indexed for rapid retrieval.
|
static |
Create a new TimeSeriesDatabase from an Archetype filename Find all the volumes matching the archetype pattern, loading and checking that they are all the same size. Write the data into a series of files. The default filesize is 1 GiB, but may be changed using the overloaded method. A call to Connect in required to open the newly created TimeSeriesDatabase.
|
static |
void itk::TimeSeriesDatabase< TPixel >::Disconnect | ( | ) |
Disconnect from a TimeSeriesDatabase file Essentially closes the file and returns the object to its original state.
|
virtual |
|
virtual |
Standard method for a ImageSource object
|
protected |
float itk::TimeSeriesDatabase< TPixel >::GetCacheSizeInMiB | ( | ) |
Get the size of the cache in MiB (1 MiB = 2^20 bytes)
|
inline |
Return information about the TimeSeriesDatabase file
Definition at line 81 of file itkTimeSeriesDatabase.h.
void itk::TimeSeriesDatabase< TPixel >::GetVoxelTimeSeries | ( | typename OutputImageType::IndexType | idx, |
ArrayType & | array | ||
) |
A convenience method for reading a voxel's time course Subsequent calls to voxels in the immediate region of this will be cached for quick access
|
protected |
itk::TimeSeriesDatabase< TPixel >::itkGetMacro | ( | CurrentImage | , |
unsigned | int | ||
) |
itk::TimeSeriesDatabase< TPixel >::itkGetMacro | ( | OutputSpacing | , |
typename OutputImageType::SpacingType | |||
) |
itk::TimeSeriesDatabase< TPixel >::itkGetMacro | ( | OutputRegion | , |
typename OutputImageType::RegionType | |||
) |
itk::TimeSeriesDatabase< TPixel >::itkGetMacro | ( | OutputOrigin | , |
typename OutputImageType::PointType | |||
) |
itk::TimeSeriesDatabase< TPixel >::itkGetMacro | ( | OutputDirection | , |
typename OutputImageType::DirectionType | |||
) |
itk::TimeSeriesDatabase< TPixel >::itkNewMacro | ( | Self | ) |
Method for creation through the object factory.
itk::TimeSeriesDatabase< TPixel >::itkSetMacro | ( | CurrentImage | , |
unsigned | int | ||
) |
Set the image to be read when GenerateData is called. This method selects the image to be returned by an Update call. By changing the CurrentImage, a pipeline can process each image in the series one after another.
itk::TimeSeriesDatabase< TPixel >::itkTypeMacro | ( | TimeSeriesDatabase< TPixel > | , |
ImageSource | |||
) |
Run-time type information (and related methods).
|
protectedvirtual |
void itk::TimeSeriesDatabase< TPixel >::SetCacheSizeInMiB | ( | float | sz | ) |
Set the size of the cache in MiB (1 MiB = 2^20 bytes)
|
protected |
Definition at line 141 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 111 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 148 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 137 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 140 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 139 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 110 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 136 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 116 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 115 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 114 of file itkTimeSeriesDatabase.h.
|
protected |
Definition at line 113 of file itkTimeSeriesDatabase.h.
|
protected |
How many pixels are in the last block?
Definition at line 134 of file itkTimeSeriesDatabase.h.