Algorithm@Volume Rendering
Misc Stream
vtkStreamingDemandDrivenPipeline
Executive supporting partial updates.
vtkStreamingDemandDrivenPipeline is an executive that supports updating only a portion of the dataset in the pipeline. This is the style of pipeline update that is provided by the old-style VTK 4.x pipeline. Instead of always updating an entire dataset, this executive supports asking for pieces or sub-extents.
範例:
vtkStreamingDemandDrivenPipeline *exec=
vtkStreamingDemandDrivenPipeline::SafeDownCast(elev->GetExecutive());
exec->SetUpdateNumberOfPieces(exec->GetOutputInformation(0), numProcs);
exec->SetUpdatePiece(exec->GetOutputInformation(0), myid);
APIs:
int PropagateUpdateExtent(int outputPort) int SetUpdateExtentToWholeExtent(vtkInformation *) virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) virtual int Update() virtual int Update(int port) virtual int UpdateWholeExtent() int SetMaximumNumberOfPieces(vtkInformation *, int n) int GetMaximumNumberOfPieces(vtkInformation *) int SetWholeExtent(vtkInformation *, int extent[6]) void GetWholeExtent(vtkInformation *, int extent[6]) int *GetWholeExtent(vtkInformation *) int SetUpdateExtent(vtkInformation *, int extent[6]) void GetUpdateExtent(vtkInformation *, int extent[6]) int *GetUpdateExtent(vtkInformation *) int SetUpdateExtent(vtkInformation *, int piece, int numPieces, int ghostLevel) int SetUpdatePiece(vtkInformation *, int piece) int GetUpdatePiece(vtkInformation *) int SetUpdateNumberOfPieces(vtkInformation *, int n) int GetUpdateNumberOfPieces(vtkInformation *) int SetUpdateGhostLevel(vtkInformation *, int n) int GetUpdateGhostLevel(vtkInformation *) int SetRequestExactExtent(int port, int flag) int GetRequestExactExtent(int port) int SetExtentTranslator(vtkInformation *, vtkExtentTranslator *translator) vtkExtentTranslator *GetExtentTranslator(vtkInformation *info) int SetWholeBoundingBox(int port, double bb[6]) void GetWholeBoundingBox(int port, double bb[6]) double *GetWholeBoundingBox(int port)
Misc Filters
vtkElevationFilter
generate scalars along a specified direction.
vtkElevationFilter is a filter to generate scalar values from a dataset. The scalar values lie within a user specified range, and are generated by computing a projection of each dataset point onto a line. The line can be oriented arbitrarily. A typical example is to generate scalars based on elevation or height above a plane.
vtkElevationFilter範例:
vtkElevationFilter *elev = vtkElevationFilter::New();
elev->SetInput( shrink->GetOutput() );
elev->SetLowPoint(-1,-1,-1);
elev->SetHighPoint( 1, 1, 1);
elev->SetScalarRange(0,1);
或是在ParallelIso之中的例子
vtkElevationFilter *elev=vtkElevationFilter::New();
elev->SetInput(iso->GetOutput());
val = (myid+1) / static_cast(numProcs);
elev->SetScalarRange(val, val+0.001);
APIs:
- SetLowPoint: Define one end of the line (small scalar values).
- SetHighPoint: Define other end of the line (large scalar values).
- SetScalarRange: Specify range to map scalars into.
vtkMarchingCube@Isosurface
vtkMPI Misc API
要使用vtk作到平行化的應用程式,需要用到vtkMultiProcessController, vtkMPIController。
Parallel Pipeline:
- Initialize():
- The use of user-defined communicators are supported with vtkMPICommunicator and vtkMPIGroup.
- SetSingleMethod()
- SingleMethodExecute()
- Finalize():
作者為Geveci, Berk
API@vtkMPIController列表:
virtual void Initialize(int *argc, char ***argv) virtual void Finalize() virtual void SingleMethodExecute() virtual void MultipleMethodExecute() void Barrier() virtual void CreateOutputWindow() void SetCommunicator(vtkMPICommunicator *comm) int NoBlockSend(int *data, int length, int remoteProcessId, int tag, vtkMPICommunicator::Request &req)
Hi,
I am doing some research on medical visualization and real time volume
rendering. About display the reconstruction result, there are many system and algorithm
.
About reconstruction, I think the segmentation is key problem. Many company
or reseacrh unit use human expert to complish this task. In this area, some image
processing technique can be used but interaction by people is hardly avoid.
About rendering the reconstruction result or segmentation result, it is
a hot point in computer graphics. (that is what I do now). Two famous software
(free) is VTK and VolVis. These two system can be extend by yourself. I think it can
be satisfy your demand for display.
The problem for display 3D model od resconstrction is the data is too large
, so that it must be handled for several minutes and occupy a lot of memory. Extract
isosurface or disply volume data directlyare two methods fro display it. Both are slow
but the former is faster than later.
For visualization, the IEEE Visualization proceeding is a good collection
. Many new technique can be found in it. The 90, 91,92,93,94 can be found in tsinghua
library in microphoto format. Another publish collection is Visualization on
Biomedical computing proceeding and SPIE medical imaging series.
I expect we can discuss and study together or same interests by email.
BTW, there are Vis FAQ in Ohio university web site. I will post the address
here ASAP. Vtk Pipelines
- 讀入Datasets: 使用vtkImageReader, vtkDICOMImageReader...各類不同的Reader,將資料讀入,然後讀轉出成Geometry資訊。
- 設定屬性(Property): 使用vtkVolumeProperty作出VolProperty物件,再使用vtkPiecewiseFunction, vtkColorTransferFunction設定VolProperty的不透明度、顏色...的屬性,然後藉由SetScalarOpacity(Piecewise), SetColor(Color), SetInterpolationTypeToLinear(), ShadeOn(),來設定VolProperty的屬性。
- 設定幾何資訊(Mapper): 利用vtkVolumeRayCastMapper, vtkFixedPointVolumeRayCastMapper作出VolMapper物件。
- Actor2D, Actor, vtkVolume
- vtkRenderer
- RenderWindow
- RenderWindowInteractor, InteractorStyle
vtkDICOMImageReader API
所有的Member Functions列表:
void PrintSelf(ostream &os, vtkIndent indent) void SetDirectoryName(const char *dn) double *GetPixelSpacing() int GetWidth() int GetHeight() float *GetImagePositionPatient() int GetBitsAllocated() int GetPixelRepresentation() int GetNumberOfComponents() const char *GetTransferSyntaxUID() float GetRescaleSlope() float GetRescaleOffset() const char *GetPatientName() const char *GetStudyUID() const char *GetStudyID() float GetGantryAngle() virtual int CanReadFile(const char *fname) void SetFileName(const char *fn) virtual char *GetDirectoryName()