Chapter 14 : 3D Imaging Recipes
In other sections of this manual, we have described the various
3DVIEWNIX commands in detail. To accomplish any 3D imaging task,
commands need to be selected from among these and applied in a certain
order. To give the users a sense of what the potential orders can be, we
give several examples which constitute specific processing paths that
can be taken. These are given to guide those users who may not be
familiar with 3D imaging operations from a technical point of view and
also to indicate to the more adventurous users who are familiar with 3D
imaging operations the large variety of possible processing paths that
are not explicitly mentioned here. We hope, in the course of time, users
will develop 3D imaging recipes best suited for a variety of 3D imaging
tasks and include them in this section for the ready use and benefit of
other 3DVIEWNIX users. We recommend to those interested in pursuing
this subject further in a systematic manner. The operations listed below
are not necessarily the best, in terms of speed, quality of results,
size of files created, etc., for the situations indicated. The users
should experimentally determine the approach best suited for their
application.
14.1 Surface Rendering
- High contrast objects, such as bone in CT data, can be segmented via
thresholding. A simple sequence of operations that quickly allows
viewing such objects is the following:
- a. Bring the data into 3DVIEWNIX format via one of the PORT-DATA commands.
- b. Create a structure of type Shell1 via Threshold with OUTPUT set to BS1,
and BNDRY to ALL.
- c. Visualize the structure in the BS1 file via VISUALIZE-Surface-View.
Create animations if needed using Surface-CreateMovie and play them via
FastCine under Slice.
In this approach, surface normals are computed using density gradients
in the input scene. A slight variation of this approach is to filter the
scene via PREPROCESS-SceneOperations-Filter before processing by
Threshold.
- This is an alternative approach to visualizing high-contrast objects,
often more accurate than recipe 1:
- a. Same as 1a.
- b. Create a binary scene via Threshold.
- c. Convert the binary scene to another binary scene via (shape-based
interpolation) Interpolate setting MODE to LINR for all dimensions.
- d. Filter the binary scene output in c via Filter using GAUSS3D.
- e. Convert the scene output in d to a BS1 file via Threshold.
- f. Use the shell output in e and the original scene output in step a to
change the surface normal via PREPROCESS-StructureOperations-Surface
Normal.
- g. Create renditions as in 1c.
- A slight modification to 2 often gives quite different results. Follow a
and b of 2, filter the result and threshold the resulting grey scene,
and then follow c to g of 2.
- When slice spacing is sufficiently small, this approach may be
considered.
- a. Same as 1a.
- b. Interpolate the scene output in a via Interpolate.
- c. Filter the result of step b via Filter with GAUSS3D filter.
- d. Follow steps 1b and c.
- When the objects have poor contrast or when the original scene is noisy,
this approach gives good results.
- a. Same as 1a.
- b. Segment the scene resulting in a using one of the commands under
PREPROCESS-Segment, say Interactive2D. Create a binary scene.
- c. Convert the binary scene to another binary scene via (shape-based
interpolation) Interpolate setting MODE to LINR for all dimensions.
- d. Filter the binary scene output in c via Filter using GAUSS3D.
- e. Convert the scene output in d to a BS1 file via Threshold.
- f. Same as 1c.
- This is just to emphasize that computed features can be used as input
scene wherever a scene is a valid input.
- a. Same as 1a.
- b. Interpolate via Interpolate.
- c. Filter the scene output in b via Filter with a gradient operator.
- d. Use scenes output in b and c as input to PREPROCESS-Segment-2Features
and create a binary scene.
- e. Use Threshold to create a shell, say a BS1 file.
- f. Filter the output of d via Filter to create a scene.
- g. Change the surface normals of the shell via
PREPROCESS-StructureOperations-SurfaceNormal using the scene output in f.
- h. Visualize the shell via VISUALIZE-Surface-View.
In all recipes given above, you may generate Shell0 structures in a BS0
file instead of the Shell1 structures and use MANIPULATE commands to
visualize and analyze the structures. Visualization is generally peppier
in MANIPULATE than in Surface-View.
14.2 Volume Rendering
Instead of creating BS0 and BS1 files, as in the above recipes, the
structures can be generated as non-binary shells (SH0 files) and
visualized via VISUALIZE-Volume commands. Here are some examples.
- This is a direct sequence of operations involving classification and
rendering.
- a. Same as 1a.
- b. Interpolate the input scene to create a scene of desired resolution via
Interpolate. Use perhaps MODE CUBIC. This may take a significant amount
of computational time depending on the size of the scene domain and
output resolution.
- c. Create a non-binary shell as a SH0 file using Classify-1Feature.
- d. Do shell rendering via VISUALIZE-Volume commands. Create animations if
needed using Volume-CreateMovie and replay them via FastCine under
Slice.
The scene output in b may be filtered via filter prior to step c.
- A less time consuming approach than that in 7 is the following:
- a. Same as 1a.
- b. Use Classify-1Feature directly to create an SH0 file. If the voxels in
the input scene are all of identical size, you may avoid doing
interpolation in 1Feature by specifying RESOLN appropriately so that the
output voxels are of the same size as that of input. Note that voxels do
not need to be cubic in shape (i.e., they may be cuboids).
- c. Same as 7d.
The input scene may be filtered via Filter prior to step b.
- Same as 7 or 8 using Classify-2Features instead of Classify-1Feature.
- This approach is different from those in 7, 8, and 9 in that it allows
filtering the materials classified.
- a. Same as 1a.
- b. Use Classify-1Feature with OUTPUT panel switch set to IM0. Use
appropriate resolution parameters via the button RESOLN, preferably
those that lead to cubic voxels. This step outputs a scene.
- c. Filter the scene output in b via Filter.
- d. Classify the scene output in c via 1Feature (or even Classify-2Features)
to output an SH0 file. There is no need to change the resolution in this
step.
- e. Same as 7d.
Note that if you use Classify-2Features, you will have to generate
another scene for the second feature. You may use a gradient of the
original scene, or of the scene output in b, computed via Filter for
this purpose.
- This is an interesting approach that gives good results on data that are
segmented interactively or data that represent objects of low contrast
or noisy objects.
- a. Same as 1a.
- b. Segment to binary via one of the Segment commands to output a binary
scene.
- c. Interpolate the binary scene output in b using Interpolate with MODE
LINR to make the resulting voxels cubic.
- d. Filter the binary scene output in c via Filter using a GAUSS3D operator.
- e. Classify the scene output in d using Classify-1Feature to create an SH0
file.
- f. Same as 7d.
In some applications, segmented results are available as a stack of
contours. If these are in the Curve0 format (see [12] for details), the
data should be first converted to a binary scene (BIM file).
Subsequently steps c to f can be followed to visualize these data.
It should be clear to the user by now the variety of possible recipes
one can create. We stop here with the examples on visualization and
invite the users to explore other paths on their own. It should also be
clear that there should be some form of systematic guidance available to
choose from among a class of approaches for a particular application on
hand. This will be provided in the future based on mathematical (3D and
4D) phantoms and on quantifiable deviations in form and depiction of
computed structures from the ideal.
14.3 Manipulation
We now give some examples of the operations using MANIPULATE commands.
As explained in Section 11, the number of possible ways the various
operations under MANIPULATE alone can be combined meaningfully is quite
large. The users should bear in mind that these combinations can be
further combined with those that have just been indicated under
visualization (and those to be described under analysis).
- This is a rather direct approach. Its purpose is to simulate a
particular surgical segmental movement, may be for measuring, prior to
surgery, how much a segment should be moved relative to some observable
landmarks.
- a. Same as 1a.
- b. Create a binary Shell0 file using one of the approaches outlined in
Section 14.1.
- c. Use MANIPULATE-Separate to cut out the segment to be moved. You may want
to arrive at an appropriate orientation for the object(s) using the
ROTATE OBJ panel button prior to separating the segment.
- d. Use MANIPULATE-Move to move the segment interactively to a desired
location and orientation.
- e. Use MANIPULATE-Measure to measure the appropriateness or the result of
Move.
- f. Use c, d, and e iteratively if needed. Perhaps use the option SET MARKS
to create artificial landmarks to guide movement.
- f. Eventually output a plan file containing information about segmental
movement. The motion can be animated as explained at the end of Section
12.2.2.3 via ANALYZE-Kinematics-Inter and subsequently visualized for
presentation and conferencing.
- This example relates to assessing unilateral deformities (such as
facial) in objects that are supposed to be roughly symmetric.
- a. Same as 1a.
- b. Same as 12b.
- c. Use MANIPULATE-Reflect to select a plane of symmetry interactively. You
may want to bring the object(s) to an appropriate orientation via the
ROTATE OBJ panel button prior to this. Then reflect the normal side of
the plane to the deformed side and make the reflection (normal part)
semitransparent using the switch OPAC. Assign different colors to the
underlying object(s) and the reflection so that they can be
distinguished.
- d. Use MANIPULATE-Measure to measure the deviation, at sites of interest,
between the deformed and the reflected parts. Again use ROTATE OBJ to
arrive at appropriate views so that the sites of interest can be
visualized and pointed at conveniently.
- MANIPULATE can also be used to register objects. Suppose we have imaged
two instances of the same object (perhaps at different times and/or via
different modalities). Suppose also that there is a significant common
part in the structures representing the object. This situation may have
occurred because in one of the instances a somewhat different aspect of
the object was in the field of view of the imaging device. We can
register the two structures using MANIPULATE as follows. (See also 15
below).
- a. Bring the two data sets into 3DVIEWNIX form via one of the PORT-DATA
commands.
- b. Extract the structure representing the object in each of the scenes
output in a as a BS0 file.
- c. Use MANIPULATE with both BS0 files as input. Use MANIPULATE-Move to
interactively move one of the structures to align visually as best as
possible with the other structure. You may want to use Measure (possibly
with SET MARKS) to determine how well they are aligned, especially in
the common aspects and subsequently use Move again. When a satisfactory
alignment is reached, use Cut and/or Separate to trim those aspects of
one or both structures that are nor found in the other. This results in
a structure plan.
- d. Use ANALYZE-Register to register the two manipulated structures (see 15
below). This results in a new plan.
- e. Use c and d iteratively to refine registration.
14.4 Analysis
We now consider some examples that illustrate analysis operations.
- This example pertains to registration. Suppose we have image data
acquired about an object of study at two different time instances by the
same modality or by different modalities. This example illustrates how
the two data sets can be represented in a common coordinate system with
registration so that the image data can be analyzed in a comparative and
composite fashion.
- a. Convert the two acquired data sets into scenes of 3DVIEWNIX format.
- b. Extract structures in each scene which contain common information that
can be matched. The output should be two BS1 files. For this to be
permitted, the structures in the two sets should have the same
resolution.
- c. Use PREPROCESS-StructureOperations-MergeStructure to combine the two
sets of structures into a single structure system. The two sets of
structures are not yet registered but they are put in a single BS1 file.
For this to be permitted, the structures in the two sets should have the
same resolution.
- d. Use the output of c as input to ANALYZE-Structure-Register. Do the
registration using common features that can be selected on corresponding
structures or using entire corresponding structures. The result of this
operation is a structure plan.
- e. To compute and compare corresponding registered slices from the two
scenes output in step 1a, convert the plan output in d to a plan file
containing Shell0 structures via
PREPROCESS-StructureOperations-Shell1ToShell0. Input this plan file to
MANIPULATE and use SelectSlice under MANIPULATE to select corresponding
registered slices, to superimpose them, or even to output a scene in
which the slices are in one-to-one match with the slices of the other
scene.
You may start with these two scenes which are supposedly in registration
and repeat steps b-e for possible further refinement of registration.
- This example pertains to kinematic analysis. Suppose you have a 4D scene
or a sequence of 3D scenes capturing motion of an assembly of rigid
objects such as a human joint. The motion of the individual objects can
be quantified and expressed as a plan file using the following sequence
of operations.
- a. Convert the set of captured image data into a set of 3D scenes in the
3DVIEWNIX format.
- b. In each 3D scene, identify the individual objects as Shell1 structures.
Name the files corresponding to the successive time instants in an
alphabetical order, for example, JOE1.BS1, JOE2.BS1, . . . . Note that
you may have to use a combination of PREPROCESS commands to create the
BS1 files. If the objects are noisy or difficult to segment
automatically, the sequence indicated in 5b-f should be used.
- c. Use the BS1 files created in b as input to ANALYZE-Kinematics-Inter to
create a plan file that describes the motion of the objects contained in
the input files.
- d. You may visualize the computed motion contained in the plan file via
VISUALIZE-Surface-View, or measure some aspects of dynamics via
Surface-Measure, or create animations via Surface-CreateMovie and replay
the movie via FastCine under Slice. Note that a variety of types of
motion can be quantified in c including the absolute motion of the
individual objects and the motion of an object relative to any other
object.
- This example relates to computing volume of objects. The most direct
approach is to use Threshold when the object can be identified via
thresholding. There are two possible approaches. The first is as
follows:
- a. Same as 1a.
- b. Use Threshold to create a BIM file.
- c. Use Interpolate to create a new binary scene at an appropriate
resolution.
- d. Use Threshold again to extract the surface of the object of interest
with OUTPUT set to BS1 and BNDRY to CON. The volume enclosed by the
surface is reported at the completion of the command.
The second approach is to create directly a BS1 file containing the
surface at an appropriate resolution in step b. The result from the
first approach is often more accurate than that from the second.
A third approach is to use Interactive2D instead of step b to create a
binary scene in those situations where it is difficult to segment the
object automatically and then to proceed with the remaining steps.
It is sometimes useful to build new commands that would perform
composite operations as shown in these recipes. Operations that do not
require user interaction can be combined together into Unix shell
scripts. We have included some scripts in the PROCESS/SAMPLES/SCRIPTS
directory of the 3DVIEWNIX system. Although writing scripts requires
some shell programming knowledge, you may be able to modify (or use)
these sample scripts. You will find further details on these scripts in
the README file of this directory.
User Manual
Library Ref. Manual
Tutorial