SimpleITK  2.0.0
Public Types | Public Member Functions | List of all members
itk::simple::ImageReaderBase Class Referenceabstract

An abract base class for image readers. More...

#include <sitkImageReaderBase.h>

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

Public Types

using Self = ImageReaderBase
 
- Public Types inherited from itk::simple::ProcessObject
using Self = ProcessObject
 

Public Member Functions

 ImageReaderBase ()
 
 ~ImageReaderBase () override
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, const std::function< void()> &func)
 Directly add a callback to observe an event. More...
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual std::string GetName () const =0
 
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
 
virtual void SetNumberOfWorkUnits (unsigned int n)
 
virtual unsigned int GetNumberOfWorkUnits () const
 
PixelIDValueEnum m_OutputPixelType
 Set/Get The output PixelType of the image. More...
 
bool m_LoadPrivateTags
 Set/Get The output PixelType of the image. More...
 
std::string m_ImageIOName
 Set/Get The output PixelType of the image. More...
 
SelfSetOutputPixelType (PixelIDValueEnum pixelID)
 Set/Get The output PixelType of the image. More...
 
PixelIDValueEnum GetOutputPixelType () const
 Set/Get The output PixelType of the image. More...
 
virtual Image Execute ()=0
 Set/Get The output PixelType of the image. More...
 
std::string ToString () const override
 Set/Get The output PixelType of the image. More...
 
virtual std::vector< std::string > GetRegisteredImageIOs () const
 Get a vector of the names of registered itk ImageIOs. More...
 
virtual SelfSetLoadPrivateTags (bool loadPrivateTags)
 Set/Get loading private DICOM tags into Image's MetaData. More...
 
virtual bool GetLoadPrivateTags () const
 Set/Get The output PixelType of the image. More...
 
virtual void LoadPrivateTagsOn ()
 Set/Get The output PixelType of the image. More...
 
virtual void LoadPrivateTagsOff ()
 Set/Get The output PixelType of the image. More...
 
virtual SelfSetImageIO (const std::string &imageio)
 Set/Get name of ImageIO to use. More...
 
virtual std::string GetImageIO () const
 Set/Get The output PixelType of the image. More...
 
static std::string GetImageIOFromFileName (const std::string &fileName)
 Get the automatic ImageIO from the ImageIOFactory. More...
 
itk::SmartPointer< ImageIOBaseGetImageIOBase (const std::string &fileName)
 Set/Get The output PixelType of the image. More...
 
void GetPixelIDFromImageIO (const std::string &fileName, PixelIDValueType &outPixelType, unsigned int &outDimensions)
 Set/Get The output PixelType of the image. More...
 
void GetPixelIDFromImageIO (const itk::ImageIOBase *iobase, PixelIDValueType &outPixelType, unsigned int &outDimensions)
 Set/Get The output PixelType of the image. More...
 
unsigned int GetDimensionFromImageIO (const std::string &fileName, unsigned int i)
 Set/Get The output PixelType of the image. More...
 
unsigned int GetDimensionFromImageIO (const itk::ImageIOBase *iobase, unsigned int i)
 Set/Get The output PixelType of the image. More...
 
PixelIDValueType ExecuteInternalReadScalar (int componentType)
 Set/Get The output PixelType of the image. More...
 
PixelIDValueType ExecuteInternalReadVector (int componentType)
 Set/Get The output PixelType of the image. More...
 
PixelIDValueType ExecuteInternalReadComplex (int componentType)
 Set/Get The output PixelType of the image. More...
 

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 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 bool SetGlobalDefaultThreader (const std::string &threader)
 Set/Get the default threader used for process objects. More...
 
static std::string GetGlobalDefaultThreader ()
 Set/Get the default threader used for process objects. More...
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 Set/Get the default threader used for process objects. More...
 
- 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) noexcept
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &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)
 
