0
레이블 맵의 픽셀 값을 변경하는 방법을 알고 싶습니다.XTK에서 픽셀 값을 변경하는 방법
이것이 나의 초기 접근 방식입니다. 불행히도 변경 사항은 캔버스에 반영되지 않습니다.
X.volume.prototype.SetPixelLabelMap = function(i, j, k, value){
this._labelmap._IJKVolume[k][j][i] = value;
var color = this._labelmap._colortable._map.get(value);
var changeRawData = function(rawdata, pos){
for(var n = 0; n < 4; n++){
rawdata[pos + n] = color[n + 1];
}
}
var dim = this._dimensions;
//in Z axis height is j width is i, the fast moving direction is the height
if(this._labelmap._children[2]._children[k]){
changeRawData(this._labelmap._children[2]._children[k]._texture._rawData, (dim[0]*i + j)*4);
}
//in Y axis height is k width is i
if(this._labelmap._children[1]._children[j]){
changeRawData(this._labelmap._children[1]._children[j]._texture._rawData, (dim[0]*i + k)*4);
}
if(this._labelmap._children[0]._children[i]){
//in X axis height is j width is k
changeRawData(this._labelmap._children[0]._children[i]._texture._rawData, (dim[2]*k + j)*4);
}
}
이 포스트는 다음 [자식 문제] 관련이있다 (https://github.com/xtk/X/issues/166 # issuecomment-69914251) 'volume.sliceInfoChanged (0);'가 작동하지 않습니다. – juan
설정을 할 수 있습니까? 문제를 설명하는 데모가 포함 된 jsfiddle 또는 codepen? – Nicolas