See this link for more details.
The Problem:
I want to loop through a continuous raster (one that has no attribute table), cell by cell, and get the value of the cell. I want to take those values and run conditionals on them, emulating the map algebra steps detailed below without actually using the raster calculator.
Per request of comments below, I have added details providing background to the problem and justifying the need to implement a method as such in the section below called "The analysis needed:".
The analysis proposed below, while being relevant to my problem by providing background,does not need to be implemented in an answer. The scope of the question only pertains to iterating through a continuous raster to get/set the cell values.
The analysis needed:
If ANY of the following conditions are fulfilled, give output cell a value of 1. Only give output cell a value of 0 if none of the conditions are fulfilled.
Condition 1: If cell value is greater than top and bottom cells, give value of 1:
Con("raster" > FocalStatistics("raster", NbrIrregular("C:\filepath\kernel_file.txt"), "MAXIMUM"), 1, 0)
Where kernel file looks like this:
3 3
0 1 0
0 0 0
0 1 0
Condition 2: If cell value is greater than left and right cells, give value of 1:
Con("raster" > FocalStatistics("raster", NbrIrregular("C:\filepath\kernel_file.txt"), "MAXIMUM"), 1, 0)
Where kernel file looks like this:
3 3
0 0 0
1 0 1
0 0 0
Condition 3: If cell value is greater than topleft and bottomright cells, give value of 1:
Con("raster" > FocalStatistics("raster", NbrIrregular("C:\filepath\kernel_file.txt"), "MAXIMUM"), 1, 0)
Where kernel file looks like this:
3 3
1 0 0
0 0 0
0 0 1
Condition 4: If cell value is greater than bottomleft and topright cells, give value of 1:
Con("raster" > FocalStatistics("raster", NbrIrregular("C:\filepath\kernel_file.txt"), "MAXIMUM"), 1, 0)
Where kernel file looks like this:
3 3
0 0 1
0 0 0
1 0 0
Condition 5: If any one of the adjacent cells has a value EQUAL to the center cell, give the output raster a value of 1 (using focal variety with two nearest neighborhood calculations)
Why not use map algebra?
It has been noted below that my problem could be solved using map algebra but as seen above this is a grand total of six raster calculations, plus one to combine all of the rasters created together. It seems to me that it is much more efficient to go cell-by-cell and do all of the comparisons at once in each cell instead of looping through each individually seven times and utilizing quite a bit of memory to create seven rasters.
How should the problem be attacked?
The link above advises to use IPixelBlock interface, however it is unclear from ESRI documentation whether you are actually accessing a single cell value itself through IPixelBlock, or if you are accessing multiple cell values from the size of the IPixelBlock you set. A good answer should suggest a method for accessing the cell values of a continuous raster and provide an explanation of the methodology behind the code, if not apparently obvious.
In summary:
What is the best method to loop through every cell in a CONTINUOUS raster (which has no attribute table) to access its cell values?
A good answer need not implement the analysis steps described above, it needs only to provide a methodology to access cell values of a raster.