Une mise-à-jour est prévue le 9 juillet entre 13:00 et 14:00. Le service sera inaccessible ou instable pendant cette période. Merci de votre compréhension.

grmFullLambdaScheduleSegmenter.h 1.47 KB
Newer Older
Pierre Lassalle's avatar
Pierre Lassalle committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*=========================================================================

  Program: Generic Region Merging Library
  Language: C++
  author: Lassalle Pierre
  contact: lassallepierre34@gmail.com



  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved


     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
Pierre Lassalle's avatar
Pierre Lassalle committed
18 19
#ifndef GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H
#define GRM_FULL_LAMBDA_SCHEDULE_SEGMENTER_H
Pierre Lassalle's avatar
Pierre Lassalle committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
#include "grmSegmenter.h"

namespace grm
{
	struct FLSNode : Node<FLSNode>
	{
		std::vector<float> m_Means;
	};

	struct FLSParam{};

	template<class TImage>
	class FullLambdaScheduleSegmenter : public Segmenter< TImage, FLSNode, FLSParam>
	{
	public:
		/* Some convenient typedefs */
		typedef Segmenter<TImage, FLSNode, FLSParam> Superclass;
		typedef TImage ImageType;
		typedef typename Superclass::GraphType GraphType;
		typedef typename Superclass::NodePointerType NodePointerType;
		typedef typename Superclass::GraphOperatorType GraphOperatorType;
		typedef GraphToOtbImage<GraphType> IOType;

		float ComputeMergingCost(NodePointerType n1, NodePointerType n2);
		void UpdateSpecificAttributes(NodePointerType n1, NodePointerType n2);
		void InitFromImage();
	};
} // end of namespace grm
#include "grmFullLambdaScheduleSegmenter.txx"
Pierre Lassalle's avatar
Pierre Lassalle committed
49
#endif