template<class TImageType >
static Image CastITKToImage (TImageType *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

An abract base class for image readers.

Definition at line 39 of file sitkImageReaderBase.h.

Member Typedef Documentation

◆ Self

Definition at line 43 of file sitkImageReaderBase.h.

Constructor & Destructor Documentation

◆ ~ImageReaderBase()

itk::simple::ImageReaderBase::~ImageReaderBase ( )
override

◆ ImageReaderBase()

itk::simple::ImageReaderBase::ImageReaderBase ( )

Member Function Documentation

◆ Execute()

virtual Image itk::simple::ImageReaderBase::Execute ( )
pure virtual

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

Implemented in itk::simple::ImageSeriesReader, itk::simple::ImportImageFilter, and itk::simple::ImageFileReader.

◆ ExecuteInternalReadComplex()

PixelIDValueType itk::simple::ImageReaderBase::ExecuteInternalReadComplex ( int  componentType)
private

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ ExecuteInternalReadScalar()

PixelIDValueType itk::simple::ImageReaderBase::ExecuteInternalReadScalar ( int  componentType)
private

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ ExecuteInternalReadVector()

PixelIDValueType itk::simple::ImageReaderBase::ExecuteInternalReadVector ( int  componentType)
private

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ GetDimensionFromImageIO() [1/2]

unsigned int itk::simple::ImageReaderBase::GetDimensionFromImageIO ( const itk::ImageIOBase iobase,
unsigned int  i 
)
protected

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ GetDimensionFromImageIO() [2/2]

unsigned int itk::simple::ImageReaderBase::GetDimensionFromImageIO ( const std::string &  fileName,
unsigned int  i 
)
protected

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ GetImageIO()

virtual std::string itk::simple::ImageReaderBase::GetImageIO ( ) const
virtual

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ GetImageIOBase()

itk::SmartPointer<ImageIOBase> itk::simple::ImageReaderBase::GetImageIOBase ( const std::string &  fileName)
protected

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ GetImageIOFromFileName()

static std::string itk::simple::ImageReaderBase::GetImageIOFromFileName ( const std::string &  fileName)
static

Get the automatic ImageIO from the ImageIOFactory.

Returns the name of ImageIO automatically detected to read the file. The file is required to exist, and the file may be opened and/or the file extension examined. If an error is encountered such as the file does not exist, then an empty string ("") will be returned.

◆ GetLoadPrivateTags()

virtual bool itk::simple::ImageReaderBase::GetLoadPrivateTags ( ) const
virtual

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ GetOutputPixelType()

PixelIDValueEnum itk::simple::ImageReaderBase::GetOutputPixelType ( ) const

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ GetPixelIDFromImageIO() [1/2]

void itk::simple::ImageReaderBase::GetPixelIDFromImageIO ( const itk::ImageIOBase iobase,
PixelIDValueType outPixelType,
unsigned int &  outDimensions 
)
protected

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ GetPixelIDFromImageIO() [2/2]

void itk::simple::ImageReaderBase::GetPixelIDFromImageIO ( const std::string &  fileName,
PixelIDValueType outPixelType,
unsigned int &  outDimensions 
)
protected

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ GetRegisteredImageIOs()

virtual std::vector<std::string> itk::simple::ImageReaderBase::GetRegisteredImageIOs ( ) const
virtual

Get a vector of the names of registered itk ImageIOs.

◆ LoadPrivateTagsOff()

virtual void itk::simple::ImageReaderBase::LoadPrivateTagsOff ( )
virtual

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ LoadPrivateTagsOn()

virtual void itk::simple::ImageReaderBase::LoadPrivateTagsOn ( )
virtual

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ SetImageIO()

virtual Self& itk::simple::ImageReaderBase::SetImageIO ( const std::string &  imageio)
virtual

Set/Get name of ImageIO to use.

An option to override the automatically detected ImageIO used to read the image. The available ImageIOs are listed by the GetRegisteredImageIOs method. If the ImageIO can not be constructed an exception will be generated. If the ImageIO can not read the file an exception will be generated.

The default value is an empty string (""). This indicates that the ImageIO will be automatically determined by the ITK ImageIO factory mechanism.

◆ SetLoadPrivateTags()

virtual Self& itk::simple::ImageReaderBase::SetLoadPrivateTags ( bool  loadPrivateTags)
virtual

Set/Get loading private DICOM tags into Image's MetaData.

Unknown private tags may be encoded with Base64 encoding.

◆ SetOutputPixelType()

Self& itk::simple::ImageReaderBase::SetOutputPixelType ( PixelIDValueEnum  pixelID)

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

◆ ToString()

std::string itk::simple::ImageReaderBase::ToString ( ) const
overridevirtual

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

Reimplemented from itk::simple::ProcessObject.

Reimplemented in itk::simple::ImportImageFilter, and itk::simple::ImageSeriesReader.

Member Data Documentation

◆ m_ImageIOName

std::string itk::simple::ImageReaderBase::m_ImageIOName
private

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

Definition at line 136 of file sitkImageReaderBase.h.

◆ m_LoadPrivateTags

bool itk::simple::ImageReaderBase::m_LoadPrivateTags
private

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

Definition at line 134 of file sitkImageReaderBase.h.

◆ m_OutputPixelType

PixelIDValueEnum itk::simple::ImageReaderBase::m_OutputPixelType
private

Set/Get The output PixelType of the image.

By default the value is sitkUnknown, which enable the output pixel type to be same as the file. If the pixel type is specified then the itk::ConvertPixelBuffer will be used to convert the pixels.

Definition at line 133 of file sitkImageReaderBase.h.


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