Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77999185
contact_cluster_collection.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 17, 18:30
Size
3 KB
Mime Type
text/x-c++
Expires
Mon, Aug 19, 18:30 (2 d)
Engine
blob
Format
Raw Data
Handle
19918908
Attached To
rTAMAAS tamaas
contact_cluster_collection.hh
View Options
/**
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2016 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Tamaas is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Tamaas is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Tamaas. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __CONTACT_CLUSTER_COLLECTION_HH__
#define __CONTACT_CLUSTER_COLLECTION_HH__
/* -------------------------------------------------------------------------- */
#include "contact_area.hh"
#include "contact_cluster.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_TAMAAS__
class
ContactClusterCollection
{
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public
:
ContactClusterCollection
(
ContactArea
&
area
);
virtual
~
ContactClusterCollection
();
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public
:
/// dump information about clusters to file
void
dumpClusterInfoToFile
(
const
std
::
string
&
filename
);
Real
getTotalArea
();
Real
getTotalPerimeter
();
Real
getNbClustersWithHole
();
Real
getNbClusters
();
std
::
vector
<
Real
>
getAreas
();
std
::
vector
<
Real
>
getMassCenters
(
UInt
i
);
std
::
vector
<
Real
>
getPerimeters
();
std
::
vector
<
Real
>
getCompactnesses
();
std
::
vector
<
Real
>
getInterPixelPerimeters
();
std
::
vector
<
Real
>
getDiscretePerimeters
();
std
::
vector
<
Real
>
getNbHoles
();
//std::vector<Real> getRIs();
std
::
vector
<
Real
>
getColors
();
/// write one file per cluster
void
dumpAllClusters
(
const
std
::
string
&
prefix
);
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private
:
//! the vector of clusters
std
::
vector
<
ContactCluster
>
clusters
;
//! the input area where to extract all the clusters
ContactArea
&
area
;
//! the total area
UInt
TotalArea
;
//! the total perimeter
UInt
TotalPerimeter
;
//! the number of clusters with holes
UInt
NumberOfClustersWithHoles
;
};
/* -------------------------------------------------------------------------- */
__END_TAMAAS__
#endif
/* __CONTACT_CLUSTER_COLLECTION_HH__ */
Event Timeline
Log In to Comment