Commit cfa5c766 authored by demian's avatar demian

BUG: Solved part of bug 2577, color fibers by segment and mean orientation works

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21569 3bd1e089-480b-0410-8dfb-8563597acbee
parent 5f744228
......@@ -273,6 +273,7 @@ void vtkMRMLFiberBundleGlyphDisplayNode::UpdatePolyDataPipeline()
this->GetOutputPolyData()->GetScalarRange(range);
}
}
this->ScalarRange[0] = range[0];
this->ScalarRange[1] = range[1];
}
......
......@@ -151,14 +151,11 @@ void vtkMRMLFiberBundleLineDisplayNode::UpdatePolyDataPipeline()
vtkDebugMacro("Color by mean fiber orientation");
this->ScalarVisibilityOn( );
this->ColorLinesByOrientation->SetColorMode(ColorLinesByOrientation->colorModeMeanFiberOrientation);
vtkMRMLDiffusionTensorDisplayPropertiesNode::ScalarInvariantKnownScalarRange(
vtkMRMLDiffusionTensorDisplayPropertiesNode::ColorOrientation, this->ScalarRange);
vtkMRMLNode* colorNode = this->GetScene()->GetNodeByID("vtkMRMLColorTableNodeFullRainbow");
if (colorNode)
{
this->SetAndObserveColorNodeID(colorNode->GetID());
}
}
else if (this->GetColorMode ( ) == vtkMRMLFiberBundleDisplayNode::colorModePointFiberOrientation)
{
......@@ -166,8 +163,6 @@ void vtkMRMLFiberBundleLineDisplayNode::UpdatePolyDataPipeline()
this->ScalarVisibilityOn( );
this->ColorLinesByOrientation->SetColorMode(
this->ColorLinesByOrientation->colorModePointFiberOrientation);
vtkMRMLDiffusionTensorDisplayPropertiesNode::ScalarInvariantKnownScalarRange(
vtkMRMLDiffusionTensorDisplayPropertiesNode::ColorOrientation, this->ScalarRange);
vtkMRMLNode* colorNode = this->GetScene()->GetNodeByID("vtkMRMLColorTableNodeFullRainbow");
if (colorNode)
{
......@@ -285,6 +280,12 @@ void vtkMRMLFiberBundleLineDisplayNode::UpdatePolyDataPipeline()
this->GetOutputPolyData()->GetScalarRange(range);
}
}
if ((this->GetColorMode ( ) == vtkMRMLFiberBundleDisplayNode::colorModeMeanFiberOrientation) ||
(this->GetColorMode ( ) == vtkMRMLFiberBundleDisplayNode::colorModePointFiberOrientation))
{
vtkMRMLDiffusionTensorDisplayPropertiesNode::ScalarInvariantKnownScalarRange(
vtkMRMLDiffusionTensorDisplayPropertiesNode::ColorOrientation, range);
}
else if (this->GetColorMode() == vtkMRMLFiberBundleDisplayNode::colorModeScalarData &&
this->GetInputPolyData())
{
......
......@@ -198,15 +198,12 @@ void vtkMRMLFiberBundleTubeDisplayNode::UpdatePolyDataPipeline()
this->ScalarVisibilityOn( );
this->ColorLinesByOrientation->SetColorMode(
this->ColorLinesByOrientation->colorModeMeanFiberOrientation);
this->TubeFilter->SetInputConnection(
this->ColorLinesByOrientation->GetOutputPort());
vtkMRMLDiffusionTensorDisplayPropertiesNode::ScalarInvariantKnownScalarRange(vtkMRMLDiffusionTensorDisplayPropertiesNode::ColorOrientation, this->ScalarRange);
this->TubeFilter->SetInputConnection(this->ColorLinesByOrientation->GetOutputPort());
vtkMRMLNode* ColorNode = this->GetScene()->GetNodeByID("vtkMRMLColorTableNodeFullRainbow");
if (ColorNode)
{
this->SetAndObserveColorNodeID(ColorNode->GetID());
}
}
else if (this->GetColorMode ( ) == vtkMRMLFiberBundleDisplayNode::colorModePointFiberOrientation)
{
......@@ -214,9 +211,7 @@ void vtkMRMLFiberBundleTubeDisplayNode::UpdatePolyDataPipeline()
this->ScalarVisibilityOn( );
this->ColorLinesByOrientation->SetColorMode(
this->ColorLinesByOrientation->colorModePointFiberOrientation);
this->TubeFilter->SetInputConnection(
this->ColorLinesByOrientation->GetOutputPort());
vtkMRMLDiffusionTensorDisplayPropertiesNode::ScalarInvariantKnownScalarRange(vtkMRMLDiffusionTensorDisplayPropertiesNode::ColorOrientation, this->ScalarRange);
this->TubeFilter->SetInputConnection(this->ColorLinesByOrientation->GetOutputPort());
vtkMRMLNode* ColorNode = this->GetScene()->GetNodeByID("vtkMRMLColorTableNodeFullRainbow");
if (ColorNode)
{
......@@ -335,6 +330,12 @@ void vtkMRMLFiberBundleTubeDisplayNode::UpdatePolyDataPipeline()
this->GetOutputPolyData()->GetScalarRange(range);
}
}
else if ((this->GetColorMode ( ) == vtkMRMLFiberBundleDisplayNode::colorModeMeanFiberOrientation) ||
(this->GetColorMode ( ) == vtkMRMLFiberBundleDisplayNode::colorModePointFiberOrientation))
{
vtkMRMLDiffusionTensorDisplayPropertiesNode::ScalarInvariantKnownScalarRange(
vtkMRMLDiffusionTensorDisplayPropertiesNode::ColorOrientation, range);
}
else if (this->GetColorMode() == vtkMRMLFiberBundleDisplayNode::colorModeScalarData &&
this->GetInputPolyData())
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment