Commit a6c19d4d authored by OTB Bot's avatar OTB Bot

STYLE

parent 100839af
......@@ -451,7 +451,6 @@ MassOfBelief<TLabel, TMass>
}
} // end namespace otb
/** Define the << operator for label sets */
......
......@@ -34,7 +34,7 @@ namespace otb
/** \class VectorDataToDSValidatedVectorDataFilter
* \brief VectorData filter validating data nodes using
* Dempster-Shafer theory.
*
*
* This filter takes as input a vector data containing
* features score and validate (or not) each data node
* according to these features score, a fuzzy model corresponding
......@@ -55,7 +55,7 @@ namespace otb
* string refering to "Belief" and "Plausibility" from the
* Dempster-Shafer theory. By default the criterion is:
* "((Belief + Plausibility)/2) >= 0.5"
*
*
* The concidered features will be the intersection between
* the features embedded in this filter and the features embedded
* in the input vector data. For now, the filter uses "NDVI" and
......@@ -68,7 +68,7 @@ namespace otb
*/
template <class TVectorData, class TPrecision=float>
class ITK_EXPORT VectorDataToDSValidatedVectorDataFilter :
class ITK_EXPORT VectorDataToDSValidatedVectorDataFilter :
public otb::VectorDataToVectorDataFilter<TVectorData, TVectorData>
{
public:
......@@ -96,9 +96,9 @@ public:
typedef FuzzyVariable<std::string, PrecisionType> FuzzyVarType;
typedef MassOfBelief<std::string, PrecisionType>
MassOfBeliefFunctionType;
typedef typename MassOfBeliefFunctionType::LabelSetType
typedef typename MassOfBeliefFunctionType::LabelSetType
LabelSetType;
typedef JointMassOfBeliefFilter<MassOfBeliefFunctionType>
typedef JointMassOfBeliefFilter<MassOfBeliefFunctionType>
JointMassOfBeliefFilterType;
typedef Parser ParserType;
......
......@@ -28,14 +28,14 @@ namespace otb
// Constructor
template <class TVectorData, class TPrecision>
VectorDataToDSValidatedVectorDataFilter<TVectorData, TPrecision>
::VectorDataToDSValidatedVectorDataFilter() :
::VectorDataToDSValidatedVectorDataFilter() :
m_CriterionFormula("((Belief + Plausibility)/2) >= 0.5"),
m_CurrentID(0)
{
this->SetNumberOfRequiredInputs(1);
//Default road descriptors
std::vector<double> ndvi, radiom, lsd, shadow;
ndvi.push_back(0.25); ndvi.push_back(0.5);ndvi.push_back(0.75); ndvi.push_back(0.99);
ndvi.push_back(0.25); ndvi.push_back(0.5); ndvi.push_back(0.75); ndvi.push_back(0.99);
radiom.push_back(0.25); radiom.push_back(0.5); radiom.push_back(0.75); radiom.push_back(0.90);
//lsd.push_back(0.25); lsd.push_back(0.5); lsd.push_back(0.75); lsd.push_back(0.96);
//shadow.push_back(0.25); shadow.push_back(0.5); shadow.push_back(0.75); shadow.push_back(0.98);
......@@ -55,7 +55,7 @@ void
VectorDataToDSValidatedVectorDataFilter<TVectorData, TPrecision>
::AddDescriptor(std::string key, std::vector<double> model)
{
m_DescriptorModels.push_back(std::pair<std::string,std::vector<double> >(key, model));
m_DescriptorModels.push_back(std::pair<std::string, std::vector<double> >(key, model));
}
......@@ -83,19 +83,19 @@ VectorDataToDSValidatedVectorDataFilter<TVectorData, TPrecision>
fuzName = m_DescriptorModels[i].first;
fuzName_ = m_DescriptorModels[i].first + "_";
fuz->SetMembership(fuzName,
fuz->SetMembership(fuzName,
0.0,
0.0,
m_DescriptorModels[i].second[0],
m_DescriptorModels[i].second[1],
0.0,
0.0,
m_DescriptorModels[i].second[3]);
fuz->SetMembership(fuzName_,
fuz->SetMembership(fuzName_,
m_DescriptorModels[i].second[1],
m_DescriptorModels[i].second[2],
1.0,
1.0,
0.0,
0.0,
m_DescriptorModels[i].second[3]);
m_FuzzyVars.push_back(fuz);
......@@ -177,11 +177,11 @@ VectorDataToDSValidatedVectorDataFilter<TVectorData, TPrecision>
currentGeometry->SetNodeId(this->GetNextID());
this->GetOutput(0)->GetDataTree()->Add(currentGeometry, folder);
}
else
else
{
//std::cout << "Feature Rejected : " << m_Parser->Eval() << std::endl;
}
//itVector.GoToEnd();//TEST ONLY###########################################
//itVector.GoToEnd(); //TEST ONLY###########################################
}
++itVector;
}
......
......@@ -31,7 +31,7 @@ namespace otb
/** \class VectorDataToRoadDescriptionFilter
* \brief VectorDataToRoadDescriptionFilter associates a score to each
* adapted input VectorData DataNode.
*
*
* VectorDataToRoadDescriptionFilter is dedicated to road description.
* Input and output are both VectorDatas in index coordinate.
* Each DataNode of the output VectorData contains its scores
......@@ -39,20 +39,20 @@ namespace otb
* The support is an Optical Image and the descriptor are:
* - (NDVI >= threshold) per cent along the tested lines
* - mean Spectral Angle regarding a reference pixel along the tested lines
*
*
* \ingroup VectorDataFilter
* \sa VectorDataToSpecificDescriptionFilterBase
* \sa VectorDataToBuildingDescriptionFilter
*/
template <class TVectorData, class TOpticalImage>
class ITK_EXPORT VectorDataToRoadDescriptionFilter :
class ITK_EXPORT VectorDataToRoadDescriptionFilter :
public otb::VectorDataToSpecificDescriptionFilterBase<TVectorData>
{
public:
/** Standard class typedefs. */
typedef VectorDataToRoadDescriptionFilter Self;
typedef otb::VectorDataToSpecificDescriptionFilterBase<TVectorData>
typedef otb::VectorDataToSpecificDescriptionFilterBase<TVectorData>
Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......
......@@ -24,21 +24,21 @@ namespace otb
{
/** \class VectorDataToSpecificDescriptionFilterBase
* \brief Base class for VectorDataToSpecificDescriptionFilters.
*
*
* VectorDataToSpecificDescriptionFilterBase is a base class, it is
* supposed to be used through a inheriting class.
* Input and output are both VectorDatas. Each data node of the
* output VectorData contains its score regarding to the associated
* descriptors.
*
*
*
*
* \ingroup VectorDataFilter
* \sa VectorDataToRoadDescriptionFilter
* \sa VectorDataToBuildingDescriptionFilter
*/
template <class TVectorData>
class ITK_EXPORT VectorDataToSpecificDescriptionFilterBase :
class ITK_EXPORT VectorDataToSpecificDescriptionFilterBase :
public otb::VectorDataToVectorDataFilter<TVectorData, TVectorData>
{
public:
......
......@@ -34,7 +34,7 @@ int otbVectorDataToDSValidatedVectorDataFilterNew(int argc, char* argv[])
typedef otb::VectorDataToDSValidatedVectorDataFilter<VectorDataType, PrecisionType>
VectorDataValidationFilterType;
/*
VectorDataValidationFilterType::Pointer filter =
VectorDataValidationFilterType::Pointer filter =
VectorDataValidationFilterType::New();
std::cout<<filter<<std::endl;
......@@ -63,7 +63,7 @@ int otbVectorDataToDSValidatedVectorDataFilter(int argc, char* argv[])
VectorDataReaderType::Pointer vdReader = VectorDataReaderType::New();
VectorDataWriterType::Pointer vdWriter = VectorDataWriterType::New();
VectorDataValidationFilterType::Pointer filter =
VectorDataValidationFilterType::Pointer filter =
VectorDataValidationFilterType::New();
vdReader->SetFileName(inputVD);
......
......@@ -45,7 +45,7 @@ int otbVectorDataToRoadDescriptionFilterNew(int argc, char* argv[])
typedef otb::VectorDataToRoadDescriptionFilter<VectorDataType, ImageType>
VectorDataToRoadDescriptionFilterType;
VectorDataToRoadDescriptionFilterType::Pointer filter =
VectorDataToRoadDescriptionFilterType::Pointer filter =
VectorDataToRoadDescriptionFilterType::New();
std::cout<<filter<<std::endl;
......@@ -82,7 +82,7 @@ int otbVectorDataToRoadDescriptionFilter(int argc, char* argv[])
VectorDataWriterType::Pointer vdWriter = VectorDataWriterType::New();
VectorDataReProjFilter::Pointer vdReProjFilter = VectorDataReProjFilter::New();
VectorDataToRoadDescriptionFilterType::Pointer filter =
VectorDataToRoadDescriptionFilterType::Pointer filter =
VectorDataToRoadDescriptionFilterType::New();
if (!DisplayWarnings)
......
......@@ -30,7 +30,7 @@ int otbVectorDataToSpecificDescriptionFilterBaseNew(int argc, char* argv[])
typedef otb::VectorDataToSpecificDescriptionFilterBase<VectorDataType>
VectorDataToSpecificDescriptionFilterType;
VectorDataToSpecificDescriptionFilterType::Pointer filter =
VectorDataToSpecificDescriptionFilterType::Pointer filter =
VectorDataToSpecificDescriptionFilterType::New();
std::cout<<filter<<std::endl;
......
......@@ -78,7 +78,7 @@ int otbOSMToVectorDataGeneratorByName (int argc, char * argv[])
filter->SetFileName(parseResult->GetParameterString("--OSMFile"));
filter->SetUseUrl(false);
// Set the extent of the request
// Set the extent of the request
filter->SetNorth(43.62811);
filter->SetSouth(43.60185);
filter->SetWest(1.54911);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment