brainrat-private 6.0.4
classes.h
Go to the documentation of this file.
1/* Copyright (C) 2000-2013 CEA
2 *
3 * This software and supporting documentation were developed by
4 * bioPICSEL
5 * CEA/DSV/I²BM/MIRCen/LMN, Batiment 61,
6 * 18, route du Panorama
7 * 92265 Fontenay-aux-Roses
8 * France
9 */
10
11#ifndef BRAINRAT_DATA_BVCLASS_H
12#define BRAINRAT_DATA_BVCLASS_H
13
14#include <vector>
15#include <cartobase/object/object.h>
16#include <cartobase/object/property.h>
17#include <cartobase/object/pythonreader_d.h>
18#include <cartobase/object/pythonwriter_d.h>
21
22// using namespace carto;
23// using namespace std;
24
25namespace bio {
26
27 class BVclass: public carto::PropertySet
28 {
29 public:
31 BVclass( double prior, std::string name = "" );
33 carto::Array<double> d, double prior = 0.0, std::string name = "");
34 BVclass( const BVclass & );
35
36 virtual ~BVclass()
37 {
38 //cout << "In BVclass destructor : " << this->name << endl << flush;
39 removeProperty( "n" );
40 removeProperty( "p" );
41 removeProperty( "d" );
42 removeProperty( "h" );
43 }
44// BVclass &operator =( const BVclass & );
46
47 std::string name;
49 double prior;
51 };
52
54
55// // Helpers for classes parsing
56// carto::GenericObject * classesHelper( carto::GenericObject * o, const std::string & n, carto::PythonReader & r );
57// void classesHelper( const GenericObject & obj, PythonWriter & w, int ind, bool writeInternals );
58 std::ostream& operator << ( std::ostream& os, const bio::BVclass& thing );
59}
60
61namespace carto {
62 inline std::ostream& operator << ( std::ostream& os, const carto::Array<bio::BVclass> & thing )
63 {
65 return os;
66 }
67
68 DECLARE_GENERIC_OBJECT_TYPE( bio::BVclass )
69 DECLARE_GENERIC_OBJECT_TYPE( carto::Array<bio::BVclass> )
70 DECLARE_GENERIC_OBJECT_TYPE( carto::Array<bio::BVclass>::interfaced_iterator )
71}
72
73#endif
BVclass(double prior, std::string name="")
virtual ~BVclass()
Definition classes.h:36
double prior
Definition classes.h:49
carto::Array< carto::Array< carto::Array< int > > > histo
Definition classes.h:48
BVclass(carto::Array< carto::Array< carto::Array< int > > > h, carto::Array< double > d, double prior=0.0, std::string name="")
carto::Array< double > density
Definition classes.h:50
BVclass(const BVclass &)
void printBuiltIns()
std::string name
Definition classes.h:47
void printVector(std::ostream &os, const std::vector< T > &thing)
ImageProcessors<AimsRGB, double> p(data, mask, "rgbm", options, ImageProcessorMode::Init); ImageProce...
Definition classes.h:25
carto::Array< BVclass > BVclasses
Definition classes.h:53
std::ostream & operator<<(std::ostream &os, const bio::BVclass &thing)
std::ostream & operator<<(std::ostream &os, const carto::Array< bio::BVclass > &thing)
Definition classes.h:62