Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

phBlobData.h

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------
00002     Phission :
00003         Realtime Vision Processing System
00004 
00005     Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu)
00006     University of Massachusetts at Lowell,
00007     Laboratory for Artificial Intelligence and Robotics
00008 
00009     This file is part of Phission.
00010 
00011     Phission is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU Lesser General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     Phission is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU Lesser General Public License for more details.
00020 
00021     You should have received a copy of the GNU Lesser General Public License
00022     along with Phission; if not, write to the Free Software
00023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 
00025  ---------------------------------------------------------------------------*/
00026 #ifndef _PHBLOBDATA_H
00027 #define _PHBLOBDATA_H
00028 
00034 #include <phblob.h>
00035 #include <phLiveObject.h>
00036 
00042 /* ------------------------------------------------------------------------ */
00043 /* Todo: add live source functionality to this object. */
00044 /* ------------------------------------------------------------------------ */
00059 PHAPI(class) phBlobData : public phLiveObject
00060 {
00061     phblob_data *m_data;
00062     
00063     void init();
00064         
00065 public:
00066     phBlobData();
00067     phBlobData( const phBlobData &blob );
00068     ~phBlobData();
00069     
00070     int copy( phObject *copyto_obj );
00071     int swap( phObject *obj );
00072     
00073     int reset();
00074     
00075     int setData( phblob_data *data );
00076 
00077     int copy( phBlobData &copyfrom);
00078 
00079     /* The following should not be used with an object that is constantly 
00080      * updating if one desires data coherency */
00081     /* These will return the values of the particular variable during one
00082      * state of the object; Once returned, any of the other values may
00083      * change before calling the next relevant method. For example, calling
00084      * getTotalBlobs and then getBlobs; In between the two separate method
00085      * calls, the actual blobs array and total blobs may change and then
00086      * the value returned from the call to getTotalBlobs is invalidated.
00087      * 
00088      * It is assumed that the following functions won't be used
00089      * with live/constantly changing instances of phBlobData and so 
00090      * they are not made to be thread-safe. 
00091      *
00092      * The return values are internal to the class and must be 
00093      * called again if the object is copied.
00094      *
00095      * Use the copy function above and then call these with a static copy
00096      * of the data.
00097      *
00098      * If another object is placing data into a phBlobData object, it should
00099      * provide a method to call that will return a static copy of the 
00100      * phBlobData object: int getBlobData( phBlobData &blobData );
00101      * */ 
00102     #if 0
00103     /* XXXXX: These are going to be removed because it slows the 
00104      * blob object creation and the information should be retreived
00105      * through a larger object (phSegmentationData) and only be updated
00106      * if someone is connected to it */
00107     int32_t                 getTotalLines();
00108     phblob_line_segment    *getLines();
00109     phblob_line_segment    *getLine(int32_t index);
00110     phblob_line_segment     getLineData(int32_t index);
00111     
00112     int32_t                 getTotalRows();
00113     phblob_line_segment   **getRowPtrs();
00114     int32_t                *getRowIndexArray();
00115     #endif    
00116     int32_t                 getTotalBlobs(uint32_t min_size = 0);
00117     phblob                 *getBlobArray();
00118     phblob                  getBlob(uint32_t blob_index);
00119 
00120     phBlobData              &operator = ( phBlobData &right );
00121     
00122     void                    print_data(uint32_t min_size, uint32_t verbose = 0);
00123 };
00124  /* ImageProcessing */
00126 
00127 #endif /* _PHBLOBDATA_H */




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:08 2007 for phission by  doxygen 1.4.4