16,004,727 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by rfrank5356 (Top 5 by date)
rfrank5356
12-Apr-11 19:37pm
View
This is looking promising - but I am running into a structure challenge - I am defining
Public Structure SpectralBands
Public SpectralValue() As UShort
End Structure
and I want the length to be 120 occurances to the spectral band.
Here is where I am at
Dim TotalFileLength As Long = 49184768
Using CubeData = MemoryMappedFile.CreateFromFile(InputImageName, FileMode.Open)
Using BandReader = CubeData.CreateViewAccessor(HeaderCharLength, 0)
Dim SpectralBand As UShort()
Dim i As Long = 0
Do While i < TotalFileLength
BandReader.Read(->> lost here
Loop
End Using
So I have a data structure and type problem - I'll hit this again in the am as I have one more project to solve today (aviation crab control software . . :))
rfrank5356
12-Apr-11 18:28pm
View
No -I didn't have to pay - but it still cost me as I have spun my wheels :)
The extra code is just to display progress - the final will reference a parameter file and look for cell values within a set range in particular bands in any row/column.
Looking at the MemoryMappedViewAccessor description - Back in a few
rfrank5356
12-Apr-11 16:32pm
View
The data will always be a single record file, and I plan to use dispose to free up memory after each read. The ultimate file sizes will be in the 100MB range, and I have a control file tht lists the files to be processed.
rfrank5356
12-Apr-11 16:30pm
View
Hi - I have a Imports System.IO statement which seems to make Streamreader visable. I suspect that the read to end might be the solution, but when I tried to implement it - I ran into problems defining the data. I thought a fixed length record would be a solution but ran into problems with initializing the aray, type conversions etc. Could you suggest a data structure that would work? Thanks
- bob
rfrank5356
12-Apr-11 16:24pm
View
Wow - that was a fast response - thanks -
I posted the wrong c code - here is the code from the hardware mfg
<pre lang="cs">integer*2 datacube[640][640][120] // array of two-byte integers (column, row, band)
byte dummy[32768);
fread(in, sizeof(byte), 32768, dummy)
for(int column=0;column<640;column++){
for(int band=0;band<120;band++){
for(int row=0;row<640;row++){
fread(in, sizeof(integer*2),1,datacube[row][column][band]);
}
}
}</pre>
I have looked at the interop and it looks like a complex process to implement.
More on the next post