/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */

#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>

#include "vtkPolyDataAlgorithmWrap.h"
#include "vtkEuclideanClusterExtractionWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkAbstractPointLocatorWrap.h"
#include "../../plus/plus.h"

using namespace v8;

extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap;
Nan::Persistent<v8::FunctionTemplate> VtkEuclideanClusterExtractionWrap::ptpl;

VtkEuclideanClusterExtractionWrap::VtkEuclideanClusterExtractionWrap()
{ }

VtkEuclideanClusterExtractionWrap::VtkEuclideanClusterExtractionWrap(vtkSmartPointer<vtkEuclideanClusterExtraction> _native)
{ native = _native; }

VtkEuclideanClusterExtractionWrap::~VtkEuclideanClusterExtractionWrap()
{ }

void VtkEuclideanClusterExtractionWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkEuclideanClusterExtraction").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("EuclideanClusterExtraction").ToLocalChecked(), ConstructorGetter);
}

void VtkEuclideanClusterExtractionWrap::ConstructorGetter(
	v8::Local<v8::String> property,
	const Nan::PropertyCallbackInfo<v8::Value>& info)
{
	InitPtpl();
	info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction());
}

void VtkEuclideanClusterExtractionWrap::InitPtpl()
{
	if (!ptpl.IsEmpty()) return;
	v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
	VtkPolyDataAlgorithmWrap::InitPtpl( );
	tpl->Inherit(Nan::New<FunctionTemplate>(VtkPolyDataAlgorithmWrap::ptpl));
	tpl->SetClassName(Nan::New("VtkEuclideanClusterExtractionWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

	Nan::SetPrototypeMethod(tpl, "AddSpecifiedCluster", AddSpecifiedCluster);
	Nan::SetPrototypeMethod(tpl, "addSpecifiedCluster", AddSpecifiedCluster);

	Nan::SetPrototypeMethod(tpl, "ColorClustersOff", ColorClustersOff);
	Nan::SetPrototypeMethod(tpl, "colorClustersOff", ColorClustersOff);

	Nan::SetPrototypeMethod(tpl, "ColorClustersOn", ColorClustersOn);
	Nan::SetPrototypeMethod(tpl, "colorClustersOn", ColorClustersOn);

	Nan::SetPrototypeMethod(tpl, "DeleteSpecifiedCluster", DeleteSpecifiedCluster);
	Nan::SetPrototypeMethod(tpl, "deleteSpecifiedCluster", DeleteSpecifiedCluster);

	Nan::SetPrototypeMethod(tpl, "GetClosestPoint", GetClosestPoint);
	Nan::SetPrototypeMethod(tpl, "getClosestPoint", GetClosestPoint);

	Nan::SetPrototypeMethod(tpl, "GetColorClusters", GetColorClusters);
	Nan::SetPrototypeMethod(tpl, "getColorClusters", GetColorClusters);

	Nan::SetPrototypeMethod(tpl, "GetExtractionMode", GetExtractionMode);
	Nan::SetPrototypeMethod(tpl, "getExtractionMode", GetExtractionMode);

	Nan::SetPrototypeMethod(tpl, "GetExtractionModeAsString", GetExtractionModeAsString);
	Nan::SetPrototypeMethod(tpl, "getExtractionModeAsString", GetExtractionModeAsString);

	Nan::SetPrototypeMethod(tpl, "GetExtractionModeMaxValue", GetExtractionModeMaxValue);
	Nan::SetPrototypeMethod(tpl, "getExtractionModeMaxValue", GetExtractionModeMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetExtractionModeMinValue", GetExtractionModeMinValue);
	Nan::SetPrototypeMethod(tpl, "getExtractionModeMinValue", GetExtractionModeMinValue);

	Nan::SetPrototypeMethod(tpl, "GetLocator", GetLocator);
	Nan::SetPrototypeMethod(tpl, "getLocator", GetLocator);

	Nan::SetPrototypeMethod(tpl, "GetNumberOfExtractedClusters", GetNumberOfExtractedClusters);
	Nan::SetPrototypeMethod(tpl, "getNumberOfExtractedClusters", GetNumberOfExtractedClusters);

	Nan::SetPrototypeMethod(tpl, "GetRadius", GetRadius);
	Nan::SetPrototypeMethod(tpl, "getRadius", GetRadius);

	Nan::SetPrototypeMethod(tpl, "GetRadiusMaxValue", GetRadiusMaxValue);
	Nan::SetPrototypeMethod(tpl, "getRadiusMaxValue", GetRadiusMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetRadiusMinValue", GetRadiusMinValue);
	Nan::SetPrototypeMethod(tpl, "getRadiusMinValue", GetRadiusMinValue);

	Nan::SetPrototypeMethod(tpl, "GetScalarConnectivity", GetScalarConnectivity);
	Nan::SetPrototypeMethod(tpl, "getScalarConnectivity", GetScalarConnectivity);

	Nan::SetPrototypeMethod(tpl, "GetScalarRange", GetScalarRange);
	Nan::SetPrototypeMethod(tpl, "getScalarRange", GetScalarRange);

	Nan::SetPrototypeMethod(tpl, "InitializeSeedList", InitializeSeedList);
	Nan::SetPrototypeMethod(tpl, "initializeSeedList", InitializeSeedList);

	Nan::SetPrototypeMethod(tpl, "InitializeSpecifiedClusterList", InitializeSpecifiedClusterList);
	Nan::SetPrototypeMethod(tpl, "initializeSpecifiedClusterList", InitializeSpecifiedClusterList);

	Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance);
	Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance);

	Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast);
	Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast);

	Nan::SetPrototypeMethod(tpl, "ScalarConnectivityOff", ScalarConnectivityOff);
	Nan::SetPrototypeMethod(tpl, "scalarConnectivityOff", ScalarConnectivityOff);

	Nan::SetPrototypeMethod(tpl, "ScalarConnectivityOn", ScalarConnectivityOn);
	Nan::SetPrototypeMethod(tpl, "scalarConnectivityOn", ScalarConnectivityOn);

	Nan::SetPrototypeMethod(tpl, "SetClosestPoint", SetClosestPoint);
	Nan::SetPrototypeMethod(tpl, "setClosestPoint", SetClosestPoint);

	Nan::SetPrototypeMethod(tpl, "SetColorClusters", SetColorClusters);
	Nan::SetPrototypeMethod(tpl, "setColorClusters", SetColorClusters);

	Nan::SetPrototypeMethod(tpl, "SetExtractionMode", SetExtractionMode);
	Nan::SetPrototypeMethod(tpl, "setExtractionMode", SetExtractionMode);

	Nan::SetPrototypeMethod(tpl, "SetExtractionModeToAllClusters", SetExtractionModeToAllClusters);
	Nan::SetPrototypeMethod(tpl, "setExtractionModeToAllClusters", SetExtractionModeToAllClusters);

	Nan::SetPrototypeMethod(tpl, "SetExtractionModeToClosestPointCluster", SetExtractionModeToClosestPointCluster);
	Nan::SetPrototypeMethod(tpl, "setExtractionModeToClosestPointCluster", SetExtractionModeToClosestPointCluster);

	Nan::SetPrototypeMethod(tpl, "SetExtractionModeToLargestCluster", SetExtractionModeToLargestCluster);
	Nan::SetPrototypeMethod(tpl, "setExtractionModeToLargestCluster", SetExtractionModeToLargestCluster);

	Nan::SetPrototypeMethod(tpl, "SetExtractionModeToPointSeededClusters", SetExtractionModeToPointSeededClusters);
	Nan::SetPrototypeMethod(tpl, "setExtractionModeToPointSeededClusters", SetExtractionModeToPointSeededClusters);

	Nan::SetPrototypeMethod(tpl, "SetExtractionModeToSpecifiedClusters", SetExtractionModeToSpecifiedClusters);
	Nan::SetPrototypeMethod(tpl, "setExtractionModeToSpecifiedClusters", SetExtractionModeToSpecifiedClusters);

	Nan::SetPrototypeMethod(tpl, "SetLocator", SetLocator);
	Nan::SetPrototypeMethod(tpl, "setLocator", SetLocator);

	Nan::SetPrototypeMethod(tpl, "SetRadius", SetRadius);
	Nan::SetPrototypeMethod(tpl, "setRadius", SetRadius);

	Nan::SetPrototypeMethod(tpl, "SetScalarConnectivity", SetScalarConnectivity);
	Nan::SetPrototypeMethod(tpl, "setScalarConnectivity", SetScalarConnectivity);

	Nan::SetPrototypeMethod(tpl, "SetScalarRange", SetScalarRange);
	Nan::SetPrototypeMethod(tpl, "setScalarRange", SetScalarRange);

#ifdef VTK_NODE_PLUS_VTKEUCLIDEANCLUSTEREXTRACTIONWRAP_INITPTPL
	VTK_NODE_PLUS_VTKEUCLIDEANCLUSTEREXTRACTIONWRAP_INITPTPL
#endif
	ptpl.Reset( tpl );
}

void VtkEuclideanClusterExtractionWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	if(!info.IsConstructCall())
	{
		Nan::ThrowError("Constructor not called in a construct call.");
		return;
	}

	if(info.Length() == 0)
	{
		vtkSmartPointer<vtkEuclideanClusterExtraction> native = vtkSmartPointer<vtkEuclideanClusterExtraction>::New();
		VtkEuclideanClusterExtractionWrap* obj = new VtkEuclideanClusterExtractionWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

	info.GetReturnValue().Set(info.This());
}

void VtkEuclideanClusterExtractionWrap::AddSpecifiedCluster(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->AddSpecifiedCluster(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEuclideanClusterExtractionWrap::ColorClustersOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ColorClustersOff();
}

void VtkEuclideanClusterExtractionWrap::ColorClustersOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ColorClustersOn();
}

void VtkEuclideanClusterExtractionWrap::DeleteSpecifiedCluster(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->DeleteSpecifiedCluster(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEuclideanClusterExtractionWrap::GetClosestPoint(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	double const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetClosestPoint();
	Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(v8::Isolate::GetCurrent(), 3 * sizeof(double));
	Local<v8::Float64Array> at = v8::Float64Array::New(ab, 0, 3);
	memcpy(ab->GetContents().Data(), r, 3 * sizeof(double));
	info.GetReturnValue().Set(at);
}

void VtkEuclideanClusterExtractionWrap::GetColorClusters(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	bool r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetColorClusters();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEuclideanClusterExtractionWrap::GetExtractionMode(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetExtractionMode();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEuclideanClusterExtractionWrap::GetExtractionModeAsString(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	char const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetExtractionModeAsString();
	info.GetReturnValue().Set(Nan::New(r).ToLocalChecked());
}

void VtkEuclideanClusterExtractionWrap::GetExtractionModeMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetExtractionModeMaxValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEuclideanClusterExtractionWrap::GetExtractionModeMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetExtractionModeMinValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEuclideanClusterExtractionWrap::GetLocator(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	vtkAbstractPointLocator * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetLocator();
	VtkAbstractPointLocatorWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkAbstractPointLocatorWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkAbstractPointLocatorWrap *w = new VtkAbstractPointLocatorWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkEuclideanClusterExtractionWrap::GetNumberOfExtractedClusters(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetNumberOfExtractedClusters();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEuclideanClusterExtractionWrap::GetRadius(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetRadius();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEuclideanClusterExtractionWrap::GetRadiusMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetRadiusMaxValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEuclideanClusterExtractionWrap::GetRadiusMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetRadiusMinValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEuclideanClusterExtractionWrap::GetScalarConnectivity(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	bool r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetScalarConnectivity();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEuclideanClusterExtractionWrap::GetScalarRange(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	double const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetScalarRange();
	Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(v8::Isolate::GetCurrent(), 2 * sizeof(double));
	Local<v8::Float64Array> at = v8::Float64Array::New(ab, 0, 2);
	memcpy(ab->GetContents().Data(), r, 2 * sizeof(double));
	info.GetReturnValue().Set(at);
}

void VtkEuclideanClusterExtractionWrap::InitializeSeedList(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->InitializeSeedList();
}

void VtkEuclideanClusterExtractionWrap::InitializeSpecifiedClusterList(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->InitializeSpecifiedClusterList();
}

void VtkEuclideanClusterExtractionWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	vtkEuclideanClusterExtraction * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->NewInstance();
	VtkEuclideanClusterExtractionWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkEuclideanClusterExtractionWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkEuclideanClusterExtractionWrap *w = new VtkEuclideanClusterExtractionWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkEuclideanClusterExtractionWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0]))
	{
		VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject());
		vtkEuclideanClusterExtraction * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->SafeDownCast(
			(vtkObjectBase *) a0->native.GetPointer()
		);
		VtkEuclideanClusterExtractionWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkEuclideanClusterExtractionWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkEuclideanClusterExtractionWrap *w = new VtkEuclideanClusterExtractionWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEuclideanClusterExtractionWrap::ScalarConnectivityOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ScalarConnectivityOff();
}

void VtkEuclideanClusterExtractionWrap::ScalarConnectivityOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ScalarConnectivityOn();
}

void VtkEuclideanClusterExtractionWrap::SetClosestPoint(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsFloat64Array())
	{
		v8::Local<v8::Float64Array>a0(v8::Local<v8::Float64Array>::Cast(info[0]->ToObject()));
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetClosestPoint(
			(double *)(a0->Buffer()->GetContents().Data())
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsArray())
	{
		v8::Local<v8::Array>a0(v8::Local<v8::Array>::Cast(info[0]->ToObject()));
		double b0[3];
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 3; i++ )
		{
			if( !a0->Get(i)->IsNumber() )
			{
				Nan::ThrowError("Array contents invalid.");
				return;
			}
			b0[i] = a0->Get(i)->NumberValue();
		}
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetClosestPoint(
			b0
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsNumber())
	{
		if(info.Length() > 1 && info[1]->IsNumber())
		{
			if(info.Length() > 2 && info[2]->IsNumber())
			{
								if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				native->SetClosestPoint(
					info[0]->NumberValue(),
					info[1]->NumberValue(),
					info[2]->NumberValue()
				);
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEuclideanClusterExtractionWrap::SetColorClusters(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsBoolean())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetColorClusters(
			info[0]->BooleanValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEuclideanClusterExtractionWrap::SetExtractionMode(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetExtractionMode(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEuclideanClusterExtractionWrap::SetExtractionModeToAllClusters(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->SetExtractionModeToAllClusters();
}

void VtkEuclideanClusterExtractionWrap::SetExtractionModeToClosestPointCluster(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->SetExtractionModeToClosestPointCluster();
}

void VtkEuclideanClusterExtractionWrap::SetExtractionModeToLargestCluster(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->SetExtractionModeToLargestCluster();
}

void VtkEuclideanClusterExtractionWrap::SetExtractionModeToPointSeededClusters(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->SetExtractionModeToPointSeededClusters();
}

void VtkEuclideanClusterExtractionWrap::SetExtractionModeToSpecifiedClusters(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->SetExtractionModeToSpecifiedClusters();
}

void VtkEuclideanClusterExtractionWrap::SetLocator(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkAbstractPointLocatorWrap::ptpl))->HasInstance(info[0]))
	{
		VtkAbstractPointLocatorWrap *a0 = ObjectWrap::Unwrap<VtkAbstractPointLocatorWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetLocator(
			(vtkAbstractPointLocator *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEuclideanClusterExtractionWrap::SetRadius(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsNumber())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetRadius(
			info[0]->NumberValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEuclideanClusterExtractionWrap::SetScalarConnectivity(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsBoolean())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetScalarConnectivity(
			info[0]->BooleanValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEuclideanClusterExtractionWrap::SetScalarRange(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEuclideanClusterExtractionWrap *wrapper = ObjectWrap::Unwrap<VtkEuclideanClusterExtractionWrap>(info.Holder());
	vtkEuclideanClusterExtraction *native = (vtkEuclideanClusterExtraction *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsFloat64Array())
	{
		v8::Local<v8::Float64Array>a0(v8::Local<v8::Float64Array>::Cast(info[0]->ToObject()));
		if( a0->Length() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetScalarRange(
			(double *)(a0->Buffer()->GetContents().Data())
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsArray())
	{
		v8::Local<v8::Array>a0(v8::Local<v8::Array>::Cast(info[0]->ToObject()));
		double b0[2];
		if( a0->Length() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 2; i++ )
		{
			if( !a0->Get(i)->IsNumber() )
			{
				Nan::ThrowError("Array contents invalid.");
				return;
			}
			b0[i] = a0->Get(i)->NumberValue();
		}
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetScalarRange(
			b0
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsNumber())
	{
		if(info.Length() > 1 && info[1]->IsNumber())
		{
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->SetScalarRange(
				info[0]->NumberValue(),
				info[1]->NumberValue()
			);
			return;
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

