Skip to content
Snippets Groups Projects
Commit a404fd96 authored by Jordi Inglada's avatar Jordi Inglada
Browse files

Exemple watershed

parent 7bec4392
No related branches found
No related tags found
No related merge requests found
SUBDIRS(Common BasicFilters IO ChangeDetection FeatureExtraction Learning Visu) SUBDIRS(Common BasicFilters IO ChangeDetection FeatureExtraction
Learning Visu Segmentation)
...@@ -74,7 +74,8 @@ TARGET_LINK_LIBRARIES(FastMarchingImageFilter OTBCommon OTBIO ITKNumerics ITKIO) ...@@ -74,7 +74,8 @@ TARGET_LINK_LIBRARIES(FastMarchingImageFilter OTBCommon OTBIO ITKNumerics ITKIO)
#TARGET_LINK_LIBRARIES(CurvesLevelSetImageFilter ITKNumerics ITKIO) #TARGET_LINK_LIBRARIES(CurvesLevelSetImageFilter ITKNumerics ITKIO)
ADD_EXECUTABLE(WatershedSegmentation WatershedSegmentation.cxx ) ADD_EXECUTABLE(WatershedSegmentation WatershedSegmentation.cxx )
TARGET_LINK_LIBRARIES(WatershedSegmentation OTBCommon OTBIO ITKAlgorithms ITKNumerics ITKIO) TARGET_LINK_LIBRARIES(WatershedSegmentation OTBCommon OTBIO
OTBSegmentation ITKAlgorithms ITKNumerics ITKIO)
#ADD_EXECUTABLE(SegmentationExamples SegmentationExamples.cxx ) #ADD_EXECUTABLE(SegmentationExamples SegmentationExamples.cxx )
......
...@@ -97,7 +97,10 @@ int main( int argc, char *argv[] ) ...@@ -97,7 +97,10 @@ int main( int argc, char *argv[] )
// vector-valued data and the segmentation is done using floating point // vector-valued data and the segmentation is done using floating point
// scalar data. Images are converted from RGB pixel type to // scalar data. Images are converted from RGB pixel type to
// numerical vector type using \doxygen{VectorCastImageFilter}. // numerical vector type using \doxygen{VectorCastImageFilter}.
//\textbf{FIXME: otbImage} // Please pay attention to the fact that we are using
// \doxygen{itk::Image}s since the
// \doxygen{itk::VectorGradientMagnitudeImageFilter} has some
// internal typedefs which make polymorfism impossible.
// Software Guide : EndLatex // Software Guide : EndLatex
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
...@@ -122,7 +125,7 @@ int main( int argc, char *argv[] ) ...@@ -122,7 +125,7 @@ int main( int argc, char *argv[] )
CastFilterType; CastFilterType;
typedef itk::VectorGradientAnisotropicDiffusionImageFilter<VectorImageType, typedef itk::VectorGradientAnisotropicDiffusionImageFilter<VectorImageType,
VectorImageType> DiffusionFilterType; VectorImageType> DiffusionFilterType;
typedef itk::VectorGradientMagnitudeImageFilter<VectorImageType> typedef itk::VectorGradientMagnitudeImageFilter<VectorImageType,float,ScalarImageType>
GradientMagnitudeFilterType; GradientMagnitudeFilterType;
typedef itk::WatershedImageFilter<ScalarImageType> WatershedFilterType; typedef itk::WatershedImageFilter<ScalarImageType> WatershedFilterType;
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
......
...@@ -53,7 +53,7 @@ int main( int argc, char ** argv ) ...@@ -53,7 +53,7 @@ int main( int argc, char ** argv )
// We will build a very simple pipeline where a reader gets an image // We will build a very simple pipeline where a reader gets an image
// from a file and gives it to the viewer. We define the types for // from a file and gives it to the viewer. We define the types for
// the pixel, the image and the reader. The viewer class is templated // the pixel, the image and the reader. The viewer class is templated
// over the scalar component of the pixel type. // over the scalar component of the pixel type.
// //
// Software Guide : EndLatex // Software Guide : EndLatex
......
...@@ -16,6 +16,7 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE} ...@@ -16,6 +16,7 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Code/FeatureExtraction ${OTB_SOURCE_DIR}/Code/FeatureExtraction
${OTB_SOURCE_DIR}/Code/Learning ${OTB_SOURCE_DIR}/Code/Learning
${OTB_SOURCE_DIR}/Code/Visu ${OTB_SOURCE_DIR}/Code/Visu
${OTB_SOURCE_DIR}/Code/Segmentation
) )
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment