X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fitk%2Fsrc%2FbbitkBinaryThresholdImageFilter.h;h=8979fc0b1aa8142063c7272dd15ae45f6e55b396;hb=731d9ee262e286a24e3ea2776d8e914950840a2c;hp=c66255c351b7a9ff735a32351eb28965b7072e79;hpb=ca358f4baa7cb29eac5628d39f6084b8b13b517a;p=bbtk.git diff --git a/packages/itk/src/bbitkBinaryThresholdImageFilter.h b/packages/itk/src/bbitkBinaryThresholdImageFilter.h index c66255c..8979fc0 100644 --- a/packages/itk/src/bbitkBinaryThresholdImageFilter.h +++ b/packages/itk/src/bbitkBinaryThresholdImageFilter.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbitkBinaryThresholdImageFilter.h,v $ Language: C++ - Date: $Date: 2009/03/23 12:55:49 $ - Version: $Revision: 1.11 $ + Date: $Date: 2009/05/18 10:45:43 $ + Version: $Revision: 1.13 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -39,6 +39,7 @@ namespace bbitk { + //=================================================== template class /*BBTK_EXPORT*/ BinaryThresholdImageFilter : @@ -57,12 +58,10 @@ namespace bbitk BBTK_ITK_PROCESS(); BBTK_ITK_DELETE(); - void bbUserConstructor() { Init(); } - void bbUserCopyConstructor(bbtk::BlackBox::Pointer) { Init(); } - void Init(); - }; + //=================================================== + //=================================================== BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX(BinaryThresholdImageFilter, bbtk::AtomicBlackBox); BBTK_NAME("BinaryThresholdImageFilter<"+bbtk::TypeName()+">"); @@ -81,6 +80,39 @@ namespace bbitk typename T::PixelType); BBTK_TEMPLATE_OUTPUT(BinaryThresholdImageFilter,Out,"Output image",T*); BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(BinaryThresholdImageFilter); + //=================================================== + + + //=================================================== + //-- + template + void BinaryThresholdImageFilter::bbUserSetDefaultValues() + { + bbSetInputLowerThreshold(0); + bbSetInputUpperThreshold(100); + bbSetInputInsideValue(255); + bbSetInputOutsideValue(0); + } + template + void BinaryThresholdImageFilter::bbUserInitializeProcessing() + { + } + template + void BinaryThresholdImageFilter::bbUserFinalizeProcessing() + { + } + + //=================================================== + + + + + + + + + + //=================================================== // Generic "untemplatized" filter @@ -101,11 +133,12 @@ namespace bbitk private : inline void ProcessSwitch(); template void Process(); - void bbUserConstructor() { Init(); } - void bbUserCopyConstructor(bbtk::BlackBox::Pointer) { Init(); } - void Init(); }; + //=================================================== + + //=================================================== + BBTK_BEGIN_DESCRIBE_BLACK_BOX(BinaryThresholdImageFilterGeneric, bbtk::AtomicBlackBox); BBTK_NAME("BinaryThresholdImageFilter"); @@ -126,13 +159,21 @@ namespace bbitk "Output image. Of the same type and dimension than the input image", anyImagePointer,""); BBTK_END_DESCRIBE_BLACK_BOX(BinaryThresholdImageFilterGeneric); + //=================================================== + + + //=================================================== void BinaryThresholdImageFilterGeneric::ProcessSwitch() { BBTK_TEMPLATE_ITK_IMAGE_SWITCH(bbGetInputIn().type(), this->Process); } + //=================================================== + + + //=================================================== template void BinaryThresholdImageFilterGeneric::Process() @@ -159,24 +200,16 @@ namespace bbitk bbtkDebugDecTab("Core",9); } - - template - void BinaryThresholdImageFilter::Init() - { - bbSetInputLowerThreshold(0); - bbSetInputUpperThreshold(100); - bbSetInputInsideValue(255); - bbSetInputOutsideValue(0); - } - void BinaryThresholdImageFilterGeneric::Init() - { - bbSetInputLowerThreshold(0); - bbSetInputUpperThreshold(100); - bbSetInputInsideValue(255); - bbSetInputOutsideValue(0); - } + //=================================================== + + + + + + + } // EO namespace bbtk