if (mVectorReader.IsNull())
mVectorReader = vvImageReader::New();
mVectorReader->SetInputFilename(filename);
- mVectorReader->Update(vvImageReader::VECTORFIELD);
+
+ if (mType == vvImageReader::IMAGEWITHTIME)
+ mVectorReader->Update(vvImageReader::VECTORFIELDWITHTIME);
+ else
+ mVectorReader->Update(vvImageReader::VECTORFIELD);
if (mVectorReader->GetLastError().size() != 0) {
mLastError = mVectorReader->GetLastError();
return false;
}
//----------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+void vvSlicerManager::ResetTransformationToIdentity(const std::string actorType)
+{
+ if(actorType == "image")
+ this->GetImage()->GetTransform()->Identity();
+ else if(actorType == "overlay")
+ this->GetSlicer(0)->GetOverlay()->GetTransform()->Identity();
+ else if(actorType == "fusion")
+ this->GetSlicer(0)->GetFusion()->GetTransform()->Identity();
+ else if(actorType == "vf")
+ this->GetVF()->GetTransform()->Identity();
+ else
+ return;
+
+ for(int i=0; i< this->GetNumberOfSlicers(); i++){
+ this->GetSlicer(i)->ForceUpdateDisplayExtent();
+ this->GetSlicer(i)->ResetCamera();
+ this->GetSlicer(i)->Render();
+ }
+}
+//------------------------------------------------------------------------------
//----------------------------------------------------------------------------
void vvSlicerManager::Render()
LUT->SetHueRange(0.4,0.80);
break;
case 3:
+ if (LUT == NULL)
+ LUT = vtkLookupTable::New();
+ LUT->SetValueRange(0.5,1);
+ LUT->SetSaturationRange(1,1);
+ LUT->SetHueRange(0.666,0);
+ break;
+ case 4:
if (LUT == NULL)
LUT = vtkLookupTable::New();
LUT->SetValueRange(0,1);
LUT->Build();
}
vtkWindowLevelLookupTable* fusLUT = NULL;
- if (mSlicers[0]->GetFusion()) { // && mFusionColorMap != 0) {
+ if (mSlicers[0]->GetFusion()) { // && mFusionColorMap >= 0) {
fusLUT = vtkWindowLevelLookupTable::New();
double fusRange [2];
fusRange[0] = mFusionLevel - mFusionWindow/2;
}
else if (mFusionColorMap == 4)
fusLUT->SetHueRange(0,1);
- else if (mFusionColorMap == 0)
+ else if (mFusionColorMap <= 0)
{
fusLUT->SetValueRange(0,1);
fusLUT->SetSaturationRange(0,0);
fusLUT->ForceBuild();
- // set color table transparancy
+ // set color table transparency
double alpha_range_end = frange[0] + (double)mFusionThresOpacity*(frange[1] - frange[0])/100;
for (double i = frange[0]; i < alpha_range_end; i++) {
double v[4];
}
if (mSlicers[i]->GetFusion()) {
- mSlicers[i]->GetFusionActor()->SetOpacity(double(mFusionOpacity)/100);
mSlicers[i]->GetFusionMapper()->SetLookupTable(fusLUT);
+ mSlicers[i]->GetFusionActor()->SetOpacity(double(mFusionOpacity)/100);
}
}
if (fusLUT)