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
Container Registry
Model registry
Operate
Environments
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
Main Repositories
otb
Commits
0829ab55
Commit
0829ab55
authored
7 years ago
by
Antoine Regimbeau
Browse files
Options
Downloads
Patches
Plain Diff
Remove filter created that was replaced by an Itk Filter
parent
ea27ec5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Modules/Core/Streaming/include/otbStreamingImageRAMWriter.h
+0
-79
0 additions, 79 deletions
Modules/Core/Streaming/include/otbStreamingImageRAMWriter.h
Modules/Core/Streaming/include/otbStreamingImageRAMWriter.txx
+0
-101
0 additions, 101 deletions
...les/Core/Streaming/include/otbStreamingImageRAMWriter.txx
with
0 additions
and
180 deletions
Modules/Core/Streaming/include/otbStreamingImageRAMWriter.h
deleted
100644 → 0
+
0
−
79
View file @
ea27ec5b
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otbStreamingImageRAMWriter_h
#define otbStreamingImageRAMWriter_h
#include
"itkMacro.h"
#include
"itkImageToImageFilter.h"
#include
"itkImageBase.h"
namespace
otb
{
template
<
class
TInputImage
>
class
ITK_EXPORT
StreamingImageRAMWriter
:
public
itk
::
ImageToImageFilter
<
TInputImage
,
TInputImage
>
{
public:
typedef
StreamingImageRAMWriter
Self
;
typedef
itk
::
ImageToImageFilter
<
TInputImage
,
TInputImage
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
typedef
typename
TInputImage
::
RegionType
OutputImageRegionType
;
itkNewMacro
(
Self
);
itkTypeMacro
(
StreamingImageRAMWriter
,
itk
::
ImageToImageFilter
);
protected:
StreamingImageRAMWriter
(){};
~
StreamingImageRAMWriter
()
ITK_OVERRIDE
{};
void
AllocateOutputs
();
void
GenerateOutputInformation
();
void
ThreadedGenerateData
(
const
OutputImageRegionType
&
outputRegionForThread
,
itk
::
ThreadIdType
threadId
);
private
:
StreamingImageRAMWriter
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
};
}
// end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include
"otbStreamingImageRAMWriter.txx"
#endif
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Modules/Core/Streaming/include/otbStreamingImageRAMWriter.txx
deleted
100644 → 0
+
0
−
101
View file @
ea27ec5b
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otbStreamingImageRAMWriter_txx
#define otbStreamingImageRAMWriter_txx
#include "otbStreamingImageRAMWriter.h"
#include "itkOutputDataObjectIterator.h"
namespace otb
{
template< typename TInputImage >
void StreamingImageRAMWriter < TInputImage >
::AllocateOutputs()
{
typedef itk::ImageBase< 2 > ImageBaseType;
typename ImageBaseType::Pointer outputPtr;
// Allocate the output memory
for ( itk::OutputDataObjectIterator it(this); !it.IsAtEnd(); it++ )
{
// Check whether the output is an image of the appropriate
// dimension (use ProcessObject's version of the GetInput()
// method since it returns the input as a pointer to a
// DataObject as opposed to the subclass version which
// static_casts the input to an TInputImage).
outputPtr = dynamic_cast< ImageBaseType * >( it.GetOutput() );
if ( outputPtr &&
!outputPtr->GetRequestedRegion().IsInside(outputPtr->GetBufferedRegion() ) )
{
outputPtr->SetBufferedRegion( outputPtr->GetRequestedRegion() );
outputPtr->Allocate();
}
}
}
template< typename TInputImage >
void StreamingImageRAMWriter < TInputImage >
::GenerateOutputInformation()
{
Superclass::GenerateOutputInformation();
typename TInputImage::ConstPointer input = this->GetInput();
typename TInputImage::Pointer output = this->GetOutput();
if ( !input || !output )
{
return;
}
output->SetLargestPossibleRegion( input->GetLargestPossibleRegion() );
output->SetBufferedRegion( input->GetLargestPossibleRegion() );
output->SetRequestedRegion( input->GetRequestedRegion() );
std::cout<<"Ram writer output Largest :"<<output->GetLargestPossibleRegion().GetSize()<<std::endl;
std::cout<<"Ram writer output Requested :"<<output->GetRequestedRegion().GetSize()<<std::endl;
output->Allocate();
}
template< typename TInputImage >
void StreamingImageRAMWriter < TInputImage >
::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
itk::ThreadIdType itkNotUsed( threadId ) )
{
typename TInputImage::ConstPointer input = this->GetInput();
typename TInputImage::Pointer output = this->GetOutput();
itk::ImageRegionConstIterator < TInputImage > it ( input ,
outputRegionForThread );
itk::ImageRegionIterator < TInputImage > oit ( output ,
outputRegionForThread );
it.GoToBegin();
oit.GoToBegin();
while( !it.IsAtEnd() )
{
oit.Set( it.Get() );
++oit;
++it;
}
}
} // end namespace otb
#endif
\ No newline at end of file
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