/* 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 "vtkImageAlgorithmWrap.h"
#include "vtkImageThresholdConnectivityWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkPointsWrap.h"
#include "vtkImageStencilDataWrap.h"
#include "../../plus/plus.h"

using namespace v8;

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

VtkImageThresholdConnectivityWrap::VtkImageThresholdConnectivityWrap()
{ }

VtkImageThresholdConnectivityWrap::VtkImageThresholdConnectivityWrap(vtkSmartPointer<vtkImageThresholdConnectivity> _native)
{ native = _native; }

VtkImageThresholdConnectivityWrap::~VtkImageThresholdConnectivityWrap()
{ }

void VtkImageThresholdConnectivityWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkImageThresholdConnectivity").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("ImageThresholdConnectivity").ToLocalChecked(), ConstructorGetter);
}

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

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

	Nan::SetPrototypeMethod(tpl, "GetActiveComponent", GetActiveComponent);
	Nan::SetPrototypeMethod(tpl, "getActiveComponent", GetActiveComponent);

	Nan::SetPrototypeMethod(tpl, "GetInValue", GetInValue);
	Nan::SetPrototypeMethod(tpl, "getInValue", GetInValue);

	Nan::SetPrototypeMethod(tpl, "GetLowerThreshold", GetLowerThreshold);
	Nan::SetPrototypeMethod(tpl, "getLowerThreshold", GetLowerThreshold);

	Nan::SetPrototypeMethod(tpl, "GetNeighborhoodFraction", GetNeighborhoodFraction);
	Nan::SetPrototypeMethod(tpl, "getNeighborhoodFraction", GetNeighborhoodFraction);

	Nan::SetPrototypeMethod(tpl, "GetNeighborhoodFractionMaxValue", GetNeighborhoodFractionMaxValue);
	Nan::SetPrototypeMethod(tpl, "getNeighborhoodFractionMaxValue", GetNeighborhoodFractionMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetNeighborhoodFractionMinValue", GetNeighborhoodFractionMinValue);
	Nan::SetPrototypeMethod(tpl, "getNeighborhoodFractionMinValue", GetNeighborhoodFractionMinValue);

	Nan::SetPrototypeMethod(tpl, "GetNeighborhoodRadius", GetNeighborhoodRadius);
	Nan::SetPrototypeMethod(tpl, "getNeighborhoodRadius", GetNeighborhoodRadius);

	Nan::SetPrototypeMethod(tpl, "GetNumberOfInVoxels", GetNumberOfInVoxels);
	Nan::SetPrototypeMethod(tpl, "getNumberOfInVoxels", GetNumberOfInVoxels);

	Nan::SetPrototypeMethod(tpl, "GetOutValue", GetOutValue);
	Nan::SetPrototypeMethod(tpl, "getOutValue", GetOutValue);

	Nan::SetPrototypeMethod(tpl, "GetReplaceIn", GetReplaceIn);
	Nan::SetPrototypeMethod(tpl, "getReplaceIn", GetReplaceIn);

	Nan::SetPrototypeMethod(tpl, "GetReplaceOut", GetReplaceOut);
	Nan::SetPrototypeMethod(tpl, "getReplaceOut", GetReplaceOut);

	Nan::SetPrototypeMethod(tpl, "GetSeedPoints", GetSeedPoints);
	Nan::SetPrototypeMethod(tpl, "getSeedPoints", GetSeedPoints);

	Nan::SetPrototypeMethod(tpl, "GetSliceRangeX", GetSliceRangeX);
	Nan::SetPrototypeMethod(tpl, "getSliceRangeX", GetSliceRangeX);

	Nan::SetPrototypeMethod(tpl, "GetSliceRangeY", GetSliceRangeY);
	Nan::SetPrototypeMethod(tpl, "getSliceRangeY", GetSliceRangeY);

	Nan::SetPrototypeMethod(tpl, "GetSliceRangeZ", GetSliceRangeZ);
	Nan::SetPrototypeMethod(tpl, "getSliceRangeZ", GetSliceRangeZ);

	Nan::SetPrototypeMethod(tpl, "GetStencil", GetStencil);
	Nan::SetPrototypeMethod(tpl, "getStencil", GetStencil);

	Nan::SetPrototypeMethod(tpl, "GetUpperThreshold", GetUpperThreshold);
	Nan::SetPrototypeMethod(tpl, "getUpperThreshold", GetUpperThreshold);

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

	Nan::SetPrototypeMethod(tpl, "ReplaceInOff", ReplaceInOff);
	Nan::SetPrototypeMethod(tpl, "replaceInOff", ReplaceInOff);

	Nan::SetPrototypeMethod(tpl, "ReplaceInOn", ReplaceInOn);
	Nan::SetPrototypeMethod(tpl, "replaceInOn", ReplaceInOn);

	Nan::SetPrototypeMethod(tpl, "ReplaceOutOff", ReplaceOutOff);
	Nan::SetPrototypeMethod(tpl, "replaceOutOff", ReplaceOutOff);

	Nan::SetPrototypeMethod(tpl, "ReplaceOutOn", ReplaceOutOn);
	Nan::SetPrototypeMethod(tpl, "replaceOutOn", ReplaceOutOn);

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

	Nan::SetPrototypeMethod(tpl, "SetActiveComponent", SetActiveComponent);
	Nan::SetPrototypeMethod(tpl, "setActiveComponent", SetActiveComponent);

	Nan::SetPrototypeMethod(tpl, "SetInValue", SetInValue);
	Nan::SetPrototypeMethod(tpl, "setInValue", SetInValue);

	Nan::SetPrototypeMethod(tpl, "SetNeighborhoodFraction", SetNeighborhoodFraction);
	Nan::SetPrototypeMethod(tpl, "setNeighborhoodFraction", SetNeighborhoodFraction);

	Nan::SetPrototypeMethod(tpl, "SetNeighborhoodRadius", SetNeighborhoodRadius);
	Nan::SetPrototypeMethod(tpl, "setNeighborhoodRadius", SetNeighborhoodRadius);

	Nan::SetPrototypeMethod(tpl, "SetOutValue", SetOutValue);
	Nan::SetPrototypeMethod(tpl, "setOutValue", SetOutValue);

	Nan::SetPrototypeMethod(tpl, "SetReplaceIn", SetReplaceIn);
	Nan::SetPrototypeMethod(tpl, "setReplaceIn", SetReplaceIn);

	Nan::SetPrototypeMethod(tpl, "SetReplaceOut", SetReplaceOut);
	Nan::SetPrototypeMethod(tpl, "setReplaceOut", SetReplaceOut);

	Nan::SetPrototypeMethod(tpl, "SetSeedPoints", SetSeedPoints);
	Nan::SetPrototypeMethod(tpl, "setSeedPoints", SetSeedPoints);

	Nan::SetPrototypeMethod(tpl, "SetSliceRangeX", SetSliceRangeX);
	Nan::SetPrototypeMethod(tpl, "setSliceRangeX", SetSliceRangeX);

	Nan::SetPrototypeMethod(tpl, "SetSliceRangeY", SetSliceRangeY);
	Nan::SetPrototypeMethod(tpl, "setSliceRangeY", SetSliceRangeY);

	Nan::SetPrototypeMethod(tpl, "SetSliceRangeZ", SetSliceRangeZ);
	Nan::SetPrototypeMethod(tpl, "setSliceRangeZ", SetSliceRangeZ);

	Nan::SetPrototypeMethod(tpl, "SetStencilData", SetStencilData);
	Nan::SetPrototypeMethod(tpl, "setStencilData", SetStencilData);

	Nan::SetPrototypeMethod(tpl, "ThresholdBetween", ThresholdBetween);
	Nan::SetPrototypeMethod(tpl, "thresholdBetween", ThresholdBetween);

	Nan::SetPrototypeMethod(tpl, "ThresholdByLower", ThresholdByLower);
	Nan::SetPrototypeMethod(tpl, "thresholdByLower", ThresholdByLower);

	Nan::SetPrototypeMethod(tpl, "ThresholdByUpper", ThresholdByUpper);
	Nan::SetPrototypeMethod(tpl, "thresholdByUpper", ThresholdByUpper);

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

void VtkImageThresholdConnectivityWrap::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<vtkImageThresholdConnectivity> native = vtkSmartPointer<vtkImageThresholdConnectivity>::New();
		VtkImageThresholdConnectivityWrap* obj = new VtkImageThresholdConnectivityWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

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

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

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

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

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

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

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

void VtkImageThresholdConnectivityWrap::GetNeighborhoodRadius(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkImageThresholdConnectivityWrap *wrapper = ObjectWrap::Unwrap<VtkImageThresholdConnectivityWrap>(info.Holder());
	vtkImageThresholdConnectivity *native = (vtkImageThresholdConnectivity *)wrapper->native.GetPointer();
	double const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetNeighborhoodRadius();
	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 VtkImageThresholdConnectivityWrap::GetNumberOfInVoxels(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkImageThresholdConnectivityWrap *wrapper = ObjectWrap::Unwrap<VtkImageThresholdConnectivityWrap>(info.Holder());
	vtkImageThresholdConnectivity *native = (vtkImageThresholdConnectivity *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetNumberOfInVoxels();
	info.GetReturnValue().Set(Nan::New(r));
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void VtkImageThresholdConnectivityWrap::SetNeighborhoodRadius(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkImageThresholdConnectivityWrap *wrapper = ObjectWrap::Unwrap<VtkImageThresholdConnectivityWrap>(info.Holder());
	vtkImageThresholdConnectivity *native = (vtkImageThresholdConnectivity *)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->SetNeighborhoodRadius(
			(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->SetNeighborhoodRadius(
			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->SetNeighborhoodRadius(
					info[0]->NumberValue(),
					info[1]->NumberValue(),
					info[2]->NumberValue()
				);
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

void VtkImageThresholdConnectivityWrap::SetSliceRangeX(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkImageThresholdConnectivityWrap *wrapper = ObjectWrap::Unwrap<VtkImageThresholdConnectivityWrap>(info.Holder());
	vtkImageThresholdConnectivity *native = (vtkImageThresholdConnectivity *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsInt32Array())
	{
		v8::Local<v8::Int32Array>a0(v8::Local<v8::Int32Array>::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->SetSliceRangeX(
			(int *)(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()));
		int b0[2];
		if( a0->Length() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

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

void VtkImageThresholdConnectivityWrap::SetSliceRangeY(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkImageThresholdConnectivityWrap *wrapper = ObjectWrap::Unwrap<VtkImageThresholdConnectivityWrap>(info.Holder());
	vtkImageThresholdConnectivity *native = (vtkImageThresholdConnectivity *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsInt32Array())
	{
		v8::Local<v8::Int32Array>a0(v8::Local<v8::Int32Array>::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->SetSliceRangeY(
			(int *)(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()));
		int b0[2];
		if( a0->Length() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

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

void VtkImageThresholdConnectivityWrap::SetSliceRangeZ(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkImageThresholdConnectivityWrap *wrapper = ObjectWrap::Unwrap<VtkImageThresholdConnectivityWrap>(info.Holder());
	vtkImageThresholdConnectivity *native = (vtkImageThresholdConnectivity *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsInt32Array())
	{
		v8::Local<v8::Int32Array>a0(v8::Local<v8::Int32Array>::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->SetSliceRangeZ(
			(int *)(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()));
		int b0[2];
		if( a0->Length() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

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

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

void VtkImageThresholdConnectivityWrap::ThresholdBetween(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkImageThresholdConnectivityWrap *wrapper = ObjectWrap::Unwrap<VtkImageThresholdConnectivityWrap>(info.Holder());
	vtkImageThresholdConnectivity *native = (vtkImageThresholdConnectivity *)wrapper->native.GetPointer();
	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->ThresholdBetween(
				info[0]->NumberValue(),
				info[1]->NumberValue()
			);
			return;
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

