SimpleITK  1.2.4
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
itk::simple::ImportImageFilter Class Reference

Compose a 2D or 3D image and return a smart pointer to a SimpleITK image. More...

#include <sitkImportImageFilter.h>

+ Inheritance diagram for itk::simple::ImportImageFilter:
+ Collaboration diagram for itk::simple::ImportImageFilter:

Public Types

typedef ImportImageFilter Self
 
- Public Types inherited from itk::simple::ImageReaderBase
typedef ImageReaderBase Self
 
- Public Types inherited from itk::simple::ProcessObject
typedef ProcessObject Self
 

Public Member Functions

Image Execute ()
 
const std::vector< double > & GetDirection () const
 
virtual std::string GetName () const
 
const std::vector< double > & GetOrigin () const
 
const std::vector< unsigned int > & GetSize () const
 
const std::vector< double > & GetSpacing () const
 
 ImportImageFilter ()
 
SelfSetBufferAsDouble (double *buffer, unsigned int numberOfComponents=1)
 
SelfSetBufferAsFloat (float *buffer, unsigned int numberOfComponents=1)
 
SelfSetBufferAsInt16 (int16_t *buffer, unsigned int numberOfComponents=1)
 
SelfSetBufferAsInt32 (int32_t *buffer, unsigned int numberOfComponents=1)
 
SelfSetBufferAsInt64 (int64_t *buffer, unsigned int numberOfComponents=1)
 
SelfSetBufferAsInt8 (int8_t *buffer, unsigned int numberOfComponents=1)
 
SelfSetBufferAsUInt16 (uint16_t *buffer, unsigned int numberOfComponents=1)
 
SelfSetBufferAsUInt32 (uint32_t *buffer, unsigned int numberOfComponents=1)
 
SelfSetBufferAsUInt64 (uint64_t *buffer, unsigned int numberOfComponents=1)
 
SelfSetBufferAsUInt8 (uint8_t *buffer, unsigned int numberOfComponents=1)
 
SelfSetDirection (const std::vector< double > &direction)
 
SelfSetOrigin (const std::vector< double > &origin)
 
SelfSetSize (const std::vector< unsigned int > &size)
 
SelfSetSpacing (const std::vector< double > &spacing)
 
virtual std::string ToString () const
 
virtual ~ImportImageFilter ()
 
- Public Member Functions inherited from itk::simple::ImageReaderBase
virtual std::vector< std::string > GetRegisteredImageIOs () const
 Get a vector of the names of registered itk ImageIOs. More...
 
 ImageReaderBase ()
 
virtual ~ImageReaderBase ()
 
SelfSetOutputPixelType (PixelIDValueEnum pixelID)
 Set/Get The output PixelType of the image. More...
 
PixelIDValueEnum GetOutputPixelType (void) const
 Set/Get The output PixelType of the image. More...
 
virtual SelfSetLoadPrivateTags (bool loadPrivateTags)
 Set/Get loading private DICOM tags into Image's MetaData. More...
 
virtual bool GetLoadPrivateTags () const
 Set/Get loading private DICOM tags into Image's MetaData. More...
 
virtual void LoadPrivateTagsOn ()
 Set/Get loading private DICOM tags into Image's MetaData. More...
 
virtual void LoadPrivateTagsOff ()
 Set/Get loading private DICOM tags into Image's MetaData. More...
 
virtual SelfSetImageIO (const std::string &imageio)
 Set/Get name of ImageIO to use. More...
 
virtual std::string GetImageIO (void) const
 Set/Get name of ImageIO to use. More...
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual float GetProgress () const
 An Active Measurement of the progress of execution. More...
 
virtual bool HasCommand (itk::simple::EventEnum event) const
 Query of this object has any registered commands for event. More...
 
 ProcessObject ()
 
virtual void RemoveAllCommands ()
 Remove all registered commands. More...
 
virtual ~ProcessObject ()
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
virtual bool GetDebug () const
 
virtual void SetDebug (bool debugFlag)
 
virtual void SetNumberOfThreads (unsigned int n)
 
virtual unsigned int GetNumberOfThreads () const
 

Protected Member Functions

template<class TImageType >
Image ExecuteInternal (void)
 
template<class TImageType >
DisableIf< IsVector< TImageType >::Value >::Type SetNumberOfComponentsOnImage (TImageType *)
 
template<class TImageType >
EnableIf< IsVector< TImageType >::Value >::Type SetNumberOfComponentsOnImage (TImageType *)
 
- Protected Member Functions inherited from itk::simple::ImageReaderBase
unsigned int GetDimensionFromImageIO (const std::string &fileName, unsigned int i)
 
unsigned int GetDimensionFromImageIO (const itk::ImageIOBase *iobase, unsigned int i)
 
itk::SmartPointer< ImageIOBaseGetImageIOBase (const std::string &fileName)
 
void GetPixelIDFromImageIO (const std::string &fileName, PixelIDValueType &outPixelType, unsigned int &outDimensions)
 
void GetPixelIDFromImageIO (const itk::ImageIOBase *iobase, PixelIDValueType &outPixelType, unsigned int &outDimensions)
 
- Protected Member Functions inherited from itk::simple::ProcessObject
virtual unsigned long AddITKObserver (const itk::EventObject &, itk::Command *)
 
virtual itk::ProcessObjectGetActiveProcess ()
 
virtual void OnActiveProcessDelete ()
 
virtual void onCommandDelete (const itk::simple::Command *cmd) SITK_NOEXCEPT
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
 

Private Types

typedef Image(Self::* MemberFunctionType) (void)
 

Private Attributes

void * m_Buffer
 
std::vector< double > m_Direction
 
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
unsigned int m_NumberOfComponentsPerPixel
 
std::vector< double > m_Origin
 
