Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
0cb62496
Commit
0cb62496
authored
Feb 29, 2008
by
Emmanuel Christophe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
work in progress
parent
0294240b
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1162 additions
and
1162 deletions
+1162
-1162
Code/IO/otbNetworkedQuadTreeImageIO.cxx
Code/IO/otbNetworkedQuadTreeImageIO.cxx
+1059
-1059
Code/IO/otbNetworkedQuadTreeImageIO.h
Code/IO/otbNetworkedQuadTreeImageIO.h
+103
-103
No files found.
Code/IO/otbNetworkedQuadTreeImageIO.cxx
View file @
0cb62496
This diff is collapsed.
Click to expand it.
Code/IO/otbNetworkedQuadTreeImageIO.h
View file @
0cb62496
...
...
@@ -47,155 +47,155 @@ namespace otb
{
/** \class NetworkedQuadTreeImageIO
*
* \brief ImageIO object for reading (not writing) NetworkedQuadTree images
*
* The streaming read is implemented.
*
* \ingroup IOFilters
*
*
* \brief ImageIO object for reading (not writing) NetworkedQuadTree images
*
* The streaming read is implemented.
*
* \ingroup IOFilters
*
*/
class
ITK_EXPORT
NetworkedQuadTreeImageIO
:
public
itk
::
ImageIOBase
,
public
MetaDataKey
{
public:
class
ITK_EXPORT
NetworkedQuadTreeImageIO
:
public
itk
::
ImageIOBase
,
public
MetaDataKey
{
public:
typedef
unsigned
char
InputPixelType
;
typedef
unsigned
char
InputPixelType
;
/** Standard class typedefs. */
typedef
NetworkedQuadTreeImageIO
Self
;
typedef
itk
::
ImageIOBase
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
/** Standard class typedefs. */
typedef
NetworkedQuadTreeImageIO
Self
;
typedef
itk
::
ImageIOBase
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
/** Method for creation through the object factory. */
itkNewMacro
(
Self
);
/** Method for creation through the object factory. */
itkNewMacro
(
Self
);
/** Run-time type information (and related methods). */
itkTypeMacro
(
NetworkedQuadTreeImageIO
,
itk
::
ImageIOBase
);
/** Run-time type information (and related methods). */
itkTypeMacro
(
NetworkedQuadTreeImageIO
,
itk
::
ImageIOBase
);
/** Set/Get the level of compression for the output images.
* 0-9; 0 = none, 9 = maximum. */
itkSetMacro
(
CompressionLevel
,
int
);
itkGetMacro
(
CompressionLevel
,
int
);
itkSetMacro
(
CompressionLevel
,
int
);
itkGetMacro
(
CompressionLevel
,
int
);
virtual
void
SetCacheDirectory
(
const
char
*
_arg
)
{
if
(
_arg
&&
(
_arg
==
this
->
m_CacheDirectory
)
)
{
return
;}
if
(
_arg
)
{
this
->
m_CacheDirectory
=
_arg
;
this
->
useCache
=
true
;
}
else
{
this
->
m_CacheDirectory
=
""
;
this
->
useCache
=
false
;
}
this
->
Modified
();
}
virtual
void
SetCacheDirectory
(
const
char
*
_arg
)
{
if
(
_arg
&&
(
_arg
==
this
->
m_CacheDirectory
)
)
{
return
;}
if
(
_arg
)
{
this
->
m_CacheDirectory
=
_arg
;
this
->
useCache
=
true
;
}
else
{
this
->
m_CacheDirectory
=
""
;
this
->
useCache
=
false
;
}
this
->
Modified
();
}
virtual
void
SetCacheDirectory
(
const
std
::
string
&
_arg
)
{
this
->
SetCacheDirectory
(
_arg
.
c_str
()
);
this
->
useCache
=
true
;
}
virtual
void
SetCacheDirectory
(
const
std
::
string
&
_arg
)
{
this
->
SetCacheDirectory
(
_arg
.
c_str
()
);
this
->
useCache
=
true
;
}
itkSetMacro
(
Depth
,
int
);
itkGetMacro
(
Depth
,
int
);
itkSetMacro
(
Depth
,
int
);
itkGetMacro
(
Depth
,
int
);
itkGetStringMacro
(
CacheDirectory
);
itkGetStringMacro
(
CacheDirectory
);
/*-------- This part of the interface deals with reading data. ------ */
/*-------- This part of the interface deals with reading data. ------ */
/** Determine the file type. Returns true if this ImageIO can read the
* file specified. */
virtual
bool
CanReadFile
(
const
char
*
);
virtual
bool
CanReadFile
(
const
char
*
);
/** Determine the file type. Returns true if the ImageIO can stream read the specified file */
virtual
bool
CanStreamRead
(){
return
true
;
};
/** Determine the file type. Returns true if the ImageIO can stream read the specified file */
virtual
bool
CanStreamRead
(){
return
true
;
};
/** Set the spacing and dimention information for the set filename. */
virtual
void
ReadImageInformation
();
/** Set the spacing and dimention information for the set filename. */
virtual
void
ReadImageInformation
();
/** Reads the data from disk into the memory buffer provided. */
virtual
void
Read
(
void
*
buffer
);
/** Reads the data from disk into the memory buffer provided. */
virtual
void
Read
(
void
*
buffer
);
/** Reads 3D data from multiple files assuming one slice per file. */
virtual
void
ReadVolume
(
void
*
buffer
);
/** Reads 3D data from multiple files assuming one slice per file. */
virtual
void
ReadVolume
(
void
*
buffer
);
/*-------- This part of the interfaces deals with writing data. ----- */
/*-------- This part of the interfaces deals with writing data. ----- */
/** Determine the file type. Returns true if this ImageIO can read the
* file specified. */
virtual
bool
CanWriteFile
(
const
char
*
);
virtual
bool
CanWriteFile
(
const
char
*
);
/** Determine the file type. Returns true if the ImageIO can stream write the specified file */
/** Determine the file type. Returns true if the ImageIO can stream write the specified file */
//THOMAS
virtual
bool
CanStreamWrite
()
{
return
false
;
};
virtual
bool
CanStreamWrite
()
{
return
false
;
};
/** Writes the spacing and dimentions of the image.
* Assumes SetFileName has been called with a valid file name. */
virtual
void
WriteImageInformation
();
virtual
void
WriteImageInformation
();
/** Writes the data to disk from the memory buffer provided. Make sure
* that the IORegion has been set properly. */
virtual
void
Write
(
const
void
*
buffer
);
virtual
void
Write
(
const
void
*
buffer
);
// JULIEN: NOT USED, NOT IMPLEMENTED
//void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample);
protected:
/** Construtor.*/
NetworkedQuadTreeImageIO
();
/** Destructor.*/
~
NetworkedQuadTreeImageIO
();
protected:
/** Construtor.*/
NetworkedQuadTreeImageIO
();
/** Destructor.*/
~
NetworkedQuadTreeImageIO
();
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
/** Read all information on the image*/
void
InternalReadImageInformation
();
/** Write all information on the image*/
void
InternalWriteImageInformation
();
/** Dimension along Ox of the image*/
int
m_width
;
/** Dimension along Oy of the image*/
int
m_height
;
/** Number of bands of the image*/
int
m_NbBands
;
/** Buffer*/
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
/** Read all information on the image*/
void
InternalReadImageInformation
();
/** Write all information on the image*/
void
InternalWriteImageInformation
();
/** Dimension along Ox of the image*/
int
m_width
;
/** Dimension along Oy of the image*/
int
m_height
;
/** Number of bands of the image*/
int
m_NbBands
;
/** Buffer*/
//float **pafimas;
/** Determines the level of compression for written files.
* Range 0-9; 0 = none, 9 = maximum , default = 4 */
int
m_CompressionLevel
;
const
char
*
m_currentfile
;
private:
NetworkedQuadTreeImageIO
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
void
InternalRead
(
double
x
,
double
y
,
void
*
buffer
);
void
InternalWrite
(
double
x
,
double
y
,
const
void
*
buffer
);
void
BuildFileName
(
std
::
ostringstream
&
quad
,
std
::
ostringstream
&
filename
);
void
GetFromNet
(
std
::
ostringstream
&
quad
);
void
GetFromNet
(
std
::
ostringstream
&
quad
,
double
x
,
double
y
);
void
FillCacheFaults
(
void
*
buffer
);
int
XYToQuadTree
(
double
x
,
double
y
,
std
::
ostringstream
&
quad
);
int
m_CompressionLevel
;
const
char
*
m_currentfile
;
private:
NetworkedQuadTreeImageIO
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
void
InternalRead
(
double
x
,
double
y
,
void
*
buffer
);
void
InternalWrite
(
double
x
,
double
y
,
const
void
*
buffer
);
void
BuildFileName
(
std
::
ostringstream
&
quad
,
std
::
ostringstream
&
filename
);
void
GetFromNet
(
std
::
ostringstream
&
quad
);
void
GetFromNet
(
std
::
ostringstream
&
quad
,
double
x
,
double
y
);
void
FillCacheFaults
(
void
*
buffer
);
int
XYToQuadTree
(
double
x
,
double
y
,
std
::
ostringstream
&
quad
);
/** Nombre d'octets par pixel */
int
m_NbOctetPixel
;
/** Nombre d'octets par pixel */
int
m_NbOctetPixel
;
/** Resolution depth*/
int
m_Depth
;
bool
useCache
;
std
::
string
m_CacheDirectory
;
std
::
string
m_ServerName
;
std
::
string
m_FileSuffix
;
std
::
string
m_AddressMode
;
/** Resolution depth*/
int
m_Depth
;
bool
useCache
;
std
::
string
m_CacheDirectory
;
std
::
string
m_ServerName
;
std
::
string
m_FileSuffix
;
std
::
string
m_AddressMode
;
bool
m_FlagWriteImageInformation
;
bool
m_FlagWriteImageInformation
;
};
};
}
// end namespace otb
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment