/* 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 "vtkResliceCursorPolyDataAlgorithmWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkResliceCursorWrap.h"
#include "vtkPolyDataWrap.h"
#include "../../plus/plus.h"

using namespace v8;

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

VtkResliceCursorPolyDataAlgorithmWrap::VtkResliceCursorPolyDataAlgorithmWrap()
{ }

VtkResliceCursorPolyDataAlgorithmWrap::VtkResliceCursorPolyDataAlgorithmWrap(vtkSmartPointer<vtkResliceCursorPolyDataAlgorithm> _native)
{ native = _native; }

VtkResliceCursorPolyDataAlgorithmWrap::~VtkResliceCursorPolyDataAlgorithmWrap()
{ }

void VtkResliceCursorPolyDataAlgorithmWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkResliceCursorPolyDataAlgorithm").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("ResliceCursorPolyDataAlgorithm").ToLocalChecked(), ConstructorGetter);
}

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

void VtkResliceCursorPolyDataAlgorithmWrap::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("VtkResliceCursorPolyDataAlgorithmWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

	Nan::SetPrototypeMethod(tpl, "GetAxis1", GetAxis1);
	Nan::SetPrototypeMethod(tpl, "getAxis1", GetAxis1);

	Nan::SetPrototypeMethod(tpl, "GetAxis2", GetAxis2);
	Nan::SetPrototypeMethod(tpl, "getAxis2", GetAxis2);

	Nan::SetPrototypeMethod(tpl, "GetCenterlineAxis1", GetCenterlineAxis1);
	Nan::SetPrototypeMethod(tpl, "getCenterlineAxis1", GetCenterlineAxis1);

	Nan::SetPrototypeMethod(tpl, "GetCenterlineAxis2", GetCenterlineAxis2);
	Nan::SetPrototypeMethod(tpl, "getCenterlineAxis2", GetCenterlineAxis2);

	Nan::SetPrototypeMethod(tpl, "GetOtherPlaneForAxis", GetOtherPlaneForAxis);
	Nan::SetPrototypeMethod(tpl, "getOtherPlaneForAxis", GetOtherPlaneForAxis);

	Nan::SetPrototypeMethod(tpl, "GetPlaneAxis1", GetPlaneAxis1);
	Nan::SetPrototypeMethod(tpl, "getPlaneAxis1", GetPlaneAxis1);

	Nan::SetPrototypeMethod(tpl, "GetPlaneAxis2", GetPlaneAxis2);
	Nan::SetPrototypeMethod(tpl, "getPlaneAxis2", GetPlaneAxis2);

	Nan::SetPrototypeMethod(tpl, "GetResliceCursor", GetResliceCursor);
	Nan::SetPrototypeMethod(tpl, "getResliceCursor", GetResliceCursor);

	Nan::SetPrototypeMethod(tpl, "GetReslicePlaneNormal", GetReslicePlaneNormal);
	Nan::SetPrototypeMethod(tpl, "getReslicePlaneNormal", GetReslicePlaneNormal);

	Nan::SetPrototypeMethod(tpl, "GetSliceBounds", GetSliceBounds);
	Nan::SetPrototypeMethod(tpl, "getSliceBounds", GetSliceBounds);

	Nan::SetPrototypeMethod(tpl, "GetThickSlabAxis1", GetThickSlabAxis1);
	Nan::SetPrototypeMethod(tpl, "getThickSlabAxis1", GetThickSlabAxis1);

	Nan::SetPrototypeMethod(tpl, "GetThickSlabAxis2", GetThickSlabAxis2);
	Nan::SetPrototypeMethod(tpl, "getThickSlabAxis2", GetThickSlabAxis2);

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

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

	Nan::SetPrototypeMethod(tpl, "SetResliceCursor", SetResliceCursor);
	Nan::SetPrototypeMethod(tpl, "setResliceCursor", SetResliceCursor);

	Nan::SetPrototypeMethod(tpl, "SetReslicePlaneNormal", SetReslicePlaneNormal);
	Nan::SetPrototypeMethod(tpl, "setReslicePlaneNormal", SetReslicePlaneNormal);

	Nan::SetPrototypeMethod(tpl, "SetReslicePlaneNormalToXAxis", SetReslicePlaneNormalToXAxis);
	Nan::SetPrototypeMethod(tpl, "setReslicePlaneNormalToXAxis", SetReslicePlaneNormalToXAxis);

	Nan::SetPrototypeMethod(tpl, "SetReslicePlaneNormalToYAxis", SetReslicePlaneNormalToYAxis);
	Nan::SetPrototypeMethod(tpl, "setReslicePlaneNormalToYAxis", SetReslicePlaneNormalToYAxis);

	Nan::SetPrototypeMethod(tpl, "SetReslicePlaneNormalToZAxis", SetReslicePlaneNormalToZAxis);
	Nan::SetPrototypeMethod(tpl, "setReslicePlaneNormalToZAxis", SetReslicePlaneNormalToZAxis);

	Nan::SetPrototypeMethod(tpl, "SetSliceBounds", SetSliceBounds);
	Nan::SetPrototypeMethod(tpl, "setSliceBounds", SetSliceBounds);

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

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

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

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

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

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

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

void VtkResliceCursorPolyDataAlgorithmWrap::GetOtherPlaneForAxis(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkResliceCursorPolyDataAlgorithmWrap *wrapper = ObjectWrap::Unwrap<VtkResliceCursorPolyDataAlgorithmWrap>(info.Holder());
	vtkResliceCursorPolyDataAlgorithm *native = (vtkResliceCursorPolyDataAlgorithm *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->GetOtherPlaneForAxis(
			info[0]->Int32Value()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void VtkResliceCursorPolyDataAlgorithmWrap::SetSliceBounds(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkResliceCursorPolyDataAlgorithmWrap *wrapper = ObjectWrap::Unwrap<VtkResliceCursorPolyDataAlgorithmWrap>(info.Holder());
	vtkResliceCursorPolyDataAlgorithm *native = (vtkResliceCursorPolyDataAlgorithm *)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() < 6 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetSliceBounds(
			(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[6];
		if( a0->Length() < 6 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 6; 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->SetSliceBounds(
			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 && info[3]->IsNumber())
				{
					if(info.Length() > 4 && info[4]->IsNumber())
					{
						if(info.Length() > 5 && info[5]->IsNumber())
						{
														if(info.Length() != 6)
							{
								Nan::ThrowError("Too many parameters.");
								return;
							}
							native->SetSliceBounds(
								info[0]->NumberValue(),
								info[1]->NumberValue(),
								info[2]->NumberValue(),
								info[3]->NumberValue(),
								info[4]->NumberValue(),
								info[5]->NumberValue()
							);
							return;
						}
					}
				}
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

