IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ImageFactory.h
1 // ImageFactory.h:
3 // ---------------
4 //
14 
15 #ifndef __IPSDKIMAGE_IMAGEFACTORY_H__
16 #define __IPSDKIMAGE_IMAGEFACTORY_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::image::ImageFactory::_defaultImageCreationFunction' : class 'boost::function<ipsdk::BoolResult (const ipsdk::image::BaseImageGeometry &,ipsdk::image::ImagePtr &)>' needs to have dll-interface to be used by clients of class 'ipsdk::image::ImageFactory'
20 // warning C4275: interface non dll class 'boost::noncopyable_::noncopyable' utilisée comme base d'une interface dll class 'ipsdk::image::ImageFactory'
21 #pragma warning (push)
22 #pragma warning (disable : 4251)
23 #pragma warning (disable : 4275)
24 
27 #include <boost/noncopyable.hpp>
28 
29 namespace ipsdk {
30 namespace image {
31 
34 
35 class IPSDKIMAGE_API ImageFactory : public boost::noncopyable
36 {
37 public:
39  static ImageFactory& getInstance();
40 
41 protected:
44  ImageFactory();
45  ~ImageFactory();
47 
48 // methods
49 public:
52  void setDefaultImageCreationFunction(const ImageCreationFunction& defaultImageCreationFunction);
53 
56  BoolResult createDefaultImage(const BaseImageGeometry& geometry,
57  ImagePtr& pOutputImage) const;
58 
61  BoolResult createDiskImage(const BaseImageGeometry& geometry,
62  DiskImagePtr& pOutputImage) const;
63 
66  BoolResult createDiskImage(const DiskImageAccessorPtr& pDiskImageAccessor,
67  DiskImagePtr& pOutputImage) const;
68 
75  DistributedImagePtr& pOutputImage) const;
77  DistributedImagePtr& pOutputImage) const;
79  const eImageBufferType& imageBufferType,
80  DistributedImagePtr& pOutputImage) const;
82 
85  BoolResult createMemoryImage(const BaseImageGeometry& geometry,
86  MemoryImagePtr& pOutputImage) const;
87 
90  BoolResult createCudaImage(const BaseImageGeometry& geometry,
91  CudaImagePtr& pOutputImage) const;
92 
95  BoolResult createUserImage(const UserImageAccessorPtr& pUserImageAccessor,
96  UserImagePtr& pOutputImage) const;
97 
98 protected:
101  BoolResult createInternalDefaultImage(const BaseImageGeometry& geometry,
102  ImagePtr& pOutputImage) const;
103 
107  boost::filesystem::path generateImageFileName(const boost::filesystem::path& filePath,
108  const std::string& strExtension,
109  const BaseImageGeometry& geometry) const;
110 
111 // attributes
112 protected:
115 };
116 
119 
120 } // end of namespace image
121 } // end of namespace ipsdk
122 
123 #pragma warning (pop)
124 
125 #endif // __IPSDKIMAGE_IMAGEFACTORY_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Singleton object used to manage new images creation.
Definition: ImageFactory.h:35
boost::shared_ptr< UserImage > UserImagePtr
Definition: ImageTypes.h:169
boost::shared_ptr< BaseUserImageAccessor > UserImageAccessorPtr
shared pointer to user images accessor
Definition: UserImageTypes.h:23
boost::shared_ptr< BaseDiskImageAccessor > DiskImageAccessorPtr
shared pointer to disk image accessor
Definition: DiskImageTypes.h:23
boost::shared_ptr< BaseImage > ImagePtr
Definition: ImageTypes.h:139
Base class for image geometry.
Definition: BaseImageGeometry.h:38
PYIPSDKBASE_API image::DistributedImagePtr createDistributedImage(const image::BaseImageGeometry &geometry)
function allowing to create a new distributed image from an existing geometry
boost::shared_ptr< MemoryImage > MemoryImagePtr
Definition: ImageTypes.h:163
IPSDKIMAGE_API ImageGeometryPtr geometry(const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const VolumeGeometry &volumeGeometry, const ColorGeometry &colorGeometry, const TemporalGeometry &temporalGeometry)
create an image geometry
Definition of import/export macro for library.
boost::function< BoolResult(const BaseImageGeometry &, ImagePtr &)> ImageCreationFunction
function allowing to create a new image from a geometry
Definition: ImageFactoryTypes.h:32
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
boost::shared_ptr< DistributedImage > DistributedImagePtr
Definition: DistributedImageTypes.h:38
ImageCreationFunction _defaultImageCreationFunction
function allowing to create a new default image from a geometry
Definition: ImageFactory.h:114
boost::shared_ptr< DiskImage > DiskImagePtr
Definition: ImageTypes.h:151
boost::shared_ptr< CudaImage > CudaImagePtr
Definition: ImageTypes.h:175
Predefined types for new images creation management.
Image class with distributed data storage policy.
Definition: DistributedImage.h:27
eImageBufferType
types associated to image buffers
Definition: ImageTypes.h:78