X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fitk%2Fsrc%2FbbitkBinaryThresholdImageFilter.h;h=8979fc0b1aa8142063c7272dd15ae45f6e55b396;hb=731d9ee262e286a24e3ea2776d8e914950840a2c;hp=066f6028abab4fe98e89f4553d4b7f6fd4a817f3;hpb=2d2fc4c6349d5040a9f13a240f079e7a1c6687dd;p=bbtk.git diff --git a/packages/itk/src/bbitkBinaryThresholdImageFilter.h b/packages/itk/src/bbitkBinaryThresholdImageFilter.h index 066f602..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: 2008/11/12 12:47:03 $ - Version: $Revision: 1.9 $ + 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() { 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() { 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() @@ -144,7 +185,7 @@ namespace bbitk typedef BinaryThresholdImageFilter FilterType; typename FilterType::Pointer f = FilterType::New("Temp"); typedef T* TPointer; - f->bbSetInputIn( this->bbGetInputIn().get < TPointer > ()); + f->bbSetInputIn( this->bbGetInputIn().get < TPointer > () ); f->bbSetInputLowerThreshold ( (typename T::PixelType) this->bbGetInputLowerThreshold() ); f->bbSetInputUpperThreshold ( (typename T::PixelType) @@ -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