Skip to content

Commit 0704f16

Browse files
committed
Fixed issue in patch gen causing pipeline test to fail
1 parent 022e8c1 commit 0704f16

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

source/FAST/Algorithms/ImagePatch/PatchGenerator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ void PatchGenerator::generateStream() {
208208
patch->setFrameData("patch-level", std::to_string(level));
209209
m_progress = (float)(patchX+patchY*patchesX)/(patchesX*patchesY);
210210
patch->setFrameData("progress", std::to_string(m_progress));
211+
patch->setFrameData("streaming", "yes"); // Since we are not propagating frame data, we have to set this
211212

212213
mRuntimeManager->stopRegularTimer("create patch");
213214
try {
@@ -299,6 +300,7 @@ void PatchGenerator::generateStream() {
299300
patch->setFrameData("patch-spacing-z", std::to_string(spacing.z()));
300301
m_progress = ((float)(patchX+patchY*patchesX+patchZ*patchesX*patchesY)/(patchesX*patchesY*patchesZ));
301302
patch->setFrameData("progress", std::to_string(m_progress));
303+
patch->setFrameData("streaming", "yes"); // Since we are not propagating frame data, we have to set this
302304
try {
303305
if(previousPatch) {
304306
addOutputData(0, previousPatch, false, false);
@@ -321,6 +323,7 @@ void PatchGenerator::generateStream() {
321323
}
322324
// Add final patch, and mark it has last frame
323325
previousPatch->setLastFrame(getNameOfClass());
326+
previousPatch->setFrameData("streaming", "yes"); // Since we are not propagating frame data, we have to set this
324327
try {
325328
addOutputData(0, previousPatch, false, false);
326329
} catch(ThreadStopped &e) {

source/FAST/Algorithms/TissueSegmentation/TissueSegmentation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ TissueSegmentation::TissueSegmentation(bool useColorThresholdingMethod, int leve
2020
createIntegerAttribute("dilate-kernel-size", "Kernel size for dilation", "", m_dilate);
2121
createIntegerAttribute("erode-kernel-size", "Kernel size for erosion", "", m_erode);
2222
createBooleanAttribute("filter-zeros", "Include zero values to background/glass class", "", m_filterZeros);
23+
createBooleanAttribute("color-thresholding", "Use color thresholding instead of neural network", "", false);
2324
setThreshold(threshold);
2425
setDilate(dilationSize);
2526
setErode(erosionSize);
@@ -34,7 +35,7 @@ void TissueSegmentation::loadAttributes() {
3435
setDilate(getIntegerAttribute("dilate-kernel-size"));
3536
setErode(getIntegerAttribute("erode-kernel-size"));
3637
setFilterZeros(getBooleanAttribute("filter-zeros"));
37-
38+
setUseColorThresholdingMethod("color-thresholding");
3839
}
3940

4041
void TissueSegmentation::setThreshold(int thresh) {

source/FAST/Algorithms/TissueSegmentation/TissueSegmentation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class FAST_EXPORT TissueSegmentation : public ProcessObject {
9494
int m_erode = 9;
9595
int m_thresh = 85;
9696
int m_level = -1;
97-
float m_magnification = 2.5f;
97+
float m_magnification = 1.25f;
9898
bool m_filterZeros = true;
9999
bool m_useColorThresholdingMethod = false;
100100
};

0 commit comments

Comments
 (0)