Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
7ed2913a
Commit
7ed2913a
authored
14 years ago
by
Patrick Imbo
Browse files
Options
Downloads
Patches
Plain Diff
ENH: remove unused file
parent
ac57325b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/SARPolarimetry/otbMuellerToMLCImageFilter.txx
+0
-153
0 additions, 153 deletions
Code/SARPolarimetry/otbMuellerToMLCImageFilter.txx
with
0 additions
and
153 deletions
Code/SARPolarimetry/otbMuellerToMLCImageFilter.txx
deleted
100644 → 0
+
0
−
153
View file @
ac57325b
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $otbStokesToMCLImageFilter.txx$
Language: C++
Date: $Date: 24/10/2006 $
Version: $Version: 1.0 $
=========================================================================*/
#ifndef __StokesToMLCImageFilter_txx
#define __StokesToMLCImageFilter_txx
#include "otbStokesToMLCImageFilter.h"
#include "itkConstNeighborhoodIterator.h"
#include "itkNeighborhoodInnerProduct.h"
#include "itkImageRegionIterator.h"
#include "itkNeighborhoodAlgorithm.h"
#include "itkZeroFluxNeumannBoundaryCondition.h"
#include "itkOffset.h"
#include "itkProgressReporter.h"
namespace otb
{
template <class TPixel>
StokesToMLCImageFilter<TPixel>::StokesToMLCImageFilter()
{
// !! TInputImage should be StokesType and TOutputImage should be MLCType (otherwise fail)
}
template <class TPixel>
void
StokesToMLCImageFilter<TPixel>
::GenerateInputRequestedRegion() throw (itk::InvalidRequestedRegionError)
{
// call the superclass' implementation of this method
Superclass::GenerateInputRequestedRegion();
// get pointers to the input and output
typename Superclass::InputImagePointer inputPtr =
const_cast< InputImageType * >( this->GetInput() );
typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
if ( !inputPtr || !outputPtr )
{
return;
}
// get a copy of the input requested region (should equal the output
// requested region)
typename InputImageType::RegionType inputRequestedRegion;
inputRequestedRegion = inputPtr->GetRequestedRegion();
// crop the input requested region at the input's largest possible region
if ( inputRequestedRegion.Crop(inputPtr->GetLargestPossibleRegion()) )
{
inputPtr->SetRequestedRegion( inputRequestedRegion );
return;
}
else
{
// Couldn't crop the region (requested region is outside the largest
// possible region). Throw an exception.
// store what we tried to request (prior to trying to crop)
inputPtr->SetRequestedRegion( inputRequestedRegion );
// build an exception
itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
e.SetLocation(ITK_LOCATION);
e.SetDescription("Requested region is (at least partially) outside the largest possible region.");
e.SetDataObject(inputPtr);
throw e;
}
}
template< class TPixel>
void
StokesToMLCImageFilter< TPixel>
::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
int threadId)
{
float M11, M12, M13, M14, M22, M23, M24, M33, M34, M44;
float C1, C2, C3, C4, C5, C6, C7, C8, C9;
itk::ImageRegionConstIterator<InputImageType> inIt (this->GetInput(),outputRegionForThread);
itk::ImageRegionIterator<OutputImageType> outIt (this->GetOutput(),outputRegionForThread);
MLCType vectorValue;
int numPix =0;
for ( inIt.GoToBegin(), outIt.GoToBegin(); !inIt.IsAtEnd(); ++inIt, ++outIt)
{
M11 = inIt.Get()[0];
M12 = inIt.Get()[1];
M13 = inIt.Get()[2];
M14 = inIt.Get()[3];
M23 = inIt.Get()[4];
M24 = inIt.Get()[5];
M33 = inIt.Get()[6];
M34 = inIt.Get()[7];
M44 = inIt.Get()[8];
M22 = inIt.Get()[9];
vectorValue[0]=M11+M22+2.*M12; // C1 <hh.hh*>
vectorValue[1]=M11-M22; // C2 <hv.hv*>
vectorValue[2]=M11+M22-2.*M12; // C3 <vv.vv*>
vectorValue[3]=M13+M23; // C4 Re<hh.hv*>
vectorValue[4]=-1.*(M14+M24); // C5 Im<hh.hv*>
vectorValue[5]=M33-M44; // C6 Re<hh.vv*>
vectorValue[6]=-2.*M34; // C7 Im<hh.vv*>
vectorValue[7]=M13-M23; // C8 Re<hv.vv>
vectorValue[8] = -1.*(M14-M24); // C9 Im<hv.vv*>
outIt.Set(vectorValue);
//if (numPix== (189*2317+920))
//{
// std::cout << "Reg : " << outputRegionForThread.GetIndex()[0] << " "<< outputRegionForThread.GetIndex()[1] <<std::endl;
// std::cout << numPix << "----"<< M11 << " "<< M12 << " "<< M13<< " "<< M14 << std::endl;
//}
numPix++;
}
}
/**
* Standard "PrintSelf" method
*/
template <class TPixel>
void
StokesToMLCImageFilter<TPixel>
::PrintSelf(
std::ostream& os,
itk::Indent indent) const
{
Superclass::PrintSelf( os, indent );
}
} // end namespace otb
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment