Skip to content

WIP: ENH: Wrap CastImageFilter for VectorImage <-> Vector#1579

Closed
thewtex wants to merge 1 commit intoInsightSoftwareConsortium:masterfrom
thewtex:castimagefilter-wrap-vector
Closed

WIP: ENH: Wrap CastImageFilter for VectorImage <-> Vector#1579
thewtex wants to merge 1 commit intoInsightSoftwareConsortium:masterfrom
thewtex:castimagefilter-wrap-vector

Conversation

@thewtex
Copy link
Member

@thewtex thewtex commented Jan 29, 2020

Addresses #1133

Copy link
Member

@blowekamp blowekamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTH

@@ -152,7 +153,7 @@ CastImageFilter<TInputImage, TOutputImage>::DynamicThreadedGenerateDataDispatche
{
const InputPixelType & inputPixel = inputIt.Get();
OutputPixelType value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not get set to the correct length for vector pixels.

Copy link
Member

@blowekamp blowekamp Jan 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside the loops add something like:

OutputPixelType value;
NumericTraits<OutputPixelType>::SetLength(value, componentsPerPixels)

I'm not sure if its a NumericTraits or some other pixel traits class that is needed to set the number components correctly for all types OK.

Pulling it outside the loop also removes per-pixel allocation which is a performance killer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blowekamp thanks for the note.

@Leengit it looks this addition was missed when with #2073 -- could you please add it in a follow-up patch?

@stale
Copy link

stale bot commented Jun 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the status:Use_Milestone_Backlog Use "Backlog" milestone instead of label for issues without a fixed deadline label Jun 12, 2020
@thewtex thewtex removed the status:Use_Milestone_Backlog Use "Backlog" milestone instead of label for issues without a fixed deadline label Jun 15, 2020
@thewtex thewtex added this to the ITK v5.2.0 milestone Jun 15, 2020
@stale
Copy link

stale bot commented Oct 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the status:Use_Milestone_Backlog Use "Backlog" milestone instead of label for issues without a fixed deadline label Oct 13, 2020
@thewtex
Copy link
Member Author

thewtex commented Nov 2, 2020

@thewtex thewtex closed this Nov 2, 2020
hjmjohnson added a commit that referenced this pull request Sep 21, 2025
Closed issues:
  CMake configure warning with CMake 3.30 and newer #1579

Merged pull requests:

pkgconfig: drop unused libraries from Libs.private #1591 (bgilbert)
Fix CMake warning: Compatibility with CMake < 3.10 will be removed #1580 (dzenanz)
code documentation updates #1576 (weanti)
Fixed ICC profile copy failure on write #1574 (mircomir)
opj_jp2_read_header: Check for error after parsing header. #1573 (sebras) (CVE-2025-54874)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:Use_Milestone_Backlog Use "Backlog" milestone instead of label for issues without a fixed deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants