Commit 484a8638 authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED some code clarification

parent 5d9bb71d
......@@ -151,7 +151,7 @@ void Slice::setOriginalVolume(vtkSmartPointer<vtkImageData> volume) {
void Slice::initActors() {
imgToMapFilter->SetInputData(originalVolume);
if (nullptr == lut) {
if (lut == nullptr) {
imgToMapFilter->SetLookupTable(nullptr);
}
else {
......
......@@ -377,7 +377,6 @@ vtkSmartPointer<vtkImageData> ImageComponent::getImageDataWithFrameTransform() {
// -------------------- initLookupTable --------------------
void ImageComponent::initLookupTable() {
// TODO set in a betterway information about the lut thanks to image data
if (this->originalImageData->GetNumberOfScalarComponents() == 1) {
// Default values for grey level lut
......@@ -390,7 +389,6 @@ void ImageComponent::initLookupTable() {
lut->SetWindow(getActualNumberOfColors());
lut->SetRampToSCurve();
lut->Build(); // effective build
}
else {
// For colored image, we need to extract the information from the image
......@@ -507,48 +505,25 @@ QString ImageComponent::getImageName() const {
void ImageComponent::update3DViewer() {
bool viewIn3D = property("Display Image in 3D Viewer").toBool();
if (viewIn3D) {
if (axialSlices) {
axialSlices->setViewSliceIn3D(true);
}
if (coronalSlices) {
coronalSlices->setViewSliceIn3D(true);
}
if (sagittalSlices) {
sagittalSlices->setViewSliceIn3D(true);
}
if (arbitrarySlices) {
// by default not visible in 3D
arbitrarySlices->setViewSliceIn3D(false);
}
if (volumeRenderingChild) {
volumeRenderingChild->setVisibility(InteractiveViewer::get3DViewer(), true);
}
if (axialSlices) {
axialSlices->setViewSliceIn3D(viewIn3D);
}
else {
if (axialSlices) {
axialSlices->setViewSliceIn3D(false);
}
if (coronalSlices) {
coronalSlices->setViewSliceIn3D(false);
}
if (coronalSlices) {
coronalSlices->setViewSliceIn3D(viewIn3D);
}
if (sagittalSlices) {
sagittalSlices->setViewSliceIn3D(false);
}
if (sagittalSlices) {
sagittalSlices->setViewSliceIn3D(viewIn3D);
}
if (arbitrarySlices) {
arbitrarySlices->setViewSliceIn3D(false);
}
if (arbitrarySlices) {
// by default never visible in 3D
arbitrarySlices->setViewSliceIn3D(false);
}
if (volumeRenderingChild) {
volumeRenderingChild->setVisibility(InteractiveViewer::get3DViewer(), false);
}
if (volumeRenderingChild) {
volumeRenderingChild->setVisibility(InteractiveViewer::get3DViewer(), viewIn3D);
}
}
......
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