+
+
+//===================================================
+void mySampleBoxWithITK::Process()
+{
+ bbtk::TypeInfo t = bbGetInputIn().type();
+ BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t, this->ProcessTemplated);
+}
+//===================================================
+
+
+//===================================================
+template <class ImageType>
+void mySampleBoxWithITK::ProcessTemplated()
+{
+ bbtkDebugMessageInc("Core",9,"bbitk::BinaryThresholdImageFilter::Process<"<<bbtk::TypeName<ImageType>()<<">()"<<std::endl);
+
+ typedef itk::BinaryThresholdImageFilter<ImageType,ImageType> FilterType;
+ typename FilterType::Pointer filter = FilterType::New();
+
+ // Input
+ ImageType* in = this->bbGetInputIn().get<ImageType*>();
+ filter->SetInput( in );
+ filter->SetInsideValue (255);
+ filter->SetOutsideValue (0);
+ filter->SetLowerThreshold( bbGetInputLower() );
+ filter->SetUpperThreshold( bbGetInputUpper() );
+
+ filter->Update();
+ filter->GetOutput()->Register();
+ if (mOutput) mOutput->UnRegister();
+ mOutput = filter->GetOutput();
+ this->bbSetOutputOut( filter->GetOutput() );
+
+ bbtkDebugDecTab("Core",9);
+}
+//===================================================
+