else
entries.append( entry );
}
-
+
// be sure to use real obejct entries
QStringList objEntries;
QStringList::const_iterator it = entries.begin(), last = entries.end();
for ( ; it!=last; ++it )
objEntries.append( study->referencedToEntry( *it ) );
- if( myActionType==DISPLAY || myActionType==DISPLAY_ONLY )
+ if( myActionType==DISPLAY || myActionType==DISPLAY_ONLY ) {
d->Display( objEntries, false, 0 );
- else if( myActionType==ERASE )
+ mgr->setSelectedObjects(selObjs);
+ }
+ else if( myActionType==ERASE ) {
d->Erase( objEntries, false, false, 0 );
+ }
d->UpdateViewer();
commit();
::highlight(bool theIsHighlight)
{
vtkFloatingPointType aBounds[6];
- GetInput()->GetBounds(aBounds);
+ vtkDataSet * aDataSet = GetHighlightedDataSet();
+ aDataSet->GetBounds(aBounds);
myOutline->SetBounds(aBounds);
myOutlineActor->SetVisibility( GetVisibility() && theIsHighlight );
myErrorStatus = 0;
using namespace std;
ostringstream aStream;
+#ifndef WIN32
aStream<<"which "<<myNameAVIMaker<<" 2> /dev/null";
+#else
+ aStream<<"setlocal & set P2=.;%PATH% & (for %e in (%PATHEXT%) do @for %i in ("<<myNameAVIMaker<<"%e) do @if NOT \"%~$P2:i\"==\"\" exit /b 0) & exit /b 1";
+#endif
std::string anAVIMakeCheck = aStream.str();
int iErr = system(anAVIMakeCheck.c_str());
if(iErr != 0)
myNbWrittenFrames++;
std::string anCurrentName;
GetNameJPEG(myName,anIndex,anCurrentName);
+ #ifndef WIN32
aStream<<"ln -s "<< anInitialName<<" "<<anCurrentName<<";";
+ #else
+ aStream<<"COPY /Y "<<QString::fromStdString(anInitialName).replace("/","\\\\").toStdString()<<
+ " "<<QString::fromStdString(anCurrentName).replace("/","\\\\").toStdString()<<" > NUL";
+ #endif
if(anIndex + 1 < aFinishIndex)
+ #ifndef WIN32
aStream<<" \\";
- aStream<<endl;
+ aStream<<endl;
+ #else
+ aStream<<" & ";
+ #endif
}
std::string aString(aStream.str());
system(aString.c_str());
//" -f "<<int(myNbFPS)<<" "<<
" -f "<<myNbFPS<<" "<<
" -n "<<myNbWrittenFrames<<" "<<
- " -j "<<myName<<"_\%06d.jpeg "<<
- "| yuv2lav"<<
- " -o "<<myName;
-
+ " -j \""<<myName<<"_\%06d.jpeg\" "<<
+ "| yuv2lav"<<" -o \""<<myName<<"\"";
+#ifdef WIN32
+ aStream<<" -f aA";
+#endif
std::string aString(aStream.str());
myErrorStatus = system(aString.c_str());
QFileInfo aFileInfo(myName.c_str());
QString aDirPath = aFileInfo.absoluteDir().path();
QString aBaseName = aFileInfo.fileName();
- QString aCommand =
- QString("(cd ") + aDirPath +
+ QString aCommand;
+#ifndef WIN32
+ aCommand = QString("(cd ") + aDirPath +
"; ls " +
" | egrep '" + aBaseName + "_[0-9]*.jpeg'" +
" | xargs rm " +
")";
+#else
+ QString tmpFile = QString("_") + aBaseName + "_tempfile";
+ QString diskName = aDirPath.split("/")[0];
+ aCommand = diskName + " && (cd " + aDirPath.replace("/","\\\\") +
+ " && ((dir /b | findstr " + aBaseName + "_[0-9]*.jpeg > " + tmpFile +
+ ") & (for /f %i in (" + tmpFile + ") do (del \"%i\")) & (del " + tmpFile + "))) > NUL";
+#endif
if(MYDEBUG) cout<<"SVTK_Recorder::MakeFileAVI - "<<(const char*)aCommand.toLatin1()<<endl;
system((const char*)aCommand.toLatin1());
return myGeomFilter->GetQuadraticArcAngle();
}
+/*!
+ * Return pointer to the dataset, which used to calculation of the bounding box of the actor.
+ * By default it is the input dataset.
+ */
+vtkDataSet* VTKViewer_Actor::GetHighlightedDataSet() {
+ return GetInput();
+}
virtual void SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle);
virtual vtkFloatingPointType GetQuadraticArcAngle() const;
+ //----------------------------------------------------------------------------
+ //! Return pointer to the dataset, which used to calculation of the bounding box of the actor
+ virtual vtkDataSet* GetHighlightedDataSet();
protected:
//----------------------------------------------------------------------------
vtkFloatingPointType aBounds[6];
myPoints->GetBounds(aBounds);
-
+ vtkFloatingPointType xSize, ySize, zSize;
+ xSize = aBounds[1] - aBounds[0];
+ ySize = aBounds[3] - aBounds[2];
+ zSize = aBounds[5] - aBounds[4];
vtkFloatingPointType anAbsoluteCoord[3];
vtkFloatingPointType aParamentrucCoord[3];
for (int aPntId = 0; aPntId < aNumPts; aPntId++) {
myPoints->GetPoint(aPntId, anAbsoluteCoord);
- aParamentrucCoord[0] = (anAbsoluteCoord[0] - aBounds[0]) / (aBounds[1] - aBounds[0]);
- aParamentrucCoord[1] = (anAbsoluteCoord[1] - aBounds[2]) / (aBounds[3] - aBounds[2]);
- aParamentrucCoord[2] = (anAbsoluteCoord[2] - aBounds[4]) / (aBounds[5] - aBounds[4]);
+ aParamentrucCoord[0] = xSize==0. ? 0. : ((anAbsoluteCoord[0] - aBounds[0]) / xSize);
+ aParamentrucCoord[1] = ySize==0. ? 0. : ((anAbsoluteCoord[1] - aBounds[2]) / ySize);
+ aParamentrucCoord[2] = zSize==0. ? 0. : ((anAbsoluteCoord[2] - aBounds[4]) / zSize);
myTriangulator->InsertPoint(aPntId, anAbsoluteCoord, aParamentrucCoord, 0);
}