[vtkusers] vtkImageImport array format
P K
xtalswing at yahoo.com
Wed Aug 28 17:22:21 EDT 2002
The -1 issue was accounted for in the definition of
source->size.
Upon further examination, the problem I'm encountering
may be in vtkImageExport. Here's a debug trace. It
has me quite confused right now.
The relevant code is:
vtkImageData *vtktdata=TargetImport->GetOutput();
//...
vtkImageExport *TargetVtkExporter =
vtkImageExport::New();
TargetVtkExporter->SetInput(vtktdata);
What appears to be happening
127 vtkImageExport *TargetVtkExporter =
vtkImageExport::New();
(gdb) print *vtktdata
$1 = {<vtkDataSet> = {<vtkDataObject> = {<vtkObject> =
{Debug = 0 '\000', MTime = {ModifiedTime = 245, _vptr.
= 0x836c5a0}, ReferenceCount = 3, SubjectHelper = 0x0,
_vptr. = 0x83725e0}, FieldData = 0x8400f98, Source =
0x8400d70, DataReleased = 0, NumberOfConsumers = 2,
Consumers = 0x84457f0, WholeExtent = {1, 100, 1, 100,
1, 100}, Extent = {1, 100, 1, 100, 1, 100},
UpdateExtent = {1, 100, 1, 100, 100, 100},
UpdateExtentInitialized = 1 '\001', ExtentTranslator =
0x8400fd8, NumberOfPieces = 1, Piece = 0,
MaximumNumberOfPieces = -1, UpdateNumberOfPieces = 1,
UpdatePiece = 0, RequestExactExtent = 0, GhostLevel =
0, UpdateGhostLevel = 0, ReleaseDataFlag = 0,
UpdateTime = {ModifiedTime = 246, _vptr. = 0x836c5a0},
PipelineMTime = 114,
LastUpdateExtentWasOutsideOfTheExtent = 0, Locality =
0}, CellData = 0x84010b8, PointData = 0x8401038,
ComputeTime = {ModifiedTime = 0, _vptr. = 0x836c5a0},
Bounds = {9.99999968e+37, -9.99999968e+37,
9.99999968e+37, -9.99999968e+37, 9.99999968e+37,
-9.99999968e+37}, ScalarRange = {0, 1}, Center = {0,
0, 0}}, Vertex = 0x8401138, Line = 0x8401250, Pixel =
0x8401378, Voxel = 0x84015e8, Dimensions = {0, 0, 0},
DataDescription = 8, Increments = {1, 100, 10000},
Origin = {0, 0, 0}, Spacing = {1, 1, 1}, ScalarType
= 3, NumberOfScalarComponents = 1}
(gdb) until
128 TargetVtkExporter->SetInput(vtktdata);
(gdb) print *vtktdata
$2 = {<vtkDataSet> = {<vtkDataObject> = {<vtkObject> =
{Debug = 0 '\000', MTime = {ModifiedTime = 245, _vptr.
= 0x836c5a0}, ReferenceCount = 3, SubjectHelper = 0x0,
_vptr. = 0x83725e0}, FieldData = 0x8400f98, Source =
0x8400d70, DataReleased = 0, NumberOfConsumers = 2,
Consumers = 0x84457f0, WholeExtent = {1, 100, 1, 100,
1, 100}, Extent = {1, 100, 1, 100, 1, 100},
UpdateExtent = {1, 100, 1, 100, 100, 100},
UpdateExtentInitialized = 1 '\001', ExtentTranslator =
0x8400fd8, NumberOfPieces = 1, Piece = 0,
MaximumNumberOfPieces = -1, UpdateNumberOfPieces = 1,
UpdatePiece = 0, RequestExactExtent = 0, GhostLevel =
0, UpdateGhostLevel = 0, ReleaseDataFlag = 0,
UpdateTime = {ModifiedTime = 246, _vptr. = 0x836c5a0},
PipelineMTime = 114,
LastUpdateExtentWasOutsideOfTheExtent = 0, Locality =
0}, CellData = 0x84010b8, PointData = 0x8401038,
ComputeTime = {ModifiedTime = 0, _vptr. = 0x836c5a0},
Bounds = {9.99999968e+37, -9.99999968e+37,
9.99999968e+37, -9.99999968e+37, 9.99999968e+37,
-9.99999968e+37}, ScalarRange = {0, 1}, Center = {0,
0, 0}}, Vertex = 0x8401138, Line = 0x8401250, Pixel =
0x8401378, Voxel = 0x84015e8, Dimensions = {0, 0, 0},
DataDescription = 8, Increments = {1, 100, 10000},
Origin = {0, 0, 0}, Spacing = {1, 1, 1}, ScalarType =
3,
NumberOfScalarComponents = 1}
(gdb) until
64 itkNewMacro(Self);
(gdb) print *vtktdata
$3 = {<vtkDataSet> = {<vtkDataObject> = {<vtkObject> =
{Debug = 0 '\000', MTime = {ModifiedTime = 257, _vptr.
= 0x836c5a0}, ReferenceCount = 1, SubjectHelper = 0x0,
_vptr. = 0x83708a0}, FieldData = 0x0, Source = 0x0,
DataReleased = 0, NumberOfConsumers = 0, Consumers =
0x0, WholeExtent = {0, 1, 0, 138426224, 138696800,
138696816}, Extent = {1, 0, 0, 0, 0, 0}, UpdateExtent
= {17, 1079157416, 1079157416, 138696888, 17,
1079157416}, UpdateExtentInitialized = 168 '¨',
ExtentTranslator = 0x84458d0, NumberOfPieces = 17,
Piece = 138420120, MaximumNumberOfPieces = 138696512,
UpdateNumberOfPieces = 138696704, UpdatePiece = 9673,
RequestExactExtent = 1079157416, GhostLevel =
1079157416, UpdateGhostLevel = 0, ReleaseDataFlag = 0,
UpdateTime = {ModifiedTime = 0, _vptr. = 0x0},
PipelineMTime = 0,
LastUpdateExtentWasOutsideOfTheExtent = 0, Locality =
0}, CellData = 0x40529b20, PointData = 0x0,
ComputeTime = {ModifiedTime = 0, _vptr. = 0x0}, Bounds
= {1.40129846e-45, 0, 0, 0, 0, 0}, ScalarRange = {0,
0}, Center = {0, 0, 0}}, Vertex = 0x0, Line = 0x0,
Pixel = 0x0, Voxel = 0x0, Dimensions = {0, 0, 0},
DataDescription = 0, Increments = {0, 0, 0}, Origin =
{0, 0, 0}, Spacing = {0, 0, 0}, ScalarType = 0,
NumberOfScalarComponents = 0}
--- "Koning, P.J.H. de (LKEB)"
<P.J.H.de_Koning at lumc.nl> wrote:
> 26-08-02 19:21:19, P K <xtalswing at yahoo.com> wrote:
>
> Try the following for the data extent
>
> SourceImport->SetDataExtent(0, source->size[0] - 1,
> 0, source->size[1] - 1, 0, source->size[2] - 1);
>
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
More information about the vtkusers
mailing list