Skip to content
Snippets Groups Projects
Commit f5fab7eb authored by Aurélien Bricier's avatar Aurélien Bricier
Browse files

ENH: renamed texture application to HaralickTextureExtraction

parent b8b3f50f
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,8 @@ OTB_CREATE_APPLICATION(NAME LineSegmentDetection
SOURCES otbLineSegmentDetection.cxx
LINK_LIBRARIES OTBIO;OTBCommon;OTBBasicFilters)
OTB_CREATE_APPLICATION(NAME TextureExtraction
SOURCES otbTextureExtraction.cxx
OTB_CREATE_APPLICATION(NAME HaralickTextureExtraction
SOURCES otbHaralickTextureExtraction.cxx
LINK_LIBRARIES OTBIO;OTBCommon;OTBBasicFilters)
#OTB_CREATE_APPLICATION(NAME ComputeImageFeatures
......
......@@ -34,11 +34,11 @@ namespace otb
namespace Wrapper
{
class TextureExtraction : public Application
class HaralickTextureExtraction : public Application
{
public:
/** Standard class typedefs. */
typedef TextureExtraction Self;
typedef HaralickTextureExtraction Self;
typedef Application Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -60,18 +60,18 @@ typedef ImageListToVectorImageFilter<ImageListType, FloatVectorImageType> I
/** Standard macro */
itkNewMacro(Self);
itkTypeMacro(TextureExtraction, otb::Application);
itkTypeMacro(HaralickTextureExtraction, otb::Application);
private:
void DoInit()
{
SetName("TextureExtraction");
SetName("HaralickTextureExtraction");
SetDescription("Computes textures on every pixel of the input image selected channel");
// Documentation
SetDocName("Texture Extraction");
SetDocLongDescription("This application computes Haralick, advanced an higher order texture on a mono band image");
SetDocName("Haralick Texture Extraction");
SetDocLongDescription("This application computes Haralick, advanced an higher order textures on a mono band image");
SetDocLimitations("None");
SetDocAuthors("OTB-Team");
SetDocSeeAlso("otbScalarImageToTexturesFilter, otbScalarImageToAdvancedTexturesFilter and otbScalarImageToHigherOrderTexturesFilter classes");
......@@ -162,6 +162,13 @@ void DoUpdateParameters()
void DoExecute()
{
FloatVectorImageType::Pointer inImage = GetParameterImage("in");
inImage->UpdateOutputInformation();
if( GetParameterInt("channel") > inImage->GetNumberOfComponentsPerPixel() )
{
otbAppLogCRITICAL("Selected band is not available...");
return;
}
RadiusType radius;
radius[0] = GetParameterInt("parameters.xrad");
......@@ -272,4 +279,4 @@ ImageListToVectorImageFilterType::Pointer m_HigConcatener;
}
}
OTB_APPLICATION_EXPORT(otb::Wrapper::TextureExtraction)
OTB_APPLICATION_EXPORT(otb::Wrapper::HaralickTextureExtraction)
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