#include <bbvtkSegmentationConnectivity.h>
Protected Member Functions | |
virtual void | bbUserConstructor () |
virtual void | bbUserDestructor () |
Private Member Functions | |
BBTK_BLACK_BOX_INTERFACE (SegmentationConnectivity, bbtk::AtomicBlackBox) | |
BBTK_DECLARE_INPUT (In, vtkImageData *) | |
BBTK_DECLARE_INPUT (PositionXYZ, std::vector< int >) | |
BBTK_DECLARE_INPUT (ThresholdMinMax, std::vector< int >) | |
BBTK_DECLARE_OUTPUT (Out, vtkImageData *) | |
BBTK_PROCESS (DoProcess) | |
void | DoProcess () |
Private Attributes | |
vtkImageCast * | cast2 |
vtkImageCast * | cast4 |
vtkImageThreshold * | thresh2 |
vtkImageSeedConnectivity * | connect2 |
Definition at line 62 of file bbvtkSegmentationConnectivity.h.
bbvtk::SegmentationConnectivity::BBTK_BLACK_BOX_INTERFACE | ( | SegmentationConnectivity | , | |
bbtk::AtomicBlackBox | ||||
) | [private] |
bbvtk::SegmentationConnectivity::BBTK_DECLARE_INPUT | ( | In | , | |
vtkImageData * | ||||
) | [private] |
bbvtk::SegmentationConnectivity::BBTK_DECLARE_INPUT | ( | PositionXYZ | , | |
std::vector< int > | ||||
) | [private] |
bbvtk::SegmentationConnectivity::BBTK_DECLARE_INPUT | ( | ThresholdMinMax | , | |
std::vector< int > | ||||
) | [private] |
bbvtk::SegmentationConnectivity::BBTK_DECLARE_OUTPUT | ( | Out | , | |
vtkImageData * | ||||
) | [private] |
bbvtk::SegmentationConnectivity::BBTK_PROCESS | ( | DoProcess | ) | [private] |
void bbvtk::SegmentationConnectivity::DoProcess | ( | ) | [private] |
Definition at line 90 of file bbvtkSegmentationConnectivity.cxx.
References cast2, cast4, connect2, and thresh2.
00091 { 00092 vtkImageData *imagedata = bbGetInputIn(); 00093 imagedata->UpdateInformation(); 00094 imagedata->SetUpdateExtent(imagedata->GetWholeExtent()); 00095 imagedata->Update(); 00096 thresh2->ThresholdBetween(3000, 3001); 00097 thresh2->SetInput(imagedata); 00098 thresh2->ThresholdBetween(bbGetInputThresholdMinMax()[0], bbGetInputThresholdMinMax()[1]); 00099 thresh2->Update(); 00100 cast2->Update(); 00101 connect2->RemoveAllSeeds (); 00102 connect2->AddSeed( bbGetInputPositionXYZ()[0] , bbGetInputPositionXYZ()[1] , bbGetInputPositionXYZ()[2] ); 00103 connect2->Update(); 00104 cast4->Update(); 00105 00106 bbSetOutputOut(cast4->GetOutput() ); 00107 }
void bbvtk::SegmentationConnectivity::bbUserConstructor | ( | ) | [protected, virtual] |
Definition at line 51 of file bbvtkSegmentationConnectivity.cxx.
References cast2, cast4, connect2, and thresh2.
00052 { 00053 bbSetInputIn(NULL); 00054 std::vector<int> position; 00055 position.push_back(0); 00056 position.push_back(0); 00057 position.push_back(0); 00058 bbSetInputPositionXYZ(position); 00059 std::vector<int> threshold; 00060 threshold.push_back(0); 00061 threshold.push_back(0); 00062 bbSetInputThresholdMinMax(threshold); 00063 bbSetOutputOut(NULL); 00064 thresh2 = vtkImageThreshold::New(); 00065 thresh2->SetInValue(255); 00066 thresh2->SetOutputScalarTypeToUnsignedShort(); 00067 thresh2->SetOutValue(0); 00068 cast2 = vtkImageCast::New(); 00069 cast2->SetInput(thresh2->GetOutput()); 00070 cast2->SetOutputScalarTypeToUnsignedChar(); 00071 connect2 = vtkImageSeedConnectivity::New(); 00072 connect2->SetInput(cast2->GetOutput()); 00073 connect2->SetInputConnectValue(255); 00074 connect2->SetOutputConnectedValue(255); 00075 connect2->SetOutputUnconnectedValue(0); 00076 cast4 = vtkImageCast::New(); 00077 cast4->SetInput(connect2->GetOutput()); 00078 cast4->SetOutputScalarTypeToUnsignedShort(); 00079 }
void bbvtk::SegmentationConnectivity::bbUserDestructor | ( | ) | [protected, virtual] |
vtkImageCast* bbvtk::SegmentationConnectivity::cast2 [private] |
Definition at line 79 of file bbvtkSegmentationConnectivity.h.
Referenced by bbUserConstructor(), bbUserDestructor(), and DoProcess().
vtkImageCast* bbvtk::SegmentationConnectivity::cast4 [private] |
Definition at line 80 of file bbvtkSegmentationConnectivity.h.
Referenced by bbUserConstructor(), bbUserDestructor(), and DoProcess().
vtkImageThreshold* bbvtk::SegmentationConnectivity::thresh2 [private] |
Definition at line 81 of file bbvtkSegmentationConnectivity.h.
Referenced by bbUserConstructor(), bbUserDestructor(), and DoProcess().
vtkImageSeedConnectivity* bbvtk::SegmentationConnectivity::connect2 [private] |
Definition at line 82 of file bbvtkSegmentationConnectivity.h.
Referenced by bbUserConstructor(), bbUserDestructor(), and DoProcess().