Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::RandomImageSource< TOutputImage > Class Template Reference
[Data Sources]

Generate an n-dimensional image of random pixel values. More...

#include <itkRandomImageSource.h>

Inheritance diagram for itk::RandomImageSource< TOutputImage >:

Inheritance graph
[legend]
Collaboration diagram for itk::RandomImageSource< TOutputImage >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef RandomImageSource Self
typedef ImageSource< TOutputImage > Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef TOutputImage::PixelType OutputImagePixelType
typedef TOutputImage::RegionType OutputImageRegionType

Public Member Functions

virtual const char * GetClassName () const
virtual void SetSize (unsigned long data[])
virtual unsigned long * GetSize () const
virtual void SetSpacing (float data[])
virtual float * GetSpacing () const
virtual void SetOrigin (float data[])
virtual float * GetOrigin () const
virtual void SetMin (OutputImagePixelType _arg)
virtual OutputImagePixelType GetMin ()
virtual void SetMax (OutputImagePixelType _arg)
virtual OutputImagePixelType GetMax ()

Static Public Member Functions

Pointer New ()

Protected Member Functions

 RandomImageSource ()
 ~RandomImageSource ()
void PrintSelf (std::ostream &os, Indent indent) const
virtual void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int threadId)
virtual void GenerateOutputInformation ()

Detailed Description

template<typename TOutputImage>
class itk::RandomImageSource< TOutputImage >

Generate an n-dimensional image of random pixel values.

RandomImageSource generates an image of random pixel values. This filter uses an inline random number generator since the library drand48, although thread-safe, is very slow in a threaded environment. The output image may be of any dimension.

Definition at line 40 of file itkRandomImageSource.h.


Member Typedef Documentation

template<typename TOutputImage>
typedef SmartPointer<const Self> itk::RandomImageSource< TOutputImage >::ConstPointer
 

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 47 of file itkRandomImageSource.h.

template<typename TOutputImage>
typedef TOutputImage::PixelType itk::RandomImageSource< TOutputImage >::OutputImagePixelType
 

Typedef for the output image PixelType.

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 50 of file itkRandomImageSource.h.

template<typename TOutputImage>
typedef TOutputImage::RegionType itk::RandomImageSource< TOutputImage >::OutputImageRegionType
 

Typedef to describe the output image region type.

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 53 of file itkRandomImageSource.h.

template<typename TOutputImage>
typedef SmartPointer<Self> itk::RandomImageSource< TOutputImage >::Pointer
 

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 46 of file itkRandomImageSource.h.

template<typename TOutputImage>
typedef RandomImageSource itk::RandomImageSource< TOutputImage >::Self
 

Standard class typedefs.

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 44 of file itkRandomImageSource.h.

template<typename TOutputImage>
typedef ImageSource<TOutputImage> itk::RandomImageSource< TOutputImage >::Superclass
 

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 45 of file itkRandomImageSource.h.


Constructor & Destructor Documentation

template<typename TOutputImage>
itk::RandomImageSource< TOutputImage >::RandomImageSource  )  [protected]
 

template<typename TOutputImage>
itk::RandomImageSource< TOutputImage >::~RandomImageSource  )  [protected]
 


Member Function Documentation

template<typename TOutputImage>
virtual void itk::RandomImageSource< TOutputImage >::GenerateOutputInformation  )  [protected, virtual]
 

Generate the information decribing the output data. The default implementation of this method will copy information from the input to the output. A filter may override this method if its output will have different information than its input. For instance, a filter that shrinks an image will need to provide an implementation for this method that changes the spacing of the pixels. Such filters should call their superclass' implementation of this method prior to changing the information values they need (i.e. GenerateOutputInformation() should call Superclass::GenerateOutputInformation() prior to changing the information.

Reimplemented from itk::ProcessObject.

template<typename TOutputImage>
virtual const char* itk::RandomImageSource< TOutputImage >::GetClassName  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::ImageSource< TOutputImage >.

template<typename TOutputImage>
virtual OutputImagePixelType itk::RandomImageSource< TOutputImage >::GetMax  )  [virtual]
 

Get the maximum possible pixel value.

template<typename TOutputImage>
virtual OutputImagePixelType itk::RandomImageSource< TOutputImage >::GetMin  )  [virtual]
 

Get the minimum possible pixel value.

template<typename TOutputImage>
virtual float* itk::RandomImageSource< TOutputImage >::GetOrigin  )  const [virtual]
 

Get the origin of the output image.

template<typename TOutputImage>
virtual unsigned long* itk::RandomImageSource< TOutputImage >::GetSize  )  const [virtual]
 

Get the size of the output image.

template<typename TOutputImage>
virtual float* itk::RandomImageSource< TOutputImage >::GetSpacing  )  const [virtual]
 

Get the spacing of the output image.

template<typename TOutputImage>
Pointer itk::RandomImageSource< TOutputImage >::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::Object.

template<typename TOutputImage>
void itk::RandomImageSource< TOutputImage >::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::ProcessObject.

template<typename TOutputImage>
virtual void itk::RandomImageSource< TOutputImage >::SetMax OutputImagePixelType  _arg  )  [virtual]
 

Set the maximum possible pixel value. By default, it is NumericTraits<TOutputImage::PixelType>::max().

template<typename TOutputImage>
virtual void itk::RandomImageSource< TOutputImage >::SetMin OutputImagePixelType  _arg  )  [virtual]
 

Set the minimum possible pixel value. By default, it is NumericTraits<TOutputImage::PixelType>::min().

template<typename TOutputImage>
virtual void itk::RandomImageSource< TOutputImage >::SetOrigin float  data[]  )  [virtual]
 

Specify the origin of the output image.

template<typename TOutputImage>
virtual void itk::RandomImageSource< TOutputImage >::SetSize unsigned long  data[]  )  [virtual]
 

Specify the size of the output image.

template<typename TOutputImage>
virtual void itk::RandomImageSource< TOutputImage >::SetSpacing float  data[]  )  [virtual]
 

Specify the spacing of the output image.

template<typename TOutputImage>
virtual void itk::RandomImageSource< TOutputImage >::ThreadedGenerateData const OutputImageRegionType outputRegionForThread,
int  threadId
[protected, virtual]
 

If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). This superclass will automatically split the output image into a number of pieces, spawn multiple threads, and call ThreadedGenerateData() in each thread. Prior to spawning threads, the BeforeThreadedGenerateData() method is called. After all the threads have completed, the AfterThreadedGenerateData() method is called. If an image processing filter cannot support threading, that filter should provide an implementation of the GenerateData() method instead of providing an implementation of ThreadedGenerateData(). If a filter provides a GenerateData() method as its implementation, then the filter is responsible for allocating the output data. If a filter provides a ThreadedGenerateData() method as its implementation, then the output memory will allocated automatically by this superclass. The ThreadedGenerateData() method should only produce the output specified by "outputThreadRegion" parameter. ThreadedGenerateData() cannot write to any other portion of the output image (as this is responsibility of a different thread).

See also:
GenerateData(), SplitRequestedRegion()

Reimplemented from itk::ImageSource< TOutputImage >.


The documentation for this class was generated from the following file:
Generated at Sat Mar 31 02:49:47 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000