Package org.itk.simple
Class IsolatedConnectedImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.IsolatedConnectedImageFilter
Label pixels that are connected to one set of seeds but not another.
IsolatedConnectedImageFilter finds the optimal threshold to separate two regions. It has two
modes, one to separate dark regions surrounded by bright regions by
automatically finding a minimum isolating upper threshold, and another
to separate bright regions surrounded by dark regions by automatically
finding a maximum lower isolating threshold. The mode can be chosen by
setting FindUpperThresholdOn() /Off(). In both cases, the isolating threshold is retrieved with GetIsolatedValue() .
The algorithm labels pixels with ReplaceValue that are connected to
Seeds1 AND NOT connected to Seeds2. When finding the threshold to
separate two dark regions surrounded by bright regions, given a fixed
lower threshold, the filter adjusts the upper threshold until the two
sets of seeds are not connected. The algorithm uses a binary search to
adjust the upper threshold, starting at Upper. The reverse is true for
finding the threshold to separate two bright regions. Lower defaults
to the smallest possible value for the InputImagePixelType, and Upper
defaults to the largest possible value for the InputImagePixelType.
The user can also supply the Lower and Upper values to restrict the
search. However, if the range is too restrictive, it could happen that
no isolating threshold can be found between the user specified Lower
and Upper values. Therefore, unless the user is sure of the bounds to
set, it is recommended that the user set these values to the lowest
and highest intensity values in the image, respectively.
The user can specify more than one seed for both regions to separate.
The algorithm will try find the threshold that ensures that all of the
first seeds are contained in the resulting segmentation and all of the
second seeds are not contained in the segmentation.
It is possible that the algorithm may not be able to find the
isolating threshold because no such threshold exists. The user can
check for this by querying the GetThresholdingFailed() flag.
See:
itk::simple::IsolatedConnected for the procedural interface
itk::IsolatedConnectedImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkIsolatedConnectedImageFilter.h
-
Field Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::IsolatedConnectedImageFilter::IsolatedConnectedImageFilter() Default Constructor that takes no arguments and initializes default parametersprotected
IsolatedConnectedImageFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
virtual itk::simple::IsolatedConnectedImageFilter::~IsolatedConnectedImageFilter() DestructorImage itk::simple::IsolatedConnectedImageFilter::Execute(const Image &image1) Execute the filter on the input imageprotected void
finalize()
void
Self& itk::simple::IsolatedConnectedImageFilter::FindUpperThresholdOff()void
Self& itk::simple::IsolatedConnectedImageFilter::FindUpperThresholdOn() Set the value of FindUpperThreshold to true or false respectfully.protected static long
boolean
bool itk::simple::IsolatedConnectedImageFilter::GetFindUpperThreshold() const Set/Get whether to find an upper threshold (separating two dark regions) or a lower threshold (separating two bright regions).double
double itk::simple::IsolatedConnectedImageFilter::GetIsolatedValue() const Get value that isolates the two seeds.double
double itk::simple::IsolatedConnectedImageFilter::GetIsolatedValueTolerance() const Set/Get the precision required for the intensity threshold value.double
getLower()
double itk::simple::IsolatedConnectedImageFilter::GetLower() const Set/Get the limit on the lower threshold value.getName()
std::string itk::simple::IsolatedConnectedImageFilter::GetName() const Name of this classshort
uint8_t itk::simple::IsolatedConnectedImageFilter::GetReplaceValue() const Set/Get value to replace thresholded pixels.getSeed1()
std::vector<unsigned int> itk::simple::IsolatedConnectedImageFilter::GetSeed1() constgetSeed2()
std::vector<unsigned int> itk::simple::IsolatedConnectedImageFilter::GetSeed2() constboolean
bool itk::simple::IsolatedConnectedImageFilter::GetThresholdingFailed() const Get the flag that tells whether the algorithm failed to find a threshold.double
getUpper()
double itk::simple::IsolatedConnectedImageFilter::GetUpper() const Set/Get the limit on the upper threshold value.void
setFindUpperThreshold
(boolean FindUpperThreshold) Self& itk::simple::IsolatedConnectedImageFilter::SetFindUpperThreshold(bool FindUpperThreshold) Set/Get whether to find an upper threshold (separating two dark regions) or a lower threshold (separating two bright regions).void
setIsolatedValueTolerance
(double IsolatedValueTolerance) Self& itk::simple::IsolatedConnectedImageFilter::SetIsolatedValueTolerance(double IsolatedValueTolerance) Set/Get the precision required for the intensity threshold value.void
setLower
(double Lower) Self& itk::simple::IsolatedConnectedImageFilter::SetLower(double Lower) Set/Get the limit on the lower threshold value.void
setReplaceValue
(short ReplaceValue) Self& itk::simple::IsolatedConnectedImageFilter::SetReplaceValue(uint8_t ReplaceValue) Set/Get value to replace thresholded pixels.void
setSeed1
(VectorUInt32 Seed1) Self& itk::simple::IsolatedConnectedImageFilter::SetSeed1(std::vector< unsigned int > Seed1) Set a single seed point 1.void
setSeed2
(VectorUInt32 Seed2) Self& itk::simple::IsolatedConnectedImageFilter::SetSeed2(std::vector< unsigned int > Seed2) Set a single seed point 2.void
setUpper
(double Upper) Self& itk::simple::IsolatedConnectedImageFilter::SetUpper(double Upper) Set/Get the limit on the upper threshold value.protected static long
toString()
std::string itk::simple::IsolatedConnectedImageFilter::ToString() const Print ourselves outMethods inherited from class org.itk.simple.ImageFilter
getCPtr, swigRelease
Methods inherited from class org.itk.simple.ProcessObject
abort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
-
Constructor Details
-
IsolatedConnectedImageFilter
protected IsolatedConnectedImageFilter(long cPtr, boolean cMemoryOwn) -
IsolatedConnectedImageFilter
public IsolatedConnectedImageFilter()itk::simple::IsolatedConnectedImageFilter::IsolatedConnectedImageFilter() Default Constructor that takes no arguments and initializes default parameters
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classImageFilter
-
delete
public void delete()virtual itk::simple::IsolatedConnectedImageFilter::~IsolatedConnectedImageFilter() Destructor- Overrides:
delete
in classImageFilter
-
setSeed1
Self& itk::simple::IsolatedConnectedImageFilter::SetSeed1(std::vector< unsigned int > Seed1) Set a single seed point 1. This seed will be isolated from Seed2 (if possible). All pixels connected to this seed will be replaced with ReplaceValue. -
getSeed1
std::vector<unsigned int> itk::simple::IsolatedConnectedImageFilter::GetSeed1() const -
setSeed2
Self& itk::simple::IsolatedConnectedImageFilter::SetSeed2(std::vector< unsigned int > Seed2) Set a single seed point 2. This seed will be isolated from Seed1 (if possible). -
getSeed2
std::vector<unsigned int> itk::simple::IsolatedConnectedImageFilter::GetSeed2() const -
setLower
public void setLower(double Lower) Self& itk::simple::IsolatedConnectedImageFilter::SetLower(double Lower) Set/Get the limit on the lower threshold value. The default is the NonpositiveMin() for the InputPixelType. -
getLower
public double getLower()double itk::simple::IsolatedConnectedImageFilter::GetLower() const Set/Get the limit on the lower threshold value. The default is the NonpositiveMin() for the InputPixelType. -
setUpper
public void setUpper(double Upper) Self& itk::simple::IsolatedConnectedImageFilter::SetUpper(double Upper) Set/Get the limit on the upper threshold value. The default is the max() for the InputPixelType. -
getUpper
public double getUpper()double itk::simple::IsolatedConnectedImageFilter::GetUpper() const Set/Get the limit on the upper threshold value. The default is the max() for the InputPixelType. -
setReplaceValue
public void setReplaceValue(short ReplaceValue) Self& itk::simple::IsolatedConnectedImageFilter::SetReplaceValue(uint8_t ReplaceValue) Set/Get value to replace thresholded pixels. Pixels that lie within the thresholds will be replaced with this value. The default is 1. -
getReplaceValue
public short getReplaceValue()uint8_t itk::simple::IsolatedConnectedImageFilter::GetReplaceValue() const Set/Get value to replace thresholded pixels. Pixels that lie within the thresholds will be replaced with this value. The default is 1. -
setIsolatedValueTolerance
public void setIsolatedValueTolerance(double IsolatedValueTolerance) Self& itk::simple::IsolatedConnectedImageFilter::SetIsolatedValueTolerance(double IsolatedValueTolerance) Set/Get the precision required for the intensity threshold value. The default is 1. -
getIsolatedValueTolerance
public double getIsolatedValueTolerance()double itk::simple::IsolatedConnectedImageFilter::GetIsolatedValueTolerance() const Set/Get the precision required for the intensity threshold value. The default is 1. -
setFindUpperThreshold
public void setFindUpperThreshold(boolean FindUpperThreshold) Self& itk::simple::IsolatedConnectedImageFilter::SetFindUpperThreshold(bool FindUpperThreshold) Set/Get whether to find an upper threshold (separating two dark regions) or a lower threshold (separating two bright regions). -
findUpperThresholdOn
public void findUpperThresholdOn()Self& itk::simple::IsolatedConnectedImageFilter::FindUpperThresholdOn() Set the value of FindUpperThreshold to true or false respectfully. -
findUpperThresholdOff
public void findUpperThresholdOff()Self& itk::simple::IsolatedConnectedImageFilter::FindUpperThresholdOff() -
getFindUpperThreshold
public boolean getFindUpperThreshold()bool itk::simple::IsolatedConnectedImageFilter::GetFindUpperThreshold() const Set/Get whether to find an upper threshold (separating two dark regions) or a lower threshold (separating two bright regions). -
getThresholdingFailed
public boolean getThresholdingFailed()bool itk::simple::IsolatedConnectedImageFilter::GetThresholdingFailed() const Get the flag that tells whether the algorithm failed to find a threshold. This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution. -
getIsolatedValue
public double getIsolatedValue()double itk::simple::IsolatedConnectedImageFilter::GetIsolatedValue() const Get value that isolates the two seeds. This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution. -
getName
std::string itk::simple::IsolatedConnectedImageFilter::GetName() const Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::IsolatedConnectedImageFilter::ToString() const Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
Image itk::simple::IsolatedConnectedImageFilter::Execute(const Image &image1) Execute the filter on the input image
-