PixelIDValueType m_PixelIDValue
 
std::vector< unsigned int > m_Size
 
std::vector< double > m_Spacing
 

Friends

struct detail::MemberFunctionAddressor< MemberFunctionType >
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::simple::ProcessObject
static bool GetGlobalDefaultDebug ()
 
static void GlobalDefaultDebugOff ()
 
static void GlobalDefaultDebugOn ()
 
static void SetGlobalDefaultDebug (bool debugFlag)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 
static double GetGlobalDefaultCoordinateTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultCoordinateTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static double GetGlobalDefaultDirectionTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultDirectionTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *img)
 
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
static const itk::EventObjectGetITKEventObject (EventEnum e)
 
template<typename T >
static std::ostream & ToStringHelper (std::ostream &os, const T &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const signed char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const unsigned char &v)
 

Detailed Description

Compose a 2D or 3D image and return a smart pointer to a SimpleITK image.

This filter is intended to interface SimpleITK to other image processing libraries and applications that may have their own representation of an image class. It creates a SimpleITK image which shares the bulk data buffer as what is set. SimpleITK will not responsible to delete the buffer afterwards, and it buffer must remain valid while in use.

See also
itk::simple::ImportAsInt8, itk::simple::ImportAsUInt8, itk::simple::ImportAsInt16, itk::simple::ImportAsUInt16, itk::simple::ImportAsInt32, itk::simple::ImportAsUInt32, itk::simple::ImportAsInt64, itk::simple::ImportAsUInt64, itk::simple::ImportAsFloat,itk::simple::ImportAsDouble for the procedural interfaces.
Examples:
BufferImportExport.cxx.

Definition at line 47 of file sitkImportImageFilter.h.

Member Typedef Documentation

typedef Image(Self::* itk::simple::ImportImageFilter::MemberFunctionType) (void)
private

Definition at line 105 of file sitkImportImageFilter.h.

Definition at line 50 of file sitkImportImageFilter.h.

Constructor & Destructor Documentation

virtual itk::simple::ImportImageFilter::~ImportImageFilter ( )
virtual
itk::simple::ImportImageFilter::ImportImageFilter ( )

Member Function Documentation

Image itk::simple::ImportImageFilter::Execute ( )
virtual
template<class TImageType >
Image itk::simple::ImportImageFilter::ExecuteInternal ( void  )
protected
const std::vector< double >& itk::simple::ImportImageFilter::GetDirection ( ) const
virtual std::string itk::simple::ImportImageFilter::GetName ( ) const
inlinevirtual

return user readable name of the filter

Implements itk::simple::ProcessObject.

Definition at line 60 of file sitkImportImageFilter.h.

const std::vector< double >& itk::simple::ImportImageFilter::GetOrigin ( ) const
const std::vector< unsigned int >& itk::simple::ImportImageFilter::GetSize ( ) const
const std::vector< double >& itk::simple::ImportImageFilter::GetSpacing ( ) const
Self& itk::simple::ImportImageFilter::SetBufferAsDouble ( double *  buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetBufferAsFloat ( float *  buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetBufferAsInt16 ( int16_t buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetBufferAsInt32 ( int32_t buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetBufferAsInt64 ( int64_t buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetBufferAsInt8 ( int8_t buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetBufferAsUInt16 ( uint16_t buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetBufferAsUInt32 ( uint32_t buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetBufferAsUInt64 ( uint64_t buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetBufferAsUInt8 ( uint8_t buffer,
unsigned int  numberOfComponents = 1 
)
Self& itk::simple::ImportImageFilter::SetDirection ( const std::vector< double > &  direction)
template<class TImageType >
DisableIf<IsVector<TImageType>::Value>::Type itk::simple::ImportImageFilter::SetNumberOfComponentsOnImage ( TImageType *  )
inlineprotected

Definition at line 97 of file sitkImportImageFilter.h.

template<class TImageType >
EnableIf<IsVector<TImageType>::Value>::Type itk::simple::ImportImageFilter::SetNumberOfComponentsOnImage ( TImageType *  )
protected
Self& itk::simple::ImportImageFilter::SetOrigin ( const std::vector< double > &  origin)
Self& itk::simple::ImportImageFilter::SetSize ( const std::vector< unsigned int > &  size)
Self& itk::simple::ImportImageFilter::SetSpacing ( const std::vector< double > &  spacing)
virtual std::string itk::simple::ImportImageFilter::ToString ( ) const
virtual

Print ourselves to string

Reimplemented from itk::simple::ImageReaderBase.

Friends And Related Function Documentation

Definition at line 108 of file sitkImportImageFilter.h.

Member Data Documentation

void* itk::simple::ImportImageFilter::m_Buffer
private

Definition at line 119 of file sitkImportImageFilter.h.

std::vector< double > itk::simple::ImportImageFilter::m_Direction
private

Definition at line 117 of file sitkImportImageFilter.h.

nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::ImportImageFilter::m_MemberFactory
private

Definition at line 109 of file sitkImportImageFilter.h.

unsigned int itk::simple::ImportImageFilter::m_NumberOfComponentsPerPixel
private

Definition at line 111 of file sitkImportImageFilter.h.

std::vector< double > itk::simple::ImportImageFilter::m_Origin
private

Definition at line 114 of file sitkImportImageFilter.h.

PixelIDValueType itk::simple::ImportImageFilter::m_PixelIDValue
private

Definition at line 112 of file sitkImportImageFilter.h.

std::vector< unsigned int > itk::simple::ImportImageFilter::m_Size
private

Definition at line 116 of file sitkImportImageFilter.h.

std::vector< double > itk::simple::ImportImageFilter::m_Spacing
private

Definition at line 115 of file sitkImportImageFilter.h.


The documentation for this class was generated from the following